Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 840 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 8 1 2 3 4 5 6 7 8
Re: Performance report: missing max drawdown in %! [Re: bfleming] #435619
01/09/14 17:31
01/09/14 17:31
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
jcl,

linked to bfleming's question:

Quote:
If I understand correctly, the DD% that Zorro gives is a % of the final gross profit (not the gross profit at the time of the DD).


If this is true, then we need an ability to modify the start and end dates of the back tests.

Also, I have a vague recollection of a discussion of monte carlo simulation, i.e. the ability to reorder and sample from the series of closed trades in the back test would be nice.

Re: Performance report: missing max drawdown in %! [Re: bfleming] #435622
01/09/14 18:04
01/09/14 18:04
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl.

a) I don't see how this definition is accurate since a Test doesn't compute all possible returns. But rather than beating this further how about instead adding "Annual Return on Capital Required" to the performance report, since that's directly meaningful to me - the Tested return I can expect on the capital I need to invest.

e/c) A few issues here (with thanks to bfleming! laugh ):

1) From the manual (and rephrasing), Zorro calculates UI as the mean drawdown's % of the maximum equity. This is more optimistic than the manual's noted traditional calculation of the mean of each drawdown's % of previous equity. I actually think I'd prefer the more pessimistic, front-of-the-equity-curve-weighted, traditional calculation... In any case, can drawdown stats (mean, etc.) be added to the report?

2) There is posting above re. not calculating a DD% from the equity / balance peak. Yet, this information is available and could be easily computed, understanding the limit of accuracy due to randomness. Perhaps we could not mix apples and oranges, and keep the existing % as a measure of performance, while adding a maximum (and other stats) % of previous balance as a further, random-qualified measure of risk/ulcer/whatever?

3) Why not incorporate CR in this? Your 200% example above would change dramatically if CR were included...

4) The above relates to "average drawdown", but doesn't really define "an average drawdown"; and doesn't address likelihood of large or maximum drawdown early in strategy execution when equity hasn't built to sustain it. I understand your not trivial comment, but you evidently have either calculations of some kind or gut feel, as you've made statements about what is unlikely. Could you please share what you have in some kind of useful form(s)? For example, "it's <10% probable that drawdown will occur such that 80% of CR is consumed". And, "for those with 25% of CR Risk tolerance, it's >90% probable that drawdowns will not occur that exceed this".

Thanks.

Re: Performance report: missing max drawdown in %! [Re: DdlV] #435627
01/09/14 19:09
01/09/14 19:09
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
For the performance report figures we have to look at the standards set by other platforms, and at what people normally expect. We can't display strange parameters that no one else could use or understand, even when they are easy to calculate. What would you do with that 200% DD figure and why would you want more weight on the first part of the simulation? Also, many slightly different variants of the same parameter, such as the annual return, would be more confusing than helpful. If you feel that you personally need some additional parameter, you're free to calculate it in your script in the exit run.

That said, I agree that more info about drawdowns would certainly be useful. A parameter provided by some platforms is R2, which informs about how drawdowns fluctuate. I'll put that on our list, and I'am certainly open for other suggestions when the parameter has at least some rational basis.

As to why we don't use CR for a drawdown percentage, well, it would then always be about 100%, because CR basically _is_ the drawdown (aside from the margin).

Re: Performance report: missing max drawdown in %! [Re: jcl] #435638
01/10/14 05:10
01/10/14 05:10
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl.

Aside from the bedside manner issues (which are hopefully language based laugh ), yes and no. Zorro already follows or not as it sees fit standards and what people normally expect. I can't code what I want in the Z strategies, which if you'll recall is what started this thread. What people can understand and what they choose to use are 2 separate issues. I agree with the concerns about report growth and confusion. But different things are important and meaningful to different people, and hopefully your users on this forum are important. Traditional ways of leaving unilateral decisions and providing reporting variety include report writers (probably overkill for Zorro), and report options (possibly via ini settings, for example which drawdown calc to use - Tradition or Zorro).

Thank you for adding more info about drawdowns to the list.

I wouldn't do anything with the 200% DD figure per se. I was pointing out that if your example started out with CR rather than 0, the 200% goes way down... I realize that CR ~= DDmax, but DDmax only causes margin call if it happens at the beginning of the strategy (assuming the striven-for monotonically increasing equity curve). That, Traditional DD calc, etc. are in the same vein as the unanswered probability question and acidburn's concern - finding some basic, solid understanding of the Risk Management going on here, esp. with the Z strategies. You say it's unlikely that DDmax will happen at strategy start, and supposedly back that up by running strategies internally starting with CR (although there's been no evidence published of that, despite requests). Questions:

1) How unlikely? How is this likelihood determined, exactly?

2) How does a given individual's Risk tolerance factor in? You may be comfortable going with CR and possibly losing it all in 1 account - it may not be your personal funds. But out here in the user community, we're not. We need to know how to identify and manage that Risk.

3) While it may be unlikely (whatever that means) on an individual basis, as more and more people use Zorro, isn't it more and more likely that some poor soul is going to experience it and get totally wiped out?

4) You watch for this manually, but isn't that just the opposite of what Zorro should do? Shouldn't Zorro - at least the Z strategies - have a fail-safe circuit breaker that aborts the strategy if DD > x% * CR?

Thanks.

Re: Performance report: missing max drawdown in %! [Re: DdlV] #435641
01/10/14 07:54
01/10/14 07:54
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
1) You can estimate the likeliness of DDmax right at start as roughly (0.5 * length of DDMax) / (Simulation time).

2) Hard to answer - there is no simple formula.

3) This is almost certain. No matter how profitable a strategy is, at some day there will be a drawdown that exceeds the DDmax of the simulation.

4) When I think about it, yes, this could make sense, maybe as another flag in the .ini file. But the phantom flag is a better method, as it stops losing components much earlier.

Re: Performance report: missing max drawdown in %! [Re: jcl] #435647
01/10/14 09:05
01/10/14 09:05
Joined: Jul 2013
Posts: 110
B
bfleming Offline
Member
bfleming  Offline
Member
B

Joined: Jul 2013
Posts: 110
jcl, I get what you're saying.

When you run a test on Zorro it gives you the $DD as the biggest $ drop. So when you're running the same system live, you can expect the same absolute $ drop, regardless of starting capital or balance. % doesn't matter.

So, for example, I'm running Z12 on $50K demo account with Margin = 100, Risk = 25. The test results show:

Max drawdown -5148$ 9% (MAE -6948$ 12%)
Capital required 8017$

But capital, as we know, is irrelevant to the equation. What matters is that so far my demo has had an actual DD$ of -3386, which is still well within the historically largest DD. So I can consider the system to be performing within its expectations.

This also explains you're approach of trading a system with Zorro's stated minimum CR and considering it expired when the capital is gone. Makes sense to me.

I think it's simply a question of analytics. That is, myfxbook shows DD as % drop in balance. It doesn't show absolute DD$, I had to calculate it from peak balance to equity valley using a calculator (no big deal, but extra steps for the lazy haha). (BTW, I didn't see where mxfxbook shows DD as % of profits.)

It would be a helpful addition to Zorro to also have DD as % of balance, which necessarily has to include starting capital into the equation. That is:

Let's take your example of the first trade winning $10 and the second trade losing $20, but with a starting capital of $100. Your balance after the first trade is $110 and after the second trade, $90, giving you a max DD of 18% ($20/$110), not 200%.

This 18% calculation isn't actually necessary for understanding the expected DD, as we saw above, but for easy comparison to analytical tools such as myfxbook it would be helpful.

By the same token, it would be helpful to have, for example, a starting capital slider for the Z systems so as not to have to do successive tests with different margin settings.

It's just a matter of looking at the same thing from different angles.

(BTW, for sake of comparison, let's look at the above example with DD as % of profits. Again, we start with $100 and the first trade wins $10 and the second losses $20, and all subsequent trades are winners. For convenience's sake let's say there are 98 subsequent winning trades, all winning $10. This gives us a final profit of $970 (99 winners - 1 loser = (99 x $10) - (1 x $20) = $970) and a drawdown of 2% ($20/$970). It's this figure that's misleading to people I think.)

Re: Performance report: missing max drawdown in %! [Re: bfleming] #435661
01/10/14 12:17
01/10/14 12:17
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Adding the start capital would not solve the basic problem: It is not possible to predict when a drawdown happens, and therefore also not possible to express projected drawdown as a percentage of the current balance.

Consider this: any strategy encounters DDmax at some random point in the simulation. If right at the start, your balance DD would be 100%, because you just used DDmax for your start capital. If it happened at the end, the balance DD would be maybe 10%. So you would get with the same strategy a balance DD between 10% and 100%, dependent on the simulation start date. This % value would tell you nothing about what you should do when you're getting a real drawdown of say 30% of your current balance.

What you could theoretically do is using a linear balance curve and calculating the balance DD at any point of the curve. So it would start with 100% and end with 10%, and if your current drawdown exceeds the percentage at the current point of the curve, you should pull out. But that would be just a complicated equivalent of simply pulling out when the real drawdown in $ or pips exceeds the predicted drawdown.

The problem with a capital slider is that the margin/capital relation is normally nonlinear, due lot granularity and trade skipping. So you can easily calculate the capital from a given margin, but you can not directly calculate the margin from a given capital.

Re: Performance report: missing max drawdown in %! [Re: jcl] #435662
01/10/14 12:29
01/10/14 12:29
Joined: Jul 2013
Posts: 110
B
bfleming Offline
Member
bfleming  Offline
Member
B

Joined: Jul 2013
Posts: 110
Got it, makes perfect sense to me. Easier just to break out the ol' calculator wink

Re: Performance report: missing max drawdown in %! [Re: bfleming] #435694
01/10/14 21:42
01/10/14 21:42
Joined: Aug 2013
Posts: 124
D
DMB Offline
Member
DMB  Offline
Member
D

Joined: Aug 2013
Posts: 124
@bfleming - For question (2) above, it was suggested that if the CR is an expected future drawdown event, than that amount should represent the portion of your account you are willing to lose. E.g. CR is $10k and you are willing to lose 20% of your account in drawdown. Then your account balance should be $10k / 20% = $50k. Of course this 'dilutes' the expected return to 1/5th as well. So your 200% return on CR is really 40% of $50k. And that is the backtest prediction, not real life. Sobering!

Re: Performance report: missing max drawdown in %! [Re: DMB] #435745
01/13/14 08:23
01/13/14 08:23
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl, bfleming, DMB.

jcl, re. 1), it seems you're saying the probability is linear? If DDmax is equally likely to start during any bar in the Test, why wouldn't that be 1 / ((Test period) - (length of DDMax))? Of course, all this changes using the traditional calc and early term focus...

Re. 2), a few things:

From 1) there's an idea of the probability of DDmax. However, I still prefer the traditional calc since the focus here is on Risk and not being blown out of the water by an early margin call.

From the R2 you mentioned there's a better idea of the drawdowns profile. From this we might be able to get a better idea of the strategy's danger zone?

And from that either at least a comfort zone and what to watch for (manually), or (better) some way to automatically monitor the strategy's execution & drawdown.

In reflecting further I think there may be a language issue regarding "safe". The manual says CR is the amount to safely trade the strategy. However, is 100% loss really called "safe"? It seems CR is the amount needed to (hopefully) just barely survive the low-probability worst-case scenario, at least as far as the strategy's Test results show. And it can be worse than all the math and stats, once the real world takes over. frown

And there are obviously more than 1 of us who think "safe" means maximum loss is quite a bit less than 100%...

Which leads to 3): If it's certain someone(s) will get wiped out, say so clearly; and say how best to protect oneself. Don't use words like "safe"!

And 4): Regardless of how good the phantom flag is, it seems to me there should be an overriding fail-safe circuit breaker, possibly user-configurable via .ini, that will stop the strategy if drawdown exceeds a certain value. If the phantom flag works as advertised (and is used), this would never be hit - but if not, it'd sure be good to have...

Thanks.

Page 4 of 8 1 2 3 4 5 6 7 8

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1