Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (VoroneTZ, Quad), 479 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Something is wrong here #425579
07/08/13 17:56
07/08/13 17:56
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
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?

Annual return calculation [Re: blaub4r] #425614
07/09/13 11:43
07/09/13 11:43
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.

Re: Annual return calculation [Re: jcl] #425632
07/09/13 14:22
07/09/13 14:22
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
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

Last edited by blaub4r; 07/09/13 14:36.
Re: Annual return calculation [Re: jcl] #425637
07/09/13 14:57
07/09/13 14:57

A
acidburn
Unregistered
acidburn
Unregistered
A



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.

Re: Annual return calculation [Re: ] #425694
07/10/13 09:10
07/10/13 09:10
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.

Re: Annual return calculation [Re: jcl] #425727
07/10/13 11:29
07/10/13 11:29
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
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

Re: Annual return calculation [Re: blaub4r] #425728
07/10/13 11:37
07/10/13 11:37
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.

Re: Annual return calculation [Re: jcl] #425741
07/10/13 13:30
07/10/13 13:30
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
Thank you, I get the correct results now laugh

Re: Annual return calculation [Re: jcl] #425747
07/10/13 14:24
07/10/13 14:24
Joined: Nov 2012
Posts: 126
B
blaub4r Offline OP
Member
blaub4r  Offline OP
Member
B

Joined: Nov 2012
Posts: 126
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)

Re: Annual return calculation [Re: blaub4r] #425752
07/10/13 14:34
07/10/13 14:34
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.


Page 1 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1