[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Position Size question



PureBytes Links

Trading Reference Links

Hi Terry

 

I plotted a scatter diagram of the close vs position size from the exported
csv file for the following , and I find quite a few values over -10 using
weekly on the ASX300. A few of the extreme values are due to the stock not
trading in the last couple of bars. However in general the values were much
higher than I expected.

 

This is the exploration I used,

 

PositionSize = -2*Open/(2*ATR(10));

AddColumn(Close,"Close");

AddColumn(PositionSize,"Position Size");

Filter =1;

 



 

Regards

 

Dave

 

 

  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Terry
Sent: Monday, 10 July 2006 1:47 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Position Size question

 

Dave,

 

Your idea was interesting so I charted it. What is the concept here? I
looked at well over 100 stocks and the limit of -10 is 99.9% dominate. It
only creates a smaller position when there is extreme volatility, which
happens more easily with very low priced stocks.

 

Code to make the chart below. I inversed the plots for readability.

//Test of VanTharp PositionSize

SetChartOptions(1, chartShowDates);

 

Size = -2*BuyPrice/(2*ATR(10));

PositionSize = Max(Size,-10);

 

Plot(C,Name(),1,64);

Vmax = 2 * LastValue(Highest(V));

Vmin = -LastValue(Highest(V)) / 2;

Plot(V,"Volume",colorBlack,styleNoLine|styleDots|styleOwnScale,Vmin,Vmax);

Plot(V,"Volume",colorBlack,styleHistogram|styleOwnScale,Vmin,Vmax);

Plot(-PositionSize,"PositionSize",colorBlue,styleHistogram|styleLeftAxisScal
e);

Plot(-Size,"Size",colorRed,styleHistogram|styleThick|styleLeftAxisScale);

 



--

Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of david
Sent: Sunday, July 09, 2006 07:42
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Position Size question

 

OK, I think I was looking at another Varp example first which put me in a
spin, in the user guide (Back-testing your trading ideas), the other example
within "Portfolio-level Backtesting" allows me to compare apples with apples
so to speak, this looks right . 

 

PositionSize = Max(-2*BuyPrice/(2*ATR(10)),-10);

 

Regards

 

Dave

 

 

 

  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of david
Sent: Sunday, 9 July 2006 9:28 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Position Size question

 

 

Hello, I was wondering how to use Tharp's ATR position sizing (example in
users guide), but limit the position size to a "maximum" of 10% of trading
capital ?

 

Many thanks

 

Regards

 

Dave