A study on the applicability of martingale using simulations of the coin game - page 3

 
In some parts of the market the system works at 0. I.e. it produces a 50/50 ratio of profitable and losing trades. And since I am already writing the answer, I will answer 5-6 losses in a row. 4 losses in a row and over-optimization of the system. I didn't write above for nothing about not allowing a series of 29 losses.
 

Now that I've written it, I'll write some more. Why do I know that the theory of probability does not apply to the market? I checked it. I wrote an Expert Advisor on random inputs. Take and stop are equal. I obtain the 50/50 ratio of profitable and losing trades. ) But the first half of the time the Expert Advisor was steadily losing and the second half was earning. In the end it had 0 profit. The balance should have been slightly above zero.

 
Stanislav Aksenov:

The task is to analyse the applicability, usefulness (or to understand its absence) of the martingale method - it is understood as differently increasing bets in cases of defeat, and returning to the initial one in case of winning.

With the help of simulations of the game can clearly, from a practical point of view, find out the mathematical expectation, i.e. profit (and other properties) without any complicated formulas, etc.

Also, it makes you wonder that in gambling games gambling establishments allow you to increase your bet a certain number of times. The question is, why? So it works somehow, and you can use it to your advantage?

The aim is to make sense of it all. I feel most comfortable writing in Java, I will lay out the code, but it is not complicated, and it should not be too hard to understand. Also, of course, I will post a description of the simulation, and the results.

Explanation - for clearer estimation of variance/mat expectation we use iterations count per count of repetitions, with output of results of each repetition separately.


If you want to understand something, write your codes directly in MQL5, and the tester will show all your mistakes and errors immediately. The simulation does not work in the market.

And start with a curved coin, the market is not exactly a random process after all.

 
Grigoriy Chaunin:

Now that I've written it, I'll write some more. Why do I know that the theory of probability does not apply to the market? I checked it. I wrote an Expert Advisor on random inputs. Take and stop are equal. I obtain the 50/50 ratio of profitable and losing trades. ) But the first half of the time the Expert Advisor was steadily losing and the second half was earning. The total profit was 0. The balance should have been hovering near zero in theory.


But why should it wobble near zero? That's exactly how much variance it's supposed to have. That's right, the expectation is zero, the variance is large, i.e. there could be long profit/loss stretches.

 

Let's try to draw some conclusions. Since the plan is to make everything as practical as possible, you need to think about where in real life you can play and most importantly how many bets/transactions/something else you can do in a year. It is very important to think in terms of specific time frame, in real life there is no infinity and there are many limitations. I don't know where it would be possible to do this, but let's imagine it would be possible to make one bet every 10 seconds. I don't think it would be possible to do it more often in real life. How many games played per year then? Let's calculate - 6 per a minute - it is 6*60=360 per hour - it is 360*24=8640 per day - it is 8640*365=3153600 per year. We will assume that there is no way around this limit.

But we should be ready for a series of 32 losses, which, as we have seen, appeared at 100 million iterations. We could, of course, go for a lower number (e.g. 28), but then the probability of that happening would not be close to zero, it would be a question of luck, and we need a guarantee. Well, let us calculate bankroll to withstand it.

0.1
0.2
0.4
0.8
1.6
3.2
6.4
12.8
25.6
51.2
102.4
204.8
409.6
819.2
1638.4
3276.8
6553.6
13107.2
26214.4
52428.8
104857.6
209715.2
419430.4
838860.8
1677721.6
3355443.2
6710886.5
13421773
26843546
53687092
107374184
214748368
429496736

That's 858,993,471.8 - 850 million, and that's with a starting bet of $0.1. All right, let's say we have almost a billion dollars. Let's see how much we can earn in a year, we can make 3 153 600 bets at 0.1 dollars, the expectation from each transaction we figured out 0.05 dollars at this rate, count, and it turns out = 157 860 net dollars! Yes indeed, you can almost be guaranteed to earn that much. But wait, how much is 1 percent of a billion? 10 million dollars! In short, if it is possible to invest it at 0.01% (one hundredth of a percent) will be almost as much in profit. I think there are probably options at least at 0.1 per cent.

 
Sergey Chalyshev:

If you want to understand it, write your codes directly in MQL5, and the tester will give you all your mistakes and misconceptions right away. The simulation does not work in the market.

And start with a curve of a coin, the market is not exactly a random process after all.


The program here is not that complicated, everyone can do similar simulations in their favourite programming language, it's not that important here.

 

The person who claims that Martin is the inevitable drain is thereby automatically stating unequivocally that the anti-Martin is the inevitable profit (read: the Grail).

If anyone knows where I'm going wrong here - point the finger, please...

 
prikolnyjkent:

The person who claims that Martin is the inevitable drain is thereby automatically stating unequivocally that the anti-Martin is the inevitable profit (read: the Grail).

If anyone knows where I'm going wrong here - point the finger, please...


An error in the understanding of Anti-Martin. Anti-martin is what?

This is decrease of lot after losing trade, or

Is it the opposite position to the trading position with Martin?

we have two binary variables, i.e. 4 options, and only one of them is Martin, presumably the other 3 are Anti-Martin.

 
prikolnyjkent:

A person who claims that Martin is an inevitable drain is thereby automatically stating unequivocally that anti-Martin is an inevitable profit (read: the Grail).

If your anti-martin comes with anti-spread, anti-commission and positive slippage

 
Alexander Puzanov:

If your anti-martin comes with anti-spread, anti-commissioning and positive slippage


Yyyyyesssssssss.