I think you might be right about that, but I will have to look at it further. For now I will approach it experimentally to see how it might work in practice then dust off some old stats books and look at the theory.
Can I post excel here?
I think you might be right about that, but I will have to look at it further. For now I will approach it experimentally to see how it might work in practice then dust off some old stats books and look at the theory.
Can I post excel here?
My own perspective on “Martingales” and related position-sizing (and I hope it isn’t unwelcome :8: ) …
Either a method has a genuine edge (net positive expectation) or it doesn’t.
If it does, then it doesn’t need any kind of Martingale position-sizing: it will grow its account most safely (with least risk-exposure) by gradually increasing the stakes in accordance with the account-size.
If it doesn’t, then it isn’t possible to give it an edge by varying the position-size according to previous results, and what’s needed is a new method, not new staking.
Each trade one enters should have a position-size in accordance with its proven edge, your account capital, your degree of risk aversion, and all the normal position-sizing factors.
There’s no logic at all in deciding how much to risk in accordance with what the results of its immediately preceeding trade(s) happened to be: that’s just the “gambler’s fallacy” again, in a different guise.
Systems that don’t have a genuine edge shouldn’t be traded at all. They won’t acquire one by [U]increasing[/U] the risk when [U]losing[/U]. One thing is certain: escalating the stakes during a losing run is eventually going to be a sure-fire way to the poor-house.
I understand your point. But I would say it comes from a very definite philosophy or your approach to trading. There are a number of Funds that apply statistical methods (not necessarily martingale) to exploit market opportunities that would not conform to your approach but non the less work. Finding the net positive expectation in this case is where i’m trying to go with the research, the problem is there are too many moving parts involved to start with the statistical theory and move on to implementation.
I would have to narrow the field by finding something that seems to work then try to understand fundamentally in first principles stats theory why is should work or what the pitfalls might be or how I could tweak it.
Gamblers fallacy is most sure relevant here, but not strictly because that assumes an non absorbing markov chain with infinite states. If i place an absorbing barrier on end by taking profit after a distinct number of wins, or limiting my trades from say 12,000 continuous trades in 6 months then the maths starts to look different. It’s quite complex and I think my time would be more efficiently used finding the result by experiment then trying to understand it.
Fair enough - I’ll certainly plead guilty to having a mathematical/statistical approach and acknowledge that not everyone does (although I believe, myself, that almost everyone [I]profitable in the long term[/I] does - whether they actually call it that or not).
I’d say they all do. All the serious ones, anyway? As far as I know?
We might disagree there: I don’t believe there are [B][U]any[/U][/B] long-term profitable ones that [U]increase[/U] the position-sizes when [U]losing[/U]!
If you can show me one, then I’ll happily and openly admit to being mistaken … but really, that would make [I]no[/I] sense, at all, so please excuse my mentioning that I’m not exactly holding my breath.
With apologies, you lost me, there. Either the system/method has an overall edge at level stakes or it doesn’t. If it doesn’t, you can’t import one into it by increasing the position-size during a losing run. This is simply factual. It’s objective and mathematically provable. However complicated the method is, one has to test it and know confidently that it has an edge - nobody should be trading with real money (non-demo) a system that doesn’t have a proven edge? But if it does, then its appropriate position-sizing can be worked out fairly easily?
The “gambler’s fallacy” has absolutely nothing to do with Markov chains at all.
An understanding of Markov chains is [I][U]not[/U][/I] needed to work out whether a system has an edge or to derive its appropriate position-sizing according to one’s own risk comfort-level/aversion-level.
I wish you well with it.
Thank you for your reply. And I don’t mean to be rude but doing basic math to determine net expectation on a trading system is not what i would consider having a “mathematical/statistical approach” that is just common sense computing that forms a basic part of building any trading approach.
And no not trading philosophy either unfortunately. There are hundreds and thousands of funds and investors with different approaches “Philosophies” to trading e.g. George Soros only takes short positions and has built his career around that unique approach, for whatever reason he decided upon it in the first place; in which case you could go to him with the most brilliant long trading idea and he would decline because it was not in line with the philosophy of his fund.
You seem to come with the impression that there is one way to trade, your way and that everybody else is stupid.
Position sizing losing trades if you read my earlier comment is not a good idea, because you’re doubling down on a strategy not appropriate for the market conditions; wrong headed, that is the whole point of randomizing the process and even that doesn’t give you complete independence as I have noticed a cluster of fails around particular periods - so what is the level of independence and how can you build that into your calculations and the model: complexity.
Apples and oranges. You simply can’t see beyond your own style of trading. And gamblers fallacy can absolutely fit within the framework of a markov chain stochastic process (and I was trying to be kind to your other reply also in giving that any weight). Thank you for lecturing the Actuarial Science major on basic stochastic processes.
Thanks for the wishes of luck in investigating a new trading technique. We’ll see how it goes.
I could really use your help. Based on the information I have provided so far, would you be able to tell me what the basic net expectations are as a starting point, for clarity:
65 trading days
10 ~ 13 currency pairs (say 13 )
2 % average blowout rate if selecting a day and pair at random
1:20 reward risk
if you need any more data i’ll provide it
Not easy to forsee that someone asking about a Martingale-based system is going to be an Actuarial Science major, but we live and learn. For the record, I apologise for not knowing and/or misreading your mathematical awareness level. I have Asperger’s syndrome and am probably [I]particularly[/I] poor at estimating things like that (and other stuff, too) about people, from what they post; sorry.
I struggled to offer it (and stay tactful) here, here, here, here, and here, and in several other threads, too … but you dismissed some of it with observations like “That’s silly”.
I won’t dignify that one with a reply.
Sorry - evidently we don’t really speak the same language, and I think you’ll get more useful help from someone who does. You’re obviously way out of my league. :8:
I wrote a Martingale simulator. The odds are the odds. Using incremental increases on the next position will tune you more quickly to the odds. Not using incremental increases causes a distortion in the gain of the account. You can see the difference in the two pics…
The first pic uses a 10 level 125% increase… for 5000 rounds
The second turns off the increases so your next bet is 1.00 and you can see the wave in the gain of the account, but the odds are still the odds.
Anyone who wants to play with the simulator email me I can send it to you.
I didn’t mean to lash out at you, thank you for the opinion, it is what i asked for, it is just a raw idea and may prove not to have any legs.
My system survived long periods in testing up to 2 years making good profit But I couldnt find a way to get out of the last trade with a profit.
I found this article about the subject:
Statistical Verification of the Labouchere Money Management System - MQL4 Articles
I didn’t have time to read it but maybe you find some answers
Thanks for the feedback, I read through the article and the research was very informative and provides a good format for doing my own more thoroughly. The results he mentioned are largely what I have noticed on my strategy tests, although the Expected Value varies quite substantially depending on currency pair and the number of levels you choose.
USDCHF is the best so far. It has the lowest blowout prob, highest and consistently positive EV with multiple 10k test simulations in excel.
I can blow out zero, once, twice or three times and still remain profitable at the end of the 65 day period with 65%, 44%, 23% and 2% return respectively (where a blowout = 20% loss). The probability of that happening from the Excel simulation is roughly 95% so far. assuming no computing errors.
Anyway I’m inpatient so started testing it real time in the demo and the results so far is 8% return in 6 active trading days.
The only problem is the inevitable blowout, and managing the risk around that event.
I like the idea of using the system because 98% of the time i can comfortably trade each day hassle free and be sure to achieve circa 1% return (the blowout rate is a 20% loss). I would like to see how I could hybridize this to play a more active role in managing the risk when the 2% events occur.
From the anecdotal evidence avoiding high volatility periods including the news release on USD & CHF and ranging markets with a low ATR seem to improve the odds further (higher EV) but I haven’t researched it extensively enough to formalize a trading plan around that.
Why do you test in excel and not on MT4? You can also live trade on a demo.
How is your system performing without the martingale? Does it have an edge? Did you consider to scale in on a winning position like reverse martingale?
Thanks for the post. It has positive EV for USDCHF without a martingale, but mostly negative with other pairs. I used excel to replicate the conditions when I was trying to work out/improve the probabilities.
I haven’t tried a reverse martingale yet no, but I have introduce a trailing stop which disproportionately cut out down my losing positions and increased my overall strike rate to circa 45% (from 30%) the net effect of this on MT4 strategy test was to increase the time to blowout to roughly 2000 trades (13 steps) across all currency pairs.
Brief update.
Three options to improve the EA to achieve +ve on all pairs.
1 - Improve the strike rate to be consistently above the equilibrium value of 28.57%
2 - Improve the probability of wining after having lost in some way
3 - Make the transitions through the levels up and down so I increase and decrease the risk according to the performance of each trade e.g. go from level 5 back down to level 3 before continuing.
Possible Solutions:
1 - (Indicators): Indicators are generally useless when trying to identify entry and exit points on the price action because they simply confirm or re-organise and represent what is happening in the price action.
However, they can add some value in the EA for telling me what is happening in the performance of the EA, information That I would otherwise not have access to. Example, if I place multiple sequential random trades and take the average strike rate in the last 20 trades as equivalent to the current currency price; I would be able to monitor the relative strike rate performance.
With a binary set of -1 (lose) and +1 (wins) trading data from randomly generated trades I can use that information to work out the strike rate over the last 20 trades and feed that information into the formula for a Stochastic Oscillator to give me the equivalent of buy signal (Price Action to Performance) get in/Switch On or sell signal (Price Action to Performance) go short/Switch Off.
Preliminary tests have benn feedback: recording 4000 random trade outcomes on USDCHF as (-1,1), using this approach I have been able to consistently select buy/good periods (average 50% strike rate) and sell/bad periods (average 10% strike rate).
Still more work to be done but i’m sure this will work. I would subsequently be able to run the EA on multiple pairs simultaneously (trade 0.01 lot size and record/no martingale) and cream off the good periods on each to switch on the EA at the normal lotsize and with a martingale.
2 - Reduce TP distance: the martingale currently tries to recover all losses on the previous trades whilst making the equivalent profit of one successful trade at level one. The reason for the circa 28% strike rate is because the RR is configured at 1:2.5, if my RR was 1:1 my strike rate would be roughly 50% and so if I reduce the TP:SL ratio moving up the levels the probability of wining on each level increases marginally. I would have to find a way to gradually reduce the TP effectively which might even mean ultimately losing something at the final level i.e. a 10 level martingale where winning at the last level doesn’t quite recover all my previous losses.
I’m not so sure about this one, but will look at it further.
3 - Taking advantage of marginal victories (Trailing stop): the first version of the EA provided a binary win lose outcome. Among the losing trades however there were many occasions when the trade went substantially into profit before reversing to close me out at a loss.
I repeated the trades above but also decided to record the highest +ve PnL on each one to see if a trailing stop would give me any advantages. The results were quite favorable and I noticed that i introducing a trailing stop would disproportionately reduce my losing trades more than my winning ones.
I tried a simple event @ when PnL = Risk i.e RR 1:1 bring the stop loss to breakeven and this improved the EA massively. The strike rate Increased to 48% on each run in the strategy tester (which makes sense since small profits around breakeven count as wins) and increased the time to blowout massively, making GBPUSD & USDJPY & AUDUSD now more consistently profitable over the 6 month period.
What I would like to do is take it further and start trailing from breakeven as a trade moves further into profit. Locking in more profit in this way will have the effect of reducing the accumulated loss at that level (step) so that I can reduce the risk on the next trade to recover the marginally reduced accumulated loss at that level. This has worked anecdotally on the live demo test and I have seen the martingale jump down from level 7 to level 5 due to the marginal profits made on a previous trade.
So believe taking advantage of the marginal favorable moves could help deescalate my risk on the martingale and the prob of hitting the maximum level.
Options 2 & 3 working very well. Consistently make money using a 10 step martingale with circa 1 ~ 2% return per day.
Given that reaching level 10 in this case means a 20% loss. So far have been able to reach 20% return without incident on 13 currency pairs. I don’t think the long run EV has changed much with the manipulation but what is clear is that the expected time to reach level 10 or any other level for that matter has massively increased.
Option 1 turned out to be a false flag. The stochastic Oscillator whilst telling me what was happening, much like on price action has little predictive ability to move me above the equilibrium strike rate as a standalone, but did improve the strike rate marginally.
USDCHF still the best. Working with a 100k account, 10 step martingale max loss on each blowout @ 20%: 7 times out of 10 the account reaches a profit of 300k+ in 8 months. on the other 3 out of ten the account reaches at least 70%+ return before catastrophe.
The other pairs have more modest overall profit expectation and profit before blowout returns. What is clear is that I can comfortably achieve at least 20% return before any major concerns.
The thing to do to create sustainable edge here is to identify the most an least appropriate market conditions for the random trade generation, my guess would be strong trending markets; or ranging markets with a high ATR. the Stochastic Oscillator can be useful here, if I also record market features like volatility, ATR and other typically market type determinants (describers) and superimpose the performance measure of the SO to the identify the most suitable market conditions.
I think a hybridized money and trade management might work best, at least until one can identify sustainable +ve EV market conditions.
started last week with the unfinished EA the results were good. Earlier this week I made some losses, thankfully didn’t hit the max martingale Level but there were some issues with my software which needed to be corrected.
This week have traded 2 days today and yesterday. Today was quite a scare because i got as high as step 9 on a 10 step martingale. But the results were still good with 11.2% return in those 2 days.
4% yesterday, circa 7% today. will test again next week on the non news release days if I have time. Have a lot work to do on the EA and the fundamental approach behind it; to identify +EV trading periods and reduce the likely blowout rate
Maybe i’ve been a little too quick to dismiss the effectiveness of the Stochastic Oscillator on the strike rate.
on an RR of 1:2.5 the equilibrium strike rate is 28.57%, if I can consistently win trades above that rate then +EV is assured and my system has an ‘Edge’.
Taking the strike rate for the last 20 random trades and feeding the data into a Stochastic Oscillator as an indirect ‘Good Market Conditions’ signal. The following trigger seems to have a reasonable effect:
on GBPUSD the strike rate improves from 27.61% to 31.89% and on USDCHF from 28.96% to 32.78%; Marginal improvement but non the less above the equilibrium value.
[B]Layered Stochastic[/B]
If I take the first SO on the strike rate (SO1), it gives me one of two signals (Good,Bad). Now if it gave me Good and the actual trade outcome was a Loss or gave me Bad and the actual trade outcome was a Win I can record this on a second SO (S02) as a Loss, conversely if it gave me Good and trade outcome was a Win or a Bad and the trade outcome was a Loss, I can record this as a Win.
If I use this second win lose data to feed into another stochastic (SO2 of SO1), then I might be able to track the performance of my indicator SO1.
The idea would to only take advice from my indicator SO1 (when it indicates good market conditions), when its predictive ability is also demonstrably more reliable.
SO2 on SO1 with a trigger being:
If I only get in on a trade when SO2 & SO1 converge to both say yes then the strike rate improves to 66.66%. But with a sequence of 5,600 trades on GBPUSD I only got 15 trading signals with 10 Wins and 5 Losses, so i’m not so sure how reliable that improvement is.
I will have to test it among 25 or so pairs to see in the improvement in strike rate is consistent or just an error due to low data. If it proves to be accurate and not a computing or other error than I think in conjuction with a Martingale would form the basis of a good MM tool that could be applied to multiple strategies across multiple pairs to increase the number of trade signals
Results in SO2 on SO1 for 10 pairs Jan 4 2016 to Sept 3 2016
Okay so the last results were promising but I think I’m getting ahead of myself.
I want to find Indicator 1 (I1) that predicts if the market conditions are good for my system for above equilibrium Strike Rate and Indicator 2 that tracks the performance of I1 and lets me know effectively if I should trust its advice. I started I1 & I2 using 2 Stochastic Oscillators and randomly changing the Trigger criteria to see what worked best.
What I really ought to do is record the strike rates and feed that data into the formula for all the trend indicators and oscillators and systematically identify the correlation between the probability of wining the current trade and each variable in the respective indicator or oscillator (for Indicator 1) and similar for I2.
Once I have the correlations I can select variables with the highest impact and feed them into a multiple linear regression model to find how they interact to determine the likely strike rate/Win Rate for the current trade (for Indicator 1).
So for I1 for example I might look at the correlation between the absolute value of the last 20 strike rate (SR) to the probability of winning on the current trade, or the absolute %K reading on a Stochastic Oscillator, %D “…”,%K(1) - %K(0),%K - %D, SR - MAofSR etc…
So I will take 18 currency pairs and break them down as follows:
6 Pairs: Training Set: The data from these pairs will form the basis of the initial correlation model
6 Pairs: Validation Set: I will test and improve the correlation model using this data
6 Pairs: Test Set: Will test the modified model on completely new data to see if the results stick.
The Training Set is:
Altogether the win lose sequencing gave me circa 51,000 trades to work with, from 4th Jan - 2nd Sept 2016.
Starting the correlation model with the simplest variable - the strike rate (SR) in the last 20.
There were multiple readings for 0% SR in the last 20 but the highest was only 75%, funny how that works in what should be a completely random system; I think it might have something to do with the spread which changes the R:R balance in the distance traveled to win versus the distance traveled to lose.
Y-AXIS (%Wins) || X-AXIS (Last 20 SR): I was expecting a horizontal (0 correlation) line here but the results were surprising; positive correlation, going from 55% SR to 75% SR the probability of wining the current trade was consistently above 30% and sloping up.
Okay so, I should really fit the model properly and then move on to the next variable, but I couldn’t help but write a quick EA to test it.
The EA enters 0.01 Lot trades at random with an R:R 1:2.5 with the recorded outcomes Win, Lose (1,-1). After 20 records start calculating the SR for the last 20 trades, if the 0.55 <= SR < 0.8 then on the current trade increase the Lot Size from 0.01 to 10 Lots (risking 0.71% of account balance per Trade).
Note: I should spread the risk to multiple currency pairs to increase the trade count so that the results tend to the true mean.
Results from 4th Jan - 2nd Sept 2016
USDCHF || 4,495 Trades || -£12,977
GBPUSD || 11,981 Trades || +£41,168
EURUSD || 15,756 Trades || +£41,168 (The same: odd)
USDJPY || 9,743 Trades || +£30,026
USDCAD || 10,147 Trades || +£3,582
AUDUSD || 4,723 Trades || +£10,376
EURGBP || 5,419 Trades || -£14,202
EURAUD || 23,041 Trades (High?) || -£8,332
EURCHF || 4,354 Trades || -£4,349
EURJPY || 12,171 Trades || £32,941
Total = £119,384. Initial account balance was £100,000 (roughly 0.71% risk per trade).
The last 20 SR seems to be a good indicator for future performance to produce a win rate above the equilibrium value for +EV, there are still many other variables to process and I am quite surprised that this appears to work on something as straightforward as that.
(I suppose this could be gamblers fallacy operating in reverse i.e. for a high consecutive win count - and I suppose it does make make sense in common sense terms of getting in when the recent performance is higher)
Should have really recorded the lowest account balance to get a better idea of the downside risk and other stuff, but it was just a quick test to see if the results make any sense in reality; though the absolute draw-down was consistently low and especially tight for the pairs that ultimately lost.
If anybody is interested please help me test the results too just to make sure I haven’t made a computing error somewhere.
Simple 20 SR Random.zip (11.6 KB)
Okay so…