Bayesian regression - Has anyone made an EA using this algorithm? - page 11
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The theories of price behaviour described in various scholarly trading books are unsupported by anything other than the authors' reasoning.
Price behaviour is the behaviour of an aggregate of different groups of market participants, the ratio and value of their open positions changing dynamically and stochastically. :)
To my mind, it's interesting (for a researcher), but not the monetary one.
Earlier I formulated two possible strategies - trend-finding and pips-finding. The first strategy is reduced to detecting the beginning and the end of a trend.
The second one is catching of small (almost noisy) price movements. I think both strategies should be formulated in terms of merely statistical characteristics of price and/or price increments at corresponding timeframe.
Recently I have come across an interesting phrase - statistical arbitrage. I am studying it now. :)
Roger that. Just one Fact - stochastic price behaviour involves stochastic patterns, that is, patterns where the outcome will not be guaranteed, but will happen with probability. But that's not all.
Probability has a confidence interval. And so if p is a model - its confidence interval is provably larger than, say, a naive p = 0.5 + its confidence interval - then we have a stable (not strictly speaking, of course), empirically tested model that can do MO outperform overhead.
Roger that. Just one Fact - stochastic price behaviour involves stochastic patterns, that is, patterns where the outcome will not be guaranteed, but will happen with probability. But that's not all.
Probability has a confidence interval. And so if p is model - its confidence interval is provably larger than, say, the naive p = 0.5 + its confidence interval, then we have a stable (not strictly speaking, of course), empirically tested model that can do MO outperform overheads.
The difference between my position and yours is that I don't know how to create models, so I use what various clever people have come up with. :)
I completely agree with you.
The difference between my position and yours is that I don't know how to create models, so I use what various clever people have come up with. :)
There are a lot of cultural layers here. They are all pure blah-blah-blah and some pretty pictures. Gotta check everything out in a good way.
I would like to have a code on the subject of this branch.
1. linear regression. Least squares method. The formulas are taken from the video clip.
y=kx+b;
k=(mean product of xy - product of mean x and y)/(mean square of x - square of mean x);
b= y mean - k*x mean.
2. By doing these calculations you should get the coordinates of the straight line. The real values will differ from the theoretical ones by the value eps= y(real)- y(teor).
Further, for the regression to be Bayesian, the assumption is made that eps is distributed according to the normal law.
Please, those who are Copenhagenists, correct me if something is wrong and advise me what to do next.
Here https://www.mql5.com/ru/code/8016 you can download an indicator that calculates linear regression in the same way as MT4 and builds a linear regression channel.
Here https://www.mql5.com/ru/code/8016 you can download an indicator that calculates a linear regression just like MT4 and builds a linear regression channel.
The linear regression line drawn by the indicator almost coincided with the one I drew by eye. It happens.
The linear regression line that the indicator plotted was almost identical to the one I plotted by eye. It happens.
Don't underestimate our brain...
Maybe indicators are invented to take the load off the brain, from the depths of the unconscious, so to speak...
...
Further, for the regression to be Bayesian, the assumption is made that the eps is distributed according to the normal law.
...
Why this assumption? Not at all. You don't have to think about it, it's like defining the scope of the Bayesian regression.
We must determine the attributes which are necessary for calculating the Bayesian regression. This is the first question of how to make a square circle. This is where you may realize that the Bayesian regression does not fit in at all. But we don't care... something has to be done. Suppose that the coincidence of price values of one row and the second row (in our case the line) will correspond to the maximum likelihood. And the maximal one by one path will be 1/n (n - number of bars). Although this approach is just like drawing with a pitchfork on water. So we should invent some formula which at argument 0 gives 1/n, and at increasing argument tends to 0. Then we write down the baes formula and substitute the formula we invented earlier for the probabilities. Next we need to find the maximum of the resulting function. Probably take the derivative, equate it to zero...
The result will be almost the same as the linear regression, because the initial goal was to combine the straight line and the price series.