The most banal trading strategy - page 30

 
Дмитрий:

Write this formula, please.

Here we go. Nobody wants to think with their brain. Let's say we have a price chart. Let's call it A. Let's assume it is 576 samples (two days) in M5 timeframe. I will number the samples by the index i from 0 to n-1, where n=576. We construct an SMA of some order s=1+2z, where z is the lag. I call this smoothed curve (SMA) as: As. It is also 576 samples from 0 to 575. We denote the difference between them by R = A - As. Obviously, this is also a vector of 576 samples. I assume that i=0 corresponds to the oldest readout, while i=n-1 is the freshest readout just made. Suppose we want to predict the price for future=288 counts (days) ahead. Let's introduce an index f which would vary from 1 to future. Suppose after we have predicted R for one day ahead, we take a new vector Rfut, where it is no longer 288*2 but 288*3 samples (first 288*2 are equal to R, next is our forecast of the difference with SMA). Suppose as the result of the price forecast we will also obtain a vector called Afut that contains 288*3 samples, first 288*2 coincide with the readings of vector A and then the forecast.

How are Afut and Rfut related? It is obvious to everyone who has mastered primary schools:

Files:
11111.PNG  4 kb
 
Yousufkhodja Sultonov:

Notice the contradiction?

There is no contradiction. You predict what is easier to predict, what is stationary, and then by elementary arithmetic you construct a self-consistent solution.
 
mikhael1983isakov:

Here we go. Nobody wants to think with their brain. Let's say we have a price chart. Let's call it A. Let's assume that it is 576 samples (two days) in M5 timeframe. I will number the samples by the index i from 0 to n-1, where n=576. We construct an SMA of some order s=1+2z, where z is the lag. I call this smoothed curve (SMA) as: As. It is also 576 samples from 0 to 575. We denote the difference between them by R = A - As. Obviously, this is also a vector of 576 samples. I assume that i=0 corresponds to the oldest sample, while i=n-1 is the freshest sample just taken. Suppose we want to predict the price for future=288 counts (days) ahead. Let's introduce an index f that would change from 0 to future-1. Suppose after we have predicted R for one day ahead, we take a new vector Rfut, which is not 288*2 but 288*3 samples (first 288*2 - coincide with R, next is our forecast of the difference with SMA). Suppose as the result of the price forecast we will also obtain a vector called Afut that contains 288*3 samples, first 288*2 coincide with the readings of vector A and then the forecast.

How are Afut and Rfut related? This is obvious to anyone who has mastered primary schools:

Please write the FORMULA for convertingthe difference forecast into the price forecast itself in ONE STROKE

 
Дмитрий:

Please write the FORMULA for convertingthe difference forecast into the price forecast itself in ONE ROW

I have written (by attaching it as a .png file)... And R can be predicted by decomposing the definition of a dangling around zero signal R into two signals, so that one is always positive and the other is always negative... then everything becomes simple: if the positive signal is close to zero, it will increase (it has nowhere to go, that's how you defined it), if the negative signal is close to zero, it will decrease (similarly, it has nowhere to go), if the deviation of the positive signal from zero is large (compared to history) it will approach zero, similarly with the negative, the result: the forecast of the difference with SMA is equal to the sum of forecasts of separately positive and negative signals (besides, quite highly correlated with each other, which still facilitates their forecast), and - voila - the forecast of the price itself. Everything is not so difficult. We shall average based on different z values, a couple of hundred values is enough, the forecast reliability increases qualitatively. Open a position, enjoy profit.
 
mikhael1983isakov:

Here we go. Nobody wants to think with their brain. Let's say we have a price chart. Let's call it A. Let's assume that it is 576 samples (two days) in M5 timeframe. I will number the samples by the index i from 0 to n-1, where n=576. We construct an SMA of some order s=1+2z, where z is the lag. I call this smoothed curve (SMA) as: As. It is also 576 samples from 0 to 575. We denote the difference between them by R = A - As. Obviously, this is also a vector of 576 samples. I assume that i=0 corresponds to the oldest readout, while i=n-1 is the freshest readout just made. Suppose we want to predict the price for future=288 counts (days) ahead. Let's introduce an index f which would vary from 1 to future. Suppose after we have predicted R for one day ahead, we take a new vector Rfut, where it is no longer 288*2 but 288*3 samples (first 288*2 are equal to R, next is our forecast of the difference with SMA). Suppose as the result of the price forecast we will also obtain a vector called Afut that contains 288*3 samples, first 288*2 coincide with the readings of vector A and then the forecast.

How are Afut and Rfut related? It's obvious to everyone who has mastered primary schools:

This is gibberish...

Suppose that we want to predict the price for the future=288 samples (days) ahead. OK

Then we introduce an index f. Where and how does it come from?

Suppose after predicting R a day ahead, we go... HOW did we make the forecast?

Let the price forecast also result in a vector.... HOW did we forecast?

next - forecast.... HOWEVER, everyone has already predicted????

 
Дмитрий:

This is gibberish...

Suppose we want to predict the price for the future=288 counts (days) ahead. OK

Then some kind of index f is entered. Where and how does it come from?

Suppose after predicting R a day ahead, we go... HOW did we make the forecast?

Let the price forecast also result in a vector.... HOW did we forecast?

next - forecast.... HOWEVER, everyone has already predicted????

The f index is just numbering the forecast counts. f = 1 - first forecast step, f = 2 - second, and so on up to f = 288, so we are a day away from the present time into the future. But I'm sure beforehand, that not many readers of the branch can make use of the given information :-)

 
mikhael1983isakov:

The index f just numbers the countdowns of the forecast. f = 1 is the first step of the forecast, f = 2 is the second, and so on up to f = 288, which brings us one day from the present to the future. But, I am sure, that not many of the readers of the branch will be able to make use of the given information, - he said beforehand :-)

- It is ..." he said, "It's a valuable venture, I tell you! There is an element of the unexplained, an impulse from below ... That's why I recommended it. That..." he said to the old man. "Explain to the comrades, mon cher, what you have in mind.

It was as if the old man exploded.

- The highest achievements of the neutron megaloplasm! - he said, - the rotor of the field, like a divergence, gradates itself along the spin and there, inwards, it turns the matter of the question into electric spirits, from which the synecdoche of the answer arises...

My eyes became dark, my mouth filled with quina and my teeth hurt, but the cursed Noble kept speaking and speaking, and his speech was smooth and smooth, it was well-composed, thoughtfully rehearsed and repeatedly pronounced, in which every epithet and intonation was full of emotional content, it was the real work of art. The old man was no inventor; he was an artist, a brilliant orator, the most worthy of a follower of Demosthenes, Cicero, John Chrysostom... Staggering, I stepped aside and leaned my forehead against the cold wall.


The Tale of Troika. The Strugatsky Brothers

 
Дмитрий:

- That..." he said. "That's what I'm saying, a valuable undertaking! There's an element of the unexplained, an impulse from below... That's why I recommended it. That..." he said to the old man. "Explain to the comrades, mon cher, what you have in mind.

It was as if the old man exploded.

- The highest achievements of the neutron megaloplasm! - he said, - the rotor of the field, like a divergence, gradates itself along the spin and there, inwards, it turns the matter of the question into electric spirits, from which the synecdoche of the answer arises...

My eyes became dark, my mouth filled with quina and my teeth hurt, but the damned Noble kept talking and talking, and his speech was smooth and smooth, it was well composed, thoughtfully rehearsed and repeatedly pronounced, in which every epithet and intonation was full of emotional content, it was the real work of art. The old man was no inventor, he was an artist, a brilliant orator, the most worthy of a follower of Demosthenes, Cicero, John Chrysostom... Staggering, I stepped aside and leaned my forehead against the cold wall.


The Tale of Troika. The Strugatsky Brothers

Quod erat demonstrandum.

 

Let me explain with a simple example:


So. Curve A - black - price (288*2 counts of M5, two days). Curve As - orange - SMA of 289 (z=144, half day, s=1+2*z=289). The R curve is black in the second figure: R = A-As. Task: predict R. Decompose R into two signals: always positive (Rup) and always negative (Rdw) - in the second figure in pink and blue, respectively. R = Rup + Rdw, by definition this is how we defined Rup and Rdw. The pink Rup is clearly up. Blue Rdw (as we know from the statistics in the past) is also obviously going back to zero. Let's make the simplest forecasts with straight lines (we can and should make more complicated ones, but we can't show everything here). The sum of forecasts Rup+Rdw gives the prognosis Rfut - in the second figure the red straight line. The simplest return - by one formula - from Rfut to Afut gives a price forecast - Afut - in the first (upper) picture - red. This forecast coincided well with how the price evolved in the next day in fact - in the first (top) figure in blue (EURUSD fragment from the recent past, about a month ago, is taken as an example).

 

Another example.


Is the prediction of positive and negative R (pink and blue lines) even close to zero likely to be true? Relatively healthy? Yes. Hence it is not surprising that the forecast of the price (red line in the upper graph) quite sensibly correlates with its real subsequent movement during the next day (blue line in the upper graph). As an example we take a fragment of EURUSD from the recent past, about a couple of weeks ago.