PDA

View Full Version : Position sizing


Darlene
10th May 2004, 06:52 AM
I am hoping someone will be able to help re a position sizing problem I am having with TradeSim...

I have developed a long reversal system that uses a LLV(L,3) as an exit.

I like to use the "Fixed Risk" position sizing as it factors in volatility - however I do not actually use an initial stop, as the LLV3 is sufficiently tight.

To be able to use the "Fixed Risk" position sizing, but not activate the Inital Stop as an exit, I included the code (InitialStop := c-1.5*ATR(10);), but "turned it off" by using the "DisableProtectiveStop" function. That is while it could use the 1.5*ATR(10) in the formula for position sizing it never actually exited using the Initial Stop - only the LLV3, as I had planned. (I fully understand that my actual risk using this system is still variable and by no means limited to the set "FixedRisk" I choose in TradeSIM. I look carefully at the TradeLog to determine the range and average etc of both risk and actual $$ size of the positions). I really just like the formula, which I have been assuming is (Fixed Risk$$/"Stop Loss (ATR)" or $xx/xATR ), as it takes the volatility into account and it reduces the position size with the more extreme end of the volatile stocks while still having some exposure to them. My Volatility gate is ATR(30)/Mov(c,30,s)>0.01.)

My problem is that, using the above code, I realised TradeSim was actually using the close, and calculating the ATR(10), on the day of entry rather than trigger. As this was impossible, in reality, to implement, I changed the code to "InitialStop := Ref(c-1.5*ATR(10)),-1);" to reflect more closely what I would really be doing. (I enter the day following the trigger so use the function "EnableDelayOfEntryByOneBar". ) It seems tradesim is now using the correct value of the ATR(10) to calculate position size but the system has become significantly less profitable.

It does not make sense to me that the value of the ATR on one day - when included as part only, of an average of the previous same 9 days (ie., ATR(10)) can make such a huge difference. Sometimes - in the TradeLog, the position sizes are extremely different - and this is the only change I have made.

Any help much appreciated.

Cheers
Darlene

David Samborsky
10th May 2004, 12:25 PM
Check the error log after you have created the trade database that trades aren't being rejected because the InitialStop exceeds the entry price (long side). This may account for the differing results.

Darlene
10th May 2004, 11:35 PM
Thanks David, I'll follow that thru.

Cheers
Darlene

Darlene
11th May 2004, 07:37 AM
Hi David,
Yes, you were right, there were a few trades going to the error log. I changed the code to InitialStop:= EntryPrice-Ref(1.5*ATR(10),-1) and this reduced the number of errors to 0 - however - this still did not account for the huge differences I was getting between the 2 results.

I have since thoroughly compared tradelogs. It seems to me that my assumption that the Fixed Risk was calculated using $$$Risk/XATR (where I was saying xATR is my stoploss) was wrong.

Can you confirm the formula you use for calculating the position size for the Fixed Risk model? It appears to be $$$Risk/(EntryPrice-Initial Stop). As I was using code that calculated the Initial Stop from the close rather than entry price -this formula would not give me the pure xATR value that I was seeking as a stop loss for position sizing purposes.

The bias then came from having code that calculated the close on the day of entry rather than the trigger day - ie., a larger stop loss size on stocks that had fallen (and therefore smaller positions) and smaller stop loss size on stocks that had risen (and therefore bigger positions) - thus creating a bias where bigger positions were taken on trades that went better on the first day etc.

Can you please confirm that this is indeed the formula you use for Fixed Risk Position sizing - ie., Fixed Risk$$$/(EntryPrice - Initial Stop) ?? Does the explannation I have given sound viable? Is there a way I can use a Position sizing model where I do not have to enter the Entry Price - as logistically this is more difficult. As I will often be going into a number of trades on the open, in reality I find it much easier to determine position sizing before the market opens- based on the infomation on the day of the trigger (ie. close), however - I am particularly fond of including volatility information in the position sizing formula. Any help greatly appreciated.

Cheers
Darlene

David Samborsky
12th May 2004, 11:20 AM
Can you please confirm that this is indeed the formula you use for Fixed Risk Position sizing - ie., Fixed Risk$$$/(EntryPrice - Initial Stop) ??


Yes this is correct.

Is there a way I can use a Position sizing model where I do not have to enter the Entry Price - as logistically this is more difficult.

No there isn't. However instead you can use:-

EntryPrice:=Open;
InitialStop:=Open-xATR;

To simulate slippage you can use the slippage options in the trade preferences. This will allow your entry price to vary whilst maintaining your position size at your desired value.