| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Zorro https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=921 |
Page 3 of 12 |
| Author: | jcl [ Tue Nov 06, 2012 2:50 pm ] |
| Post subject: | Re: Zorro |
Profit = gross win - gross loss Profit factor = gross win / gross loss Annual return = annual profit / capital Capital = normalized max drawdown + max margin Sharpe ratio = profit% per bar mean / stddev, annualized That are the basic performance parameters. |
|
| Author: | garyfritz [ Tue Nov 06, 2012 5:10 pm ] |
| Post subject: | Re: Zorro |
gross win & gross loss for what? 0.1 lot? Though since everything else is scaled by gross win / gross loss, I guess it may not be an issue. So you define "capital" to be the minimum amount it would take to trade the account. Reasonable, if a bit optimistic. (Nobody knows ahead of time how much they'll need because they don't know what the drawdown will be.) The biggest problem I have with this approach is that it totally ignores position sizing -- which can have a huge impact on real results, and on system design. Assuming you use sensible risk-based position sizing, an approach that makes 10,000 pips per year but risks 500 pips per trade will have entirely different different results than an approach that makes 10,000 pips but risks 50 per trade. You wouldn't see that difference if you only look at gross win and gross loss. (Though in this example it would probably show up in max drawdown.) You might want to consider that in your system design, trying to find a better entry for the first system so you don't need to run with such a huge stop. |
|
| Author: | jcl [ Tue Nov 06, 2012 5:40 pm ] |
| Post subject: | Re: Zorro |
Yes, the lot size is not an issue as it affects profit and drawdown likewise and thus does not appear in the final performance parameters. Measuring the quality of a strategy can obviously not be dependent on a lot size. Capital is defined as the minimum amount to trade the strategy. You're right that nobody can predict future drawdown; but you nevertheless need quantitative parameters when you develop a trade algorithm. The problem that you have seems to arise from confusing two different concepts. When you create a trade system, you first develop the strategy algorithm. Position sizing is not only irrelevant here - it would in fact lead to wrong results. The goal is not to optimize your position sizing. It is optimizing the algorithm performance and robustness. Normally the lot size plays no role here, unless your strategy is a martingale system or something like that. If the strategy is ready, then you add money management. Then you use Kelly factors or - in the case of Zorro - Optimal-F for position sizing. Optimal-F is not calculated from drawdown alone, but from the whole equity curve. This is however an entirely different process. It is not really a part of strategy development, because once you have a money management concept, it's normally the same for all your strategies. I hope this illustrates more clearly how we understand strategy development and performance parameters. |
|
| Author: | garyfritz [ Tue Nov 06, 2012 7:22 pm ] |
| Post subject: | Re: Zorro |
I understand very well the distinction between system design vs. position sizing. I'm just saying that you ignore an important aspect if you don't consider position sizing at all. Going back to my example -- same profit, vastly different risk. I guess you're saying that if the two systems have same profit and same drawdowns, then you don't care about the sizing. The second system could take much bigger positions based on its smaller risk size, but then that increases your drawdown too. |
|
| Author: | jcl [ Tue Nov 06, 2012 7:59 pm ] |
| Post subject: | Re: Zorro |
When the drawdown of the second system is 10 times smaller than the drawdown of the first system, but the profit is the same, then the second system has obviously a ten times higher annual return - no matter if you invest 50 pips or 500 pips per trade. If both drawdowns however are the same, then both systems have the same performance - again no matter how much you invest. You achieve the second system performance with 1/10 the margin, but must provide accordingly more capital for covering the drawdown. The return on capital is the same for both systems. |
|
| Author: | parrondo [ Thu Nov 08, 2012 4:11 pm ] |
| Post subject: | Re: Zorro |
jcl, Congratulation for your excelent platform. About minimum capital to trade one strategy, if we consider only past performance and included walk forward optimization then it is necessary to take into account not max. drawdown (defined as consolidated or closed) but Maximum Adverse Excursion (MAE, also provided by Zorro). That is, minimum required capital = MAE + Margin As theoretical concept for strategy performance, this minimum required capital is a right concept and good data. Obviously all of us know we should add a safe factor to the left side of this equality (that is, an aditional amount of capital) to be tradeable in real accounts. Again, congratulation to you and zorro team for this altruistic initiative and very comprehensive theory and tools for strategy development and trading. Edit: OK forget this post. Capital is perfectly coherent with your max. DD definition (well, do not forget my congratulations! http://manual.zorro-trader.com/performance.htm |
|
| Author: | falsedave [ Sun Nov 18, 2012 2:10 pm ] |
| Post subject: | Re: Zorro |
Been looking into Zorro for a while now. Although I have to say without much success. I thought this would be a great tool for testing out ideas for entry's and exits, but i'm having a great deal of trouble learning the language. I've learnt to code in MQL and found that i could use Print() and Alert() statements to debug my code give me feedback and find out what value a variable is at a certain point in time. With Zorro I dont seem to be able to do this. Its probably something I'm doing wrong somewhere. How does everyone else do it ? Below is a script I have been trying to write to trade TMAslope > 0.4 and TMASlope < -0.4. Code: Select all I think CalculateSlope is always returning 0.0 but I cant test to be sure. Anyhelp would be great. Dave |
|
| Author: | jcl [ Sun Nov 18, 2012 5:18 pm ] |
| Post subject: | Re: Zorro |
The lite-C debugger is not yet implemented in the current Zorro version. So you need to print your variables for debugging, just as with Empty4. I'm aware that this is no professional debugging method, but it will have to do for the moment. For printing a variable to the message window, use the printf function. In your case, it would look like this: printf("#\nCalculateSlope: %f",CalculateSlope(0)); or printf("#\nBollocks %f",gadblSlope); And by the way, isn't a TMA just a double SMA? function TMA(var *data,int period) { return SMA(series(SMA(data,period),period)); } |
|
| Author: | jcl [ Sun Nov 18, 2012 5:22 pm ] |
| Post subject: | Re: Zorro |
Here is an example of a simple MQL4 EA, and the same EA in Zorro lite-C. MQL4: Code: Select all Code: Select all |
|
| Author: | garyfritz [ Sun Nov 18, 2012 5:46 pm ] |
| Post subject: | Re: Zorro |
Dave, I think you have a logic error. You call calcTMATrue(shift) and calcPrevTrue(shift). But calcTMATrue starts with a zero sum and sums up jnx=0 (so you start on bar inx) to 20 with an initial weight of 21 on the jnx=0 bar. Then calcPrevTrue starts with a sum starting on the inx bar with a weight of 20. The prev TMA shouldn't include bar inx. I would calculate it as (calcTMATrue(shift) - calcTMATrue(shift+1)) / ATRvalue. That way you know you're using the same logic in the current and previous TMA, and you don't need calcPrevTrue at all. |
|
| All times are UTC | Page 3 of 12 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|