PDA

View Full Version : Volitility position sizing


starman
22nd July 2003, 09:09 AM
Hello Everybody,
I hope you are all well,
I have just finished reading Van Tharps book he talks about using volatility for position sizing
is it possible for tradesim to use volatility to work out position sizing in order to back test a system if so how do we build the formula to first test in metastock.
It would be superior if we could build the formula so that when doing the exploration we then look at say column B in metastock and that column would tell you how much volatility their is.
Then in column C we could have how many shares to buy with that volatility.
Then in column D we would have a calculation for the entry price.
Then in column E we would have the volatility stop with the price the stop should be set at.)

Look forward to any advise

Take Care

Chris :)

David Samborsky
22nd July 2003, 01:28 PM
Here is an example using a simple moving average crossover as the entry trigger. You need to specify the amount of risk in dollars.


Period:=10; { ATR period }
ARC:=3.0; { Average range constant }

Volatility:=ARC*ATR(Period);
Stop:=C-Volatility;
BandLong&#58;=If&#40;L<=PREV,Stop,If&#40;Stop>PREV,Stop,PREV&#41;&#41;;

InitialStop&#58;=ref&#40;BandLong,-1&#41;;
EntryTrigger &#58;= Cross&#40;MACD&#40;&#41;,Mov&#40;MACD&#40;&#41;,9,E&#41;&#41;;
EntryPrice &#58;= OPEN;
ExitTrigger &#58;= &#40;L <= InitialStop&#41;;
ExitPrice &#58;= CLOSE;

Column C&#58;
Nshares&#58;=Int&#40;$Risk/&#40;EntryPrice-InitialStop&#41;&#41;;

Column D&#58;
EntryPrice;

Column E&#58;
InitialStop;

starman
22nd July 2003, 02:23 PM
Hello David,
Thankyou for the reply
If i test the asx 300 through tradesim and use a volitility % for position sizing on each stock, as i understand it each stock will have a different range so would that not mean that each trade through tradesim would have a different % calculation of stock bought and with that in mind is it possible to build this into metastock.
I hope i am not confusing the point and correct me if i am wrong

Thanks again

Chris

David Samborsky
23rd July 2003, 02:21 AM
Hello starman

Your volatility and hence Position Size and value would be different for each trade depending on the security and volatility. However when using TradeSim your percentage risk of total capital would be fixed but the actual risk in dollars would vary from trade to trade as your total capital changes.

Alternatively if you use the constant dollar risk then your position size will be adjusted so that the risk will remain constant for each trade.

starman
23rd July 2003, 09:17 AM
Thankyou David,
I think i understand, is their a way of building a formula in metatsock say column C for volatility on the individual stocks that will then tell you based on each stocks volatility how many shares i can purchase is this possible

Kind Regards

Chris :?

basil
15th December 2003, 01:25 PM
David - the example you provided answered my questions about ATR trailing stops, however I still can't work out how to apply that to an entry trigger.
For example I want to set an entry trigger which is a crossover between 1 moving average, and a second moving average + a specified ATR. Using your example is this how it would be written?

Period:=10; { ATR period }
ARC:=3.0; { Average range constant }

Volatility:=ARC*ATR(Period);
Stop:=C-Volatility;
BandLong:=If(L<=PREV,Stop,If(Stop>PREV,Stop,PREV));

InitialStop:=ref(BandLong,-1);
EntryTrigger := Cross(MACD(),(Mov(MACD(),9,E))+ARC*ATR(Period)); {my changes in red}
EntryPrice := OPEN;
ExitTrigger := (L <= InitialStop);
ExitPrice := CLOSE;

Column C:
Nshares:=Int($Risk/(EntryPrice-InitialStop));

Column D:
EntryPrice;

Column E:
InitialStop;

If I didn't want to use a volatility stop would I need to include those first few lines of code?

Your help would be appreciated.

Basil