PureBytes Links
Trading Reference Links
|
Dave,
Amibroker, at least the current version, assumes that your entire portfolio
is comprised of only one stock. It is not capable of portfolio backtesting. So,
whenever you specify a negative position size, it means to use that percent of
CURRENT equity (i.e., compounded). So, for your code, -100/max_positions, when
max_positions=5, means that it invests 100/5 or 20% of your current equity
on this particular trade. It has nothing to do with no. of positions. Each stock
you are testing gets 20% of current equity invested in that stock. If your
current equity is, say, $1,000,000, then $200,000 is invested in each stock (if
max_positions is the default of 5). TJ said that version 4.5 will allow
portfolio testing, so all of this will change with that version of AB. I think
that's what lots of people are anxiously awaiting.
AV
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Dave Merrill
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">AmiBroker
Sent: Friday, September 12, 2003 4:03
PM
Subject: [amibroker] not understanding
positionsize
my apologies, since I know this gets discussed a lot, but I
don't get howpositionsize works.say I have a strategy that
operates on a watchlist of stocks, any number ofwhich 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 tolook at how profitability and
drawdown are affected by the maximum number ofpositions I take. I've
unchecked 'Allow position size shrinking' in AAsettings, so my thinking
was that if positionsize was -50, 2 positions couldbe 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 optimizemax_positions, the number of trades shown
in the optimization results isalways the same, though profitability does
change, so *something* ishappening.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 MerrillSend
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
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 the Yahoo! Terms of Service.
|