Bayesian regression - Has anyone made an EA using this algorithm? - page 29
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
A kind of multiplayer, computer-based online simulator
It's in sync with futures, so not really.
With futures going in sync, so not really.
Convinced. Almost. There remains a shadow of doubt that coefficients a and b of lines y=ax+b will be numerically or approximately equal when calculated by different methods. Here you should either painstakingly compare formulas of two methods or write a program. The main thing is that formulas, algorithm and code itself should be adequate to the theory. The program must:
-calculate the coefficients of a and b of the linear regression y=ax+b using the method of least squares
-obtain the coefficients of a and b, at which the probability by Bayes' theorem is maximal when applying the normal distribution with mathematical expectation equal to ax+b
Then we need to compare those coefficients and, in case of a considerable difference, look at the behavior of the two lines based on those a and b in dynamics. For example, in the strategy tester in visualization mode.
The program can be further used using other models, regressions, distributions with the Bayes formula. Maybe something will shoot really well.
CME ))
It is unlikely that the result of trading on a regression model will depend much on the method of choosing the a and b parameters. Inputs are much more important. And choose the simpler (least squares) method for calculating a and b.
Thanks for the advice. But the Bayesian methodology gives you something that other methods don't. Namely, probability. The probability that the coefficients a and b correspond to x and y, time and price. This can be used in making entry and exit decisions. Or am I wishful thinking?
I have made a program which obtains coefficients a and b at which the probability according to Bayes' theorem is maximal when applying a normal distribution with expectation equal to ax+b.
The algorithm is reduced to enumerating possible values of a and b in lines y=ax+b, substituting into Bayes formula P(a,b|x,y)=P(x,y|a,b)*P(a)*P(b)/P(x,y); (1)
The probability function P(x,y|a,b) is taken as the normal distribution formula with expectation ax+b. The maximum likelihood measure of the Bayes formula is inversely proportional to the standard deviation.
Straight line (red line) constructed by coefficients a and b (at which probability according to Bayes' theorem is maximal) almost coincided with the same indicator (yellow line) of the linear regression from the kodobase.
Dmitry Fedoseev, Vladimir and other "Copenhagenists" were right.
We got the same plus a probabilistic measure of fit of a,b x and y by Bayes formula. In this case (linear dependence, normal distribution of y, uniform distribution of a and b) it turned out to be inversely proportional to the standard deviation. Perhaps this measure will come in handy in the analysis.
Throw out the normal distribution, because it is not observed anywhere in financial instruments. And instead build a histogram of the real density of the distribution and approximate it.
It is possible to construct it. But how can it be applied to the Bayes formula?
It is possible to construct it. Only how can it be applied to the Bayes formula?
And instead of it, build a histogram of the real density of the distribution by yourself.
The density is not the prices themselves, but their increments.
I checked. I made a program which obtains coefficients a and b at which the probability according to Bayes' theorem is maximal when applying normal distribution with expectation equal to ax+b.
...
Cool! Absolutely.
Worth a look, compare at the trend start points, there may be a difference there.