Statistics of a anti-grid like system - page 2

 

Hi,

Elroch, it is nice to have some mathementician on board, even i passed the advanced statistics course, i am not that good at.

Crucially, in "martingale" systems, you are generally either using tiny leverage for some trades (and failing to exploit them effectively) or way more than the Kelly criterion would give you as an absolute maximum position size on other trades, and typically both on different trades.

The main problem for me in margingale systems is that your used leverages (and the risked amount of money for each trades) is rapidly increasing while your profit target is constant low. This of course give you a negative expectation in the long run. (If you are trading randomly)-

The problem i have in analysing my current system is that if you only look at the net leverage it is always nicely low and gets only increased if previous orders are already in profit. In theory my system will automatically adjust the used leverage for each direction in a way that it will be higher in the current direction. No matter what direction. This is the main point of this strategy because i don't care where the market is going, all indicators are lagging or giving fail signals, price does not. From my side summing up indicators with negative expectations does never give you an edge in the long run. Purely statistical systems usually look very good on the history, since they are by definition optimized on that one.

Your system uses a genuine profitable characteristic of the market - that it tends to trend. Do you agree that if the opportunities you are taking have positive expectation, you should in principle be treating all of the opportunities independently, trading each of them independently with a sensible position size (proportional to the equity in the account and using leverage depending on the estimated probabilities of different outcomes for the trade) and as a result getting a better probability distibution of the equity in your account at some point in the future?

Why should i, i don't know when a trend starts/ends and i have no way to find out. If price moves up, i increase the long leverage, if price goes down short leverage is increased. Net leverage/position size will be adjusted in my direction.

How does the margin you need escalate when you run into an unfavourable time? (you say it is not as bad as so-called martingale systems where, in their simplest form, margin doubles every time you lose a trade, but you do not specify how it does increase. Or how much capital you need)

Currently backtests show that with a 20k standart or 2k micro account you will be fine. Also if my floating loss gets higher then 10% i also close everything and give it a fresh restart, but they don't come from deep floating losses. The crazy balance chops happen in ranging phase with very specific size. (This is a point which needs to be improoved). The margin goes up, but the current risk i put in one direction is not. (which separates this system from the simple betting strategys i think)

Looking forward to hear you comment on this.

Best regards (time to work now :( )

//z

 
sorry for the color changes.
 
zzuegg:

Hi,

Elroch, it is nice to have some mathementician on board, even i passed the advanced statistics course, i am not that good at.

The main problem for me in margingale systems is that your used leverages (and the risked amount of money for each trades) is rapidly increasing while your profit target is constant low. This of course give you a negative expectation in the long run. (If you are trading randomly)-

The problem i have in analysing my current system is that if you only look at the net leverage it is always nicely low and gets only increased if previous orders are already in profit. In theory my system will automatically adjust the used leverage for each direction in a way that it will be higher in the current direction. No matter what direction. This is the main point of this strategy because i don't care where the market is going, all indicators are lagging or giving fail signals, price does not. From my side summing up indicators with negative expectations does never give you an edge in the long run. Purely statistical systems usually look very good on the history, since they are by definition optimized on that one.

Why should i, i don't know when a trend starts/ends and i have no way to find out. If price moves up, i increase the long leverage, if price goes down short leverage is increased. Net leverage/position size will be adjusted in my direction.

Currently backtests show that with a 20k standart or 2k micro account you will be fine. Also if my floating loss gets higher then 10% i also close everything and give it a fresh restart, but they don't come from deep floating losses. The crazy balance chops happen in ranging phase with very specific size. (This is a point which needs to be improoved). The margin goes up, but the current risk i put in one direction is not. (which separates this system from the simple betting strategys i think)

Looking forward to hear you comment on this.

Best regards (time to work now :( )

//z

We agree on the main problem with "martingale" systems (that the leverage is sometimes increased to very high amounts). As you indicate, if the entries have no edge, this leads surely to disaster. In fact, even with an edge martingale money management can lead to disaster with probability 1 if leverage gets too high.

With respect to your analysis, although you say you only increase leverage when you are in profit, the first graph in your post at 00:19 has a point at round 779 which gives back all of the previous profits and more, and it is clear that the leverage remained high while this was happening. I understand that you are considering ways to fix this by including putting a sort of 10% stop loss on the trading system. While this will certainly help avoid disaster it is not, I believe, the best solution.

My point about the trade sizing is a difficult one which I need to explain better. In brief, a money management system combined with a trading system will produce a certain distribution of possible equity at some time in the future (picture a bell-shaped curve centred near the expected return - the x-axis is the return, the y-axis is the probability). It is a mathematical fact that if you want an optimum combination of high expected return and low uncertainty (width of the bell-shaped curve), you need to use similar leverage for similar opportunities. Using highly variable leverage will either significantly increase the uncertainty in the return or significantly decrease the average expectation, or both. This is not intuitively obvious, and the only reason I accept it myself is that I have studied the mathematics of it in detail and understand the proof of this fact. It is worth remarking that the probability distribution of the returns for a system that uses highly variable position sizing can be very far from a bell-shaped curve. Often you will have something like a nice bell-shaped curve but with an extra peak way to the left of the bell-shaped curve which corresponds to the small number of times the leverage escalates to a level where it cannot be sustained. The fact that such events can be quite rare causes people to ignore them, but they add a very large amount to the standard deviation in the return and, in practical terms, indicate a significant chance of getting a bad outcome over the chosen period.

I understand exactly how you are thinking when you say that "currently backtests show that with ... you will be fine" - I have thought the same myself. But, even if they are performed on clean data that has not been used in any way to generate the system rules, backtests merely offer evidence. In the most common case, a backtest gives a single sample of the return of the method over a certain period. A single sample does not tell you everything about the distribution of the return, especially when you take into account the selection bias: if you get a very bad result from a backtest, you are likely to discard that system and work with another one. If a system would give bad results over a testing period some of the time, a backtest that gives good results tells you nothing about these (it merely indicates it is not one of those times).

It is not possible for me to go into all of the details of this here, but I am currently working on the first of a series of articles that will justify these claims and describe the money management rules that exploit any set of trading opportunities in the way that produces the very best results (in a precisely defined way).

 

With respect to your analysis, although you say you only increase leverage when you are in profit, the first graph in your post at 00:19 has a point at round 779 which gives back all of the previous profits and more, and it is clear that the leverage remained high while this was happening. I understand that you are considering ways to fix this by including putting a sort of 10% stop loss on the trading system. While this will certainly help avoid disaster it is not, I believe, the best solution.

No worries, i posted this because i want to learn something an get different opinions, but from the balance graph from the tester there is no way to come to the conclusion that the system gives it's previous profit back. In fact this is not possible since all trades get's closed once the profit target of 0.5% is reached. The Balance spikes happen simply because the tester is closing one order by one and is not plotting the equity line correctly. Balance in this case does not matter at all. If you look at the true equity graph:

you can see that nowhere during the test profit was given back.

I think we disagree also on the leverage in this case, i do increase leverage also when i am negative, but the net' lotsize gets adjusted to the current direction. The used NET leverage in each direction is never more then on the first trade when the current NET position is negative. Once positive the leverage get's increased step by step as long a) the trend goes on, or b) total session profit is larger then 0.5%.

-if trend changes the profit gets locked by adjusting the NET leverage to the new direction.

You are right that if you look at the system trade by trade, you will find highly leveraged trades, but not if you take all currently open trades combined. (Buylots-Selllots). Because of that, trade by trade analysis do not work in gridlike systems.

Sure, i know about the backtest/forward test differences. But the affect of new market conditions will not affect such a grid system as much as any system based on statistic or indicators. (The used values for gridsize are not based on any historical data.) Additionally the system shows positive performance on EURJPY, EURUSD, GBPUSD, USDJPY, and EURCHF with the same settings.

All those statistical analysis are always generated on historical data, if your are applying the analysis after the system is already highly optimized you will get a total different bell-curve, a total different Risk of Ruin calculations, and for what? Statistic might look better but you system is optimized on exact this market conditions. I personally would use a system with less good statistics instead of one optimized and very good statistics.
 

ubzen, you have the freedom to disagree with mathematical facts but, with all due respect, this doesn't stop them being true.

I don't like being the bearer of what is perceived to be bad news - it's not, it's information which can be used to improve the statistical performance of any system.

I should emphasise that I am not claiming that zzuegg's system is unprofitable, or even that the profitability shown in his graphs is unrepresentative. Just that using very variable leverage is detrimental to the probability distribution of the returns over a chosen period.

It is interesting to look at some of the statistics from zzuegg's backtest. 1311 trades sounds like a lot, but it turns out to be rather a small sample. As I imagine this statement will be disagreed with, I will justify it quantitatively:

With the mean profit, average win, average loss statistics given for the 1311 trades made, the standard deviation on the returns of the trades must be no less than the standard deviation in the the case where every win is the average win and every loss is the average loss. Of course this is an unrealistic assumption - since the actual wins and losses vary greatly, the real standard deviation is certainly much higher, but I am just finding a bound on the standard deviation. With this assumption, the standard deviation of the profit on each trade is 874, which is about 20 times the average profit. With this optimistic bound on the standard deviation, for the entire sample of 1311 trades, the ratio of the profit to the standard deviation of this profit is bounded above by 1.74 (this is sqrt(1311) times the same stat for individual trades). If this were the real ratio, a statistician would be likely to take the view that the backtest was evidence for profitability over the period of the test, but not conclusive (it's within 2 standard deviations of break-even). Hence my statement that it is a small sample.

I am sure anyone could reproduce my calculation above, but more useful for zzuegg would be to repeat the calculation with a more realistic estimate of the standard deviation, where larger trades contribute much more to the standard deviation. With this more accurate calculation, the number 1.74 will be replaced by a smaller one - I am not sure how much smaller. Does everyone understand the significance of this fact?

I should say that to me, zzuegg's tests on other instruments add significant weight to the belief in the performance of his precise system. These are close to being completely independent tests (there are some correlations between instruments such as EUR and GBP).

If you have a trading system and put it into operation for a certain period with certain money management rules, you must do so based on a belief that it will be profitable. In principle what this belief should be based on is that your model of the behaviour of the market (including uncertainty in it) will lead to a range of possible results for your system at the end of the period (not a definite result unless it is a saving account :-) ). This is a probability density function for the balance of your account at the end of the period. My thesis is that in all cases, using similar leverage for trades with similar statistical properties will always allow you to improve on money management which uses highly variable leverage.

It may help to clarify my point to illustrate it in a blackboard drawing. The three curves are all probability density functions of a system with different money management over a fixed period of time. The x-axis is the profit at the end of the period.

Note that I not claiming that the probability density functions in the first two drawings are bell curves, just that they have a mean and an expectation, which I have roughly marked in a blue and red cross. Nor am I claiming that the last curve is exactly how all variable leverage profit curves are going to look. The first two curves are meant to illustrate the way in which one can reduce the uncertainty in results at a modest cost in the expectation by reducing leverage (for example reducing leverage from Kelly to half-Kelly results in a 25% lower log expectation, but a 50% reduction in the standard deviation. The second peak in the third curve is meant to represent the chance that the end of the trading period happens to occur during one of the whipsaws that occur during a period of high leverage. It could be worse - with some systems the second peak could be further to the left.

For emphasis, I would conclude that the aim of money management should be to make the expectation of the balance high and to make the uncertainty in the balance low, and that both are negatively affected by using highly variable leverage.

[Footnote: to make this even more confusing, look into utility functions, which should in principle be used to determine the value of different outcomes]

Oh, one other thing. My statement about the balance falling back was based on this graph from zzuegg's earlier post, where the blue line (account balance, I presume) makes a huge dent in the balance around the point 779.

But if the green line is equity, that's probably not a big problem (and if so, that green line is mighty impressive). But on reflection, I would have thought the green line was the balance and the blue line the equity (which is more important). Otherwise it would have to be the case that you never had a long position and had the market move down, or vice versa.

 

The equity curve from my previous post is from the same testrun. As i said, the balance curve does not matter, its the equity which does. The saw's happen since the tester closes one trade after one which of course leads to a saw'isch balance. if i would have used OrderCloseBy() instead of OrderClose, this would not happen. But it's only cosmetics since its NOT THE EQUITY

 

This are the danger zones, Ranging larger then the gridsize but not twice as large, one the price breaks out of this, the system is fine. This are also the shown saws. It keeps adding floating loss, while the NET leverage increases only slightly

 

I totally agree that it's the equity that matters - the balance is of little importance. It is a shame that the stats screen does not show equity drawdown. If this is tiny compared to your final profit, you are simply killing the market, without question.

I simply don't understand how you can manage to have no visible drop in account equity at all - surely some time when you are heavily short, the market happens to move up for a while? How much net leverage was the maximum you reached?

One question, can I presume you are not unnecessarily keeping long and short positions open at the same time?

 

On my post at 16:54 you can see the equity chart. It was logged with 7Bit's script. The redline is the maximal drawdown, which was at 28.xx percent. (Little number on the top left corner)

The Equity is also drawn incorrectly, since the chart are only plotted on OrderClose even. For that 7Bit's script was needed to keep track of the true equity performance.

One question, can I presume you are not unnecessarily keeping long and short positions open at the same time?

You are right, since i don't know/care where the price goes i need to keep both orders. (There is the possiblility to close all but the last order, but this would need to keep track of the equity/balance peaks in order to calculate the exits correctly. All this would require global variables or a separate file. Since whenever it is possible i like to be able to restore the whole trading logic from the current open trades (on a terminal restart or similar) the easiest solution was to keep all orders open. Beside that the resulting performance would not change if all calculated correctly.

Peak net lotsize was: (on the test without the stoploss feature)

5.8 for long at a balance of 38k

and -6.8 for short at a balance of 63k

More interesting would be the net lotsize at the drawdown peak. Will do that tomorrow.

 

@Elroch: I look forward to your article. I believe most of your points I dis-agree with are mathematical theories rather than facts. At one point in my life, I ate, breath, lived and walked the Kelly-Creteron and Bell-Shape curves. But human nerves and mathematics do-not wonder in the same spectrum.

So here we are with a system which have done well for the last 5-years. We're all waiting for the catastrophic nose-dive drawdown which may or may not happen. We could sit here and say stuff like; Not enough statistical samples (but no one would dare say what is enough). Because even in the static game of Blackjack, it take Millions of hands simulated to become statistically viable. Mind-You, trading is Not a static game. Imagine, how many Billions of Independent event you'll need for your numbers.

I may not be a mathematician, but I'll bet my boxers that all the statistics will become useless when this system takes the nose-dive drawdown. At that point we'll smile and say "Ah ha, I knew it was a Negative Expectancy System" and the law of the universe says you cannot turn a Negative Expectancy System into a positive one using Money Management or Lots Manipulations. But until then, I say rock on Zzuegg.

If George Soros placed a series of bad trades and went broke this year, what would we say?

A: He's been playing a Negative Expectancy Game all along or

B: He should have quit Last Year. :)

Reason: