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

[amibroker] not understanding positionsize



PureBytes Links

Trading Reference Links

my apologies, since I know this gets discussed a lot, but I don't get how
positionsize works.

say I have a strategy that operates on a watchlist of stocks, any number of
which may generate a buy or a short at any time. it's a fast system,
generating a lot of trades, potentially overlapping each other. I want to
look at how profitability and drawdown are affected by the maximum number of
positions I take. I've unchecked 'Allow position size shrinking' in AA
settings, so my thinking was that if positionsize was -50, 2 positions could
be opened at once, -10 would allow 10 positions, etc.

but when I look at the trade list of a backtest with a positionsize of -100,
15 positions get opened on the first day of the test. when I optimize
max_positions, the number of trades shown in the optimization results is
always the same, though profitability does change, so *something* is
happening.

obviously, I don't understand how positionsize works.

here's the positionsize code:

  max_positions = Optimize("max_positions", 5, 1, 20, 1);
  positionsize = -(100 / max_positions);

I'm sure I'm doing something dumb, but I don't get it.

Dave Merrill


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/