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

[amibroker] Re: AB Back-testing Metrics



PureBytes Links

Trading Reference Links

You can control exactly how much is allocated to each trade, by using 
custom backtester logic, without having to manipulate any statistics.

For example; I have a script that calculates position size based on a 
number of factors, but then prevents the position size from exceeding 
a "realistic" maximum. The end result is that you get the compounded 
profits up to a maximum.

If your optimization period is a short to moderate length, the 
maximum is not reached and the statistics computed reflect 
your "Compounded" scenario and are valid for comparison against any 
other strategy.

Though, it is true that this just delays the inevitable, which is 
skewed statistics once the maximum position size is hit, at which 
point the statistics begin to take on your "Clamped" effect.

I find that this most closely models what I would do in real trading 
anyway. If the capital became so plentiful as to exceed a realistic 
position size, I would start looking for other vehicules in which to 
place the excess. I would not continue increasing the position size 
beyond the realistic measure. As such, the backtested statistics 
reflect reality.

Mike 

--- In amibroker@xxxxxxxxxxxxxxx, "Robert Grigg" <robert@xxx> wrote:
>
> I have been thinking through the process of evaluating 
the "goodness" of a
> trading system using AB metrics and have become perplexed.  Can 
someone who
> has unravelled this issue previously help?
> 
> There seem to be two general approaches to portfolio sizing while 
doing a
> back-test.
>   
> The first is to only back-test using the "Initial Equity" amount.
> Generally, we might start using fixed position sizes and a fixed 
maximum
> number of positions. In later developmental iterations we might use 
risk
> based position sizing or other processes where we vary position 
sizing up to
> the maximum amount of Initial Equity.  I generally refer to this 
evaluation
> approach as "Clamped Equity".  This approach tends to give an 
equity curve
> that is linear.
> 
> The second approach is to compound profits and place trades up 
to "Current
> Equity". (In AB terms our Position size is set to a % of Current 
Equity).
> This is referred to as "Compounding Profits".  The equity curve can 
take on
> an exponential appearance.
> 
> In real life trading most people tend to do a bit of both.  However 
in
> back-testing mode the "Compounding Profits" model (with a 
notionally good
> system) can quickly become infeasible.  (If only I had this system 
in
> 2000...).
> 
> So, now to the crux of the problem.  The "Clamped Equity" approach, 
with a
> notionally good system, produces a profit that is quarantined.  
Accumulated
> profit can be used to top-up draw-downs but the amount in trades 
never
> exceeds initial equity.  In AmiBroker metrics, Exposure % is always
> calculated on a bar by bar basis of mark-to-market holding against 
current
> mark-to-market equity.  However, in the "Clamped Equity" testing 
approach,
> the quarantining of profits is intentional and it seems to me that 
it would
> be more useful to look at the Exposure as a % of the "Clamped 
Equity" (i.e.
> the "Initial Equity")?
> 
> Exposure% is also used as a divisor in other metrics such as Net 
Risk
> Adjusted Return %,  Risk Adjusted Return %,  Max System % Draw-down,
> CAR/MaxDD  and  RAR/MaxDD and so these metrics also may be less 
useful given
> this testing approach.
> 
> I can see that comparisons between competing models, with the same 
test
> period is valid.   However, I do not feel so secure if I am doing
> Walk-Forward back-testing using a complex objective function, 
particularly
> if I am using weighted components that contain Exposure% and others 
that
> don't.
> 
> I know that it is relatively easy to use the Custom Back Tester to 
produce
> amended statistics.  However, I am concerned that I have not found 
any other
> discussions of this issue on this or other forums, so maybe I have 
muddled
> thinking and it is not a real issue.   Any discussion would be 
appreciated.
> 
> Robert
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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