Something is wrong here

Posted By: blaub4r

Something is wrong here - 07/08/13 17:56

I got this from a Backtest:

Tests run.. assets..
BackTest: Tests portfolio 2011..2013
Profit 41$ MI 2$ DD 10$ Capital 297$
Trades 459 Win 50% Avg +1.1p Bars 36
AR 40% PF 1.32 SR 0.61 UI 5.6% Error 23%

My Profit is 41$. Even if it was only over one year the AR should not be higher than 41/297=13%. Still my AR is 40%.
Am I missing something?
Posted By: jcl

Annual return calculation - 07/09/13 11:43

A very rough estimate of AR is annual profit divided by drawdown. This would be more than 100% in your case. But the real formula is more complicated - I'll check and post it here. I'll also check how the capital is calculated, and why it is unusually high in your case.
Posted By: blaub4r

Re: Annual return calculation - 07/09/13 14:22

Thanks, looking forward to see the formula laugh

However, I don't necessarily think that the capital is unusually high as I have a largest margin of 247$ because I have 51 trades open at some point. The profit is just unusually low.

This is the result with a maximum of 3 open trades (largest margin: 15$):

ForumTopic compiling.............. assets..
BackTest: ForumTopic portfolio 2011..2013
Profit 16$ MI 1$ DD 6$ Capital 65$
Trades 204 Win 50% Avg +0.9p Bars 34
AR 15% PF 1.17 SR 0.89 UI 11.3% Error 34%
Generate Chart - please wait... ok
Posted By: Anonymous

Re: Annual return calculation - 07/09/13 14:57

Originally Posted By: jcl
A very rough estimate of AR is annual profit divided by drawdown. This would be more than 100% in your case. But the real formula is more complicated - I'll check and post it here. I'll also check how the capital is calculated, and why it is unusually high in your case.


Looking forward to the formulas.

It's on my todo list to get better acquainted with Zorro's performance metrics.
Posted By: jcl

Re: Annual return calculation - 07/10/13 09:10

Ok, here's the formula that I got:

3_Year_Drawdown = DrawDown * sqrt(3_Years/Testperiod);

AR = 100 * 1_Year/Testperiod * (Win-Loss)/Max(Margin,3_Year_Drawdown);

The drawdown is assumed to be at least as high as the margin, otherwise a too small drawdown would cause unrealistic high returns.
Posted By: blaub4r

Re: Annual return calculation - 07/10/13 11:29

Thanks for the formula!

I'm not sure what the variables stand for, though.
If I apply the formula to the examples I don't get the correct result:
I assumed that win-loss=profit
and Margin = Largest margin
The TestPeriod should be 2 years

1)
100*1/2*41/247 = 8.3
it should be 40
247 is the largest margin

2)
100*1/2*16/15 = 53.3
it should be 15

By the way, can you also post the formula of the capital requirements?
It behaves somewhat strangely below 100$ capital
Posted By: jcl

Re: Annual return calculation - 07/10/13 11:37

Margin = 50 in your case, for 1 lot on a mini account. Your test period is probably 2.5 years - you can see it at the top of the performance report.

The capital requirement is simply

Capital = 3_Year_DrawDown + Max_Total_Margin;

Max_Total_Margin is the largest open margin during the test.
Posted By: blaub4r

Re: Annual return calculation - 07/10/13 13:30

Thank you, I get the correct results now laugh
Posted By: blaub4r

Re: Annual return calculation - 07/10/13 14:24

Originally Posted By: jcl
Margin = 50 in your case, for 1 lot on a mini account.

I thought the tests were simulated on a micro account
(http://zorro-trader.com/manual/en/testing.htm)
Posted By: jcl

Re: Annual return calculation - 07/10/13 14:34

Yes, but for some reason that I don't know, the drawdown minimum is the margin of a mini account. I've already made a note to the developers about that.

Normally the drawdown is way higher than that margin, so it does not matter, but in your case I think the AR is too pessimistic, due to the too high drawdown minimum.

Posted By: blaub4r

Re: Annual return calculation - 07/10/13 15:18

Ok, but why isn't the AR calculated from the capital requirement anyways?
If that's the amount of money you invest the percentaged profit should be calculated from that amount.
Or I got something wrong.
Posted By: jcl

Re: Annual return calculation - 07/11/13 08:13

I guess the best answer is: "Because anyone is doing it this way."

I suppose AR is defined as it is because most consider the performance of a system to be profit per risked capital. The capital used for fulfilling broker requirements, such as margin, is not under risk and thus unrelated to a system's performance.

With most strategies the drawdown is anyway much higher than the margin. Exception are systems that heavily hedge. They have low risk, but need much capital for the margin. As this capital is needed, you're theoretically right that it should affect the performance. But the AR is just not defined this way.
Posted By: blaub4r

Re: Annual return calculation - 07/14/13 17:49

Thanks for the explanation.

I just noticed that the description of the Anual Return is wrong here: http://zorro-trader.com/manual/en/performance.htm
Posted By: jcl

Re: Annual return calculation - 07/15/13 08:31

You're right. That will be fixed.

In early Zorro versions the margin requirement was not added to the capital, so the description was true back then.
Posted By: DdlV

Re: Annual return calculation - 11/22/13 14:10

FYI - just noticed that the description of Annual Return (AR) is different on the Testing and Performance Report manual pages...
Posted By: jcl

Re: Annual return calculation - 11/22/13 15:02

Thanks - that will be corrected. The Performance page contains the most recent description.
© 2024 lite-C Forums