Bayesian regression - Has anyone made an EA using this algorithm? - page 30

 
Yuri Evseenkov:

Tested. Made a program to get the 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.

Dmitry Fedoseev:

Cool! Definitely.

I agree +++
 
Yuri Evseenkov:

It is possible to construct it. But how can it be applied to the Bayesian formula?


I made a similar indicator with close price buffers. I have divided the entire calculated interval into 10 parts. I tried to apply a similar algorithm in my Expert Advisor. I was not very impressed.

How to cook it with what?

Files:
Profil.mq4  6 kb
 
Alexey Burnakov:

The density is not the prices themselves, but their increments.

In Bayesian analysis, as they write, the hardest part is determining the a priori probability. When applied to forex, I think it's like this.

We do not know the properties of data located to the right of the zero bar. What is ahead of it? Unknown price distribution, normal-like distribution, Laplace distribution or something else. Which distribution we take as the a priori probability (likelihood function) will determine the resulting probability according to Bayes' formula. The more plausible the a priori probability, the closer to the truth our calculations are.

 
Dmitry Fedoseev:

Cool! Absolutely.

Worth a look, compare at the trend start points, there could be a difference there.

Thank you. It's rare to hear you say that.

I didn't calculate the least squares coefficients. I took the indicator from the kodobase. The coincidence is almost 100%, despite the fact that that indicator is calculated based on closing prices and my method is "Bayesian". I use OHLC as the average value.

 
forexman77:

Made a similar indicator with closing price buffers. Divided the whole calculated section into 10 parts. I tried to use a similar algorithm in my Expert Advisor. I was not very impressed.

How to cook it with what?

I used the same program as an Expert Advisor on German DAX. It seems to be OK on a calm market. But as soon as VW gets caught, Draghi says something, the North Koreans test a thermonuclear bomb - Gaussian bells immediately break, price ranges with the largest tick volumes do not attract the price anymore.
 
Yuri Evseenkov:
I used the same program as an Expert Advisor on German DAX. It seems to be OK on a quiet market. But as soon as VW gets caught, Draghi says something, North Koreans test a thermonuclear bomb - Gaussian bells immediately break, price ranges with the largest tick volumes no longer attract the price.

Well, it's not that bad. News like this rarely happens. I will have to try with the volume.

I have another problem: I cannot understand some formulas, I need to understand algebraic signs.

 
Yuri Evseenkov:

The distribution we take as the a priori probability (likelihood function) will determine the resulting likelihood according to Bayes' formula. The more plausible the a priori probability, the closer to the truth our calculations are.

I'm going to disappoint you. Whichever distribution you take, the price to your "a priori likelihood and the resulting probability by Bayes formula" is way off. And which "truth" are your calculations closer to? Once again you have decided to pull the market on a chit?


 
Event:
I'm going to disappoint you. Whichever distribution you take, the price to your "a priori likelihood and the resulting Bayes formula probability" is way off. And which "truth" are your calculations closer to? Once again you've decided to pull the market on a chit?


What about your previous post?

https://www.mql5.com/ru/forum/72329/page14

Bayesian regression - Делал ли кто советник по этому алгоритму?
Bayesian regression - Делал ли кто советник по этому алгоритму?
  • www.mql5.com
Bayesian regression - Делал ли кто советник по этому алгоритму? - Страница 14 - Категория: автоматические торговые системы
 
Yuri Evseenkov:

What about your previous post?

https://www.mql5.com/ru/forum/72329/page14

That post confirms this one. There is a normal distribution, but how the profits are, no one knows.

 
Yuri Evseenkov:

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)

P(x,y|a,b) is taken as the likelihood function P(x,y|a,b), which is a 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.


Your research deserves respect!

There is a recent article - perhaps you will find it useful...

https://habrahabr.ru/company/itinvest/blog/277337/

Эксперимент: Насколько иррациональна биржевая торговля на коротких интервалах (скальпинг)
Эксперимент: Насколько иррациональна биржевая торговля на коротких интервалах (скальпинг)
  • habrahabr.ru
Разработчик и трейдер Йоан Кристиан Лоттер, создатель блога Financial Hacker, написал интересный материал, в котором рассказал о своем эксперименте, призванном выяснить, имеет ли смысл торговля с использованием коротких и сверхкоротких интервалов для совершения сделок. Мы представляем вашему вниманию главные мысли этой заметки. Начинающие...