I’ve been trying to build an EA based on a variant of the martingale. The basic idea is that I don’t want to analyse what is happening in the market and make a technical or fundamental trade decision, but rather switch on a stats based EA that builds my trading account like a high interest bearing bank account.
So the principle martingale I use has the following setup:
[ul]
[li] Trade Buy or Sell is generated by the EA at complete random
[/li][li] The stop loss is 6 pips + % of 15 minute ATR
[/li][li] Take profit is 2.5 times the stop loss
[/li][li] The martingale (Risk) grows at 1.4 times the previous risk, with a view to recoup all losses and take the originally intended profit.
[/li][li] 20 * Daily Target Return = Explosion Loss (when lost full number of steps in my martingale)
[/li][/ul]
So the research stage is based on a Random Variable moving between the various states in a Markov chain in a stochastic process. If I setup and Markov chain with 31 states where state -2 and state -5 are equal to 2 and 5 consecutive losses respectively and state 1 equals a win. I am trying to find the transition probabilities between each state i.e prob lose 5 times given lost 4 time etc… and the mean recurrence time i.e. if I have lost 5 times how long will it take on average before I lose 5 times again. So that I can find the optimal number of steps to have in the martingale.
So I have so far done a crude test with 10 currency pairs for a sixth month period at the tick level, and using a 13 step martingale as a starting point have found that the chances of losing 13 times in a row in any given day ranges from 3.5% (GBPUSD) to 0.8% (USDCHF). Brexit goes some way to explain the anomalous results for Cable but the average across all 10 pairs was 1.4%.
On the face of it that looks interesting because for example if I traded 100 days making £1000 on a winning day and lost £20,000 on a losing day, then with a 2% prob loss I would have lost £40,000 but made £98,000.
But still you never know when the losing day will arise, and given my luck; and assuming all the calculations were right, I would still probably end up losing on my first day. Losing in one pair over the course of time is inevitable, but what if I selected which pair out of 10 to trade the system completely at random too. So far I have not seen any correlation between losing on one (exceed 13 steps) and losing on another, in fact I can run the system multiple times on the same day on one pair and get completely different results due to the random nature of the trade selection.
So in my data there is no cross-over/overlap, no “explosion” on one pair and an explosion on another occurring at the same time. (I would have to run the test 500+ times to double check that).
So I could possibly reduce the “explosion” risk further by selecting one pair in 10 at random each day and running the system on that one. In theory if the average daily lose rate is 1.4 say 2% (1:50) then i could reduce the odds further to Prob(Choose Pair) * Prob(Pair Loses Today) = 0.1 * 0.02 = 0.002 (1:500).
I have run a crude test on the tester and it has worked for a 6 month period so far. I would however to to redo the same run a couple of hundred times to try and get real sense the likely odds.
Still a better way might be to look at the mean recurrence time. If Cable has a mean recurrence time for state 13 at 23 days. Then I could potential improve my odds beyond (1:500) by choosing to trade soon after the last time Cable lost 13 times in a row and also apply the same principle to all 10 pairs; the closer it is to the last explosion given the mean recurrence time would be calculable odds of losing on that particular date which i could compare with other pairs and select the least likely option.
anyway I have not done all the tests and double checked the math and that might take some time, also speaking with an academic to make sure i’m not getting this thing wrong would be a good idea. But I thought I would share it with you.
Your opinions would be most welcome.