Hi
for those of you using Amibroker for TA in addition to 123P, here’s my Van Tharp surrogate for volatilty based positionsizing.
I personally use this system ( slightly advanced version [;)] ) for all my trades since more than 3 years. If you like tinker around with the ATR periods or your personal risk tolerance.
I found not much added value when testing different ATR periods but maybe you see it in a different way.
I built first line of the formula at a time when true ATR was not available as a single function in AB .
The formulae calculate ATR on 2 period Simple MA and calculates the pivot point for the NEXT trading day ( p ) - from there 2 resistance ( r1 and r2 ) and two support levels ( s1 and s2 ) which also define the risk level.
Risk / stock in points is entry-price minus stop price.
Entry price is pivotpoint price + 0.5% of this price
Stop is s2 * 99% - this gives enough leeway even for most volatile stocks.
The final part of the formula is to assing the adequate amount of equity to a position according to :
a: underlyings shortterm volatilty
b: risk on overall equity with regard to the entry / stop levels.
In this case, I use 20K equity with a 2% risk per position.
Example :
entry price = 50
Stop price = 45
Risk = 5 points
Portfolio risk = 2% of 20K = 400 $
Positionsize = 400/5 = Position of 80 Stocks x 50$ = 4.000$
Hope you got the picture.
For use, just copy and place it in your AB trading system.
If you just need the values - use it exploration mode.
You need to assign extra lines in the exploration to see the values :
i.e :
Column5 = ((20000)2/100)/(p(100.5/100)-(s2*(99/100)))/10;
Column5Name = “Max Pos”;
Column5Format = 1;
// being Pivotpoint calculation, Support and Resistance;
p = (MA(O,2)+MA(H,2)+MA(L,2)+MA(C,2))/4;
r1 = (2p)-LLV(L,2);
s1 = (2p)-HHV(H,2);
r2 = p +(r1 - s1);
s2 = p -(r1 - s1);
// being Positionsizing algorithm ;
PositionSize=((20000)2/100)/(p(100.5/100)-(s2*(99/100)));
// end of formula;
In addition, you can use the Commentary function in AB and the above formulae ( + some others ) to display a window for each chart with this content ( for a 20 K portfolio ):
Commentary window :
PIVOT POINTS, SUPPORT AND RESISTANCE
SYMBOL : ADRE
NAME : BLDRS Emerging M
DATE :05.01.2006
THESE POINTS ARE VALID FOR NEXT TRADING DAY
RESISTENCE POINT 2 : ----------------123.85
RESISTENCE POINT 1 : ----------------121.56
PIVOTPOINT -----------------------------------------120.67
SUPPORT POINT 1 : ----------------------118.38
SUPPORT POINT 2 : ----------------------117.49
ENTRY PRICE :----------------121.27
STOP PRICE :----------------116.31
PROFIT TARGET :----------------124.34
MAX POSITION :----------------20
TOTAL POS PRICE :---------------2,446
RISK REWARD RATIO :------------0.62
If you have any questions, pm me at sgfuchs@onlinehome.de
Good Luck
AB Chartwindow-main.doc (188 KB)