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

RE: [amibroker] Re: PositionSize Variable - Help - Inexplicable Results



PureBytes Links

Trading Reference Links

Thanks for your patient correction, Tomasz.

Regards,

Mark



» -----Original Message-----
» From: Tomasz Janeczko [mailto:amibroker@x...]
» Sent: Wednesday, 23 October 2002 6:02 AM
» To: amibroker@xxxxxxxxxxxxxxx
» Subject: Re: [amibroker] Re: PositionSize Variable - Help -
» Inexplicable Results
»
»
» Hello,
»
» 1. Correct.
» To apply position size expressed in shares use:
»
» NumberOfShares = .....
» TradePrice = IIF( buy, BuyPrice, ShortPrice );
» PositionValue = TradePrice * NumberOfShares ;
»
» 2. Almost correct.
» If "allow shrininking" is OFF - once equity drops below value
» requested by PositionSize - trades would be listed in the trade list
» but ZERO shares would be traded - so in fact trade will not occur.
»
» 3. Correct (if points commissions used)
»
» Best regards,
» Tomasz Janeczko
» amibroker.com
» ----- Original Message -----
» From: "Mark Allen" <mpa@xxxx>
» To: <amibroker@xxxxxxxxxxxxxxx>
» Sent: Tuesday, October 22, 2002 3:02 AM
» Subject: RE: [amibroker] Re: PositionSize Variable - Help -
» Inexplicable Results
»
»
» > Hi Nick,
» >
» > Excuse me for butting in here, for I am not anywhere near as
» > knowledgable as those who have so far replied to your
» query, but am
» > also interested in understanding the issues involved. It
» seems to me
» > there may well be some basic misconceptions occurring
» regarding your
» > use of PositionSize in AFL, which I describe below (inviting
» > corrections to any errors of my own):
» >
» > 1) In AB, PositionSize = dollar amount (eg, "Positionsize
» = 10000;")
» > or a percentage of equity (eg, "Positionsize = -10;" defines
» > Positionsize as 10% of Initial Equity), not number of shares. This
» > alone may cause a huge variance in the results you see
» when comparing
» > the use of to non-use of the Positionsize variable in
» your tests. The
» > results returned from the use of PositionSize defined as
» a number of
» > shares (so much smaller than it should be because the
» dollar value has
» > been devided by the share's close value) cannot be compared to the
» > Backtester's default use of total Initial Equity (as a
» dollar value).
» >
» > 2) In Backtester Settings, the accompanying Allow PositionSize
» > Shrinking switch may also affect your results, depending
» on whether
» > your equity dips below the Positionsize declared in your
» AFL. If it is
» > OFF, the tester will continue to apply trades to the value of
» > Positionsize with non-existent equity.
» >
» > 3) As returns shrink through the use of money management
» > (Positionsize), the impact of commissions and brokerage
» can be much
» > greater, turning reasonably profitable but small
» theoretical trades
» > into real losses.
» >
» > If all of the above were to affect your tests at the same
» time, I'm
» > sure the result could be as devastating as those you describe.
» >
» > I apologise if my observations are incorrect and I am but
» muddying the
» > waters, but hopefully some clarity will arise soon.
» >
» > Regards,
» >
» > Mark

<snip repetitive historical thread>