Statistics as a way of looking into the future! - page 19

 

bstone - Forecast for yellow and red line respectively 1 and 2 bars ahead of blue. The calculation is done on the zero bar and what you see in the pictures is formed in this form on the zero bar without peeking into the future, without redrawing the past, I checked this on a demo account (not my first year behind the husband for forex, I take it seriously).

Neutron- "A general view of the balance curve found from the estimated integral characteristics is shown by the red line in the figure below. For comparison, the blue line shows the balance curve constructed by "fair" TC trading, based on data provided by Piligrimm." - I don't understand, what is such a fair system?

The above described algorithm is implemented in a module, which is a stationary unit (ie without retraining models, although there is a possibility due to the "equalizer" to optimize the amplitude - phase characteristics of signals for a particular instrument and time frame), designed to form a presentable sample of the signals spectrum (over a hundred signals obtained using different algorithms) based on the quotes in real time. Trading decisions will be made not by 2 or 3 signals in the picture (there are a lot of such signals, in the last picture above you can see the spectrum of 100 signals, many of which have characteristics not worse than the 3 I presented above as an example of predicting a signal one and two bars ahead), but by a separate dynamic module for making trading decisions.

I have already developed and tested this module in other Expert Advisor systems developed earlier. The essence of it is using three committees of neural networks with 15 NS in each. Each committee receives a group of 50 signals, with the following distribution: the first committee receives signals from 1 to 50, the second from 26 to 75, the third from 51 to 100 from the first module described above - so each committee has half of overlapping set of input signals with the other committee. The length of the training sample of signals for each committee is 200 bars, the NS committees operate in an infinite real-time retraining cycle. As a signal from which training is performed, we get a signal from the "trend indicator" reflecting the reversal points of the trend on the history (which I put for sale, you can see its work there). After 15 NS are retrained in the committee, models of these networks are run in the test sample and only 9 best ones are selected out of 15. And these 9 best models from each committee are obtained in the block of calculation, where the calculation is performed for 9 best models and the result is averaged over the committee. As the result, we obtain three trading signals calculated for each committee according to the arrival of a new bar. Collegial trade decision is made when all three committees' decisions coincide. Dynamic system that constantly monitors market changes and resets its parameters in real time, allows you to make the best decisions in a certain situation. In general, the entire system has not yet tested, I am busy "polishing" the individual signals of the first module. I am showing the result of this "polishing" on the pictures below. The signals shown in the figures are two modifications of the signal, which was presented earlier as a red line. In the first and second figure signals differ in the "equalizer" settings, I wanted to show how small changes in parameters change the shape of the signals. In the archive the PRfile corresponds to the first figure and PR30corresponds to the third figure. In the 1st column - data corresponding to red lines, in the 2nd column - yellow lines, from 3 to 6, respectively - Open, High, Low, Close.

Files:
pr_1.zip  221 kb
 
rsi писал(а) >>

Neutron, it would be good to frame the way as an article...

The material is raw. I think it is too early to format an article.

Piligrimm wrote >>

The calculation is done on the zero bar and what you see in the pictures is formed in this form on the zero bar without looking into the future, without redrawing the past, I checked this on a demo account (not the first year behind the husband for Forex, I take it seriously).

The bottom line is that three committees of neural networks of 15 NS in each are used. Each committee gets a group of 50 signals, with the following distribution: first committee - signals 1 to 50, second - 26 to 75, third - 51 to 100 from the first module described above, so each committee has a half overlapping sample of input signals with the other committee. The length of the training sample of signals for each committee is 200 bars, and the NS committees operate in an infinite real-time retraining cycle.

Hats off to you for your work and great result!

In fact, the data presented is a direct proof of the non-randomness of the Forex market and, therefore, the possibility of non-random earnings from it.

Neutron - "General view of the balance curve found from the estimated integral characteristics is shown in red in the figure below. For comparison, the blue line shows the balance curve built by the "fair" TS trading according to the data provided byPiligrimm." - I do not understand what is such a fair system?

Let's load presented by you kotir (third column in archive) in Metatrader and use yellow line (second column) as an indicator on position opening. We write TS (I implemented it in Mathcad), which opens-closes a position at each reference of time series (Open of the current bar H4), the direction we choose according to the sign of the indicator's increment. This is what I call "fair" trading.

Piligrimm, how do the optimal length of training sample P, the number of TC d-entries and the number of set weights w depend on each other?

 
rsi писал(а) >>

Neutron, it would be a good idea to put the method in the form of an article detailing the method of practical application. This could become a standard as it spreads "among the masses". At the same time, the opening of a TS position can be considered as a prediction of the average size of a profitable trade on the next bar (the interval equal to the average order lifetime). We are obviously missing such indicator for evaluating TS today and the development of your idea seems to be very versatile in this sense.

P.S. As an option, on a fuzzy evaluation scale, on the right could be "for real!", and on the left - "Ftopkus!" :-)

Seconded.

Indeed, the proposed way of grading could be the basis of the generally accepted one.

 
Hats off to you for your work and your excellent result!

По-сути, представленные данные служат прямым доказательством не мартингальности рынка Forex и, следовательно, возможности неслучайного заработка на нём.

Piligrimm, how do you correlate the optimal training sample length P, the number of inputs d and the number of adjustable weights w?

There was indeed a lot of work; practically, I have been working on this expert system since March, spending 10 to 14 hours a day at the monitor, and using the experience and experience of many previous years. To build the first module - the signal builder, I had to train hundreds of models, most of which went into the bin, and only a small part that met the given criteria entered the system. Training one model took 6 to 30 hours. But the most painful task for me was to construct signals with the required amplitude and phase response from the signals produced by the models I had not found a way to automate this process, I had to manually combine hundreds of combinations from a group of different models, until a satisfactory version (what I called "skinning" the signals) was found and a new original signal, or an improved primary signal created by one of the models was found.

The first module is stationary, it does not provide for retraining, but is designed for the built models to work steadily for the foreseeable future, at least 2 - 3 years. Proceeding from this I chose timeframe H4 with sampling length 5000 bars for training, in the interval of which the market changed its phases many times and the range of rate changes (on this interval it is from 1.16 to 1.6) should not exceed these limits in years to come. The learned NS and LR models were formalized in polynomials and then translated into MQL, so the entire first module is implemented in MQL as an indicator that can be optimized in a wide range of amplitude-phase characteristics using the equalizer, obtaining the desired shape of signals to create different strategies. My aim from the beginning was not to make a highly specialized system for some specific strategy, but to create an open system, a kind of constructor, which can receive new signals with new characteristics, if necessary, using combinations of existing signals, in accordance with the requirements of the strategies to be designed.

The second module is dynamic, it is implemented on Matlab. It is designed to dynamically monitor the market situation, constantly adapting to changes, and make informed trading decisions based on the multivariate analysis of the information provided by the first module. Essentially, this module is a recognizing system, which is trained on the input vector of 50 signals and on the basis of the reference trend on the history, created by the trend indicator, to recognize the reversal points of the market trend, for a given range of rate fluctuations, and on the zero bar without significant delay to give a signal about the beginning of the reversal. To exclude wrong decisions and influence of noises, I made this module redundant, and introduced a committee of 15 NC, and made three committees trained for analysis of several different input vectors (though it wasn't made for the good life, I would have liked to use just one committee, but my computer simply cannot handle training of NC with 100 inputs). So I had to split the input array into three parts, as I described above, and train the National Computer System with 50 inputs, which even though load the processor and memory way too much, but still work. So the choice of the number of NS inputs is determined by this. This unit is designed to track and evaluate short-term changes in the market without deep analysis of the history and my empirical conclusions is that the length of training sample should be at least 10 times the forecasting or recognition horizon, on which the NS works without retraining. I used this module to work on the M1 timeframe where the total time for retraining one committee was 15-17 minutes, moreover the prediction accuracy without retraining the NS was quite high at 20 bars, i.e. 20 minutes ahead. Thus, I selected a length of the input array for training equal to 200 bars. I tried to decrease the sample length down to 100 bars but the error in the test sample increased considerably, an increase in the range of 200 to 1000 bars did not increase the accuracy significantly, but increased the training time and the memory used. I use standard Matlab NS functions, there weights are generated internally automatically.

As for Forex market predictability I was sure in its predictability from the very beginning when I started working with it, and many years of work and experiments have only strengthened this belief. I even wrote an article about it named ' Is it possible to make forex predictions? How to Create Your Own Trading Strategy?

By the way, I've briefly touched upon the approach I use in this system. Unfortunately, most fail to take this article seriously leaving mocking comments.

Another question about the last chart you cited, strange that the local minimums and maximums of the red and blue line are in antiphase to each other, how do you explain it?

 
Piligrimm писал(а) >>

As for Forex market predictability, from the very beginning, when I started working with it, I was confident in its predictability, and over the years of work and experiments I have only strengthened this belief. I even wrote an article about it named ' Is it possible to make forex predictions? How to Create Your Own Trading Strategy?

By the way, I've briefly touched upon the approach I use in this system. Unfortunately, most fail to take this article seriously, leaving mocking comments.

Another question about the last chart you posted, it is strange that local minimums and maximums of red and blue lines are opposite to each other, how do you explain that?

Well, in general terms it does.

Piligrimm, the indicator you have collected in the form in which you have presented it for review, allows you to beat the market on Н4 statistically. And that with minimal risk. What is the reason why you have not yet overturned Forex?

Concerning the differences in the data presented by me, they are due to the very essence of the methodology of profitability estimation. The point is that knowing the integral characteristics defining a stationary process (distribution of equity increments in our case), we always get one of the infinite number of its realizations. In general, these realizations are similar (growth rate, growth rate fluctuations), but they are individual and unique in details. This explains the apparent discrepancy. What you noted as the counter-phase of EVERYTHING is just coincidental. It could have been in phase and anything else.

 
Neutron >> :

Well, I understand in general terms.

Piligrimm, the indicator you put together as you presented it, allows you to beat the market on H4 with statistical certainty. And that with minimal risk. What's the reason why you haven't toppled Forex till now?


I will not state anything yet, but it seems to me that in this case the results were obtained incorrectly due to indicator overshoot on the zero bar. For a horizon of 1 bar, it is obvious - when emulating trades on the presented data the decision is made at the beginning of the bar according to the data, which in reality was obtained at the moment of its full formation. For a horizon of 2 bars we need to analyse in more detail.
 
bstone писал(а) >>

I will not assert anything yet, but it seems to me, that in this case the results were obtained incorrectly due to indicator redrawing on zero bar. For a horizon of 1 bar it is obvious - when emulating trades on presented data the decision is made at the beginning of the bar using data that in reality was obtained at the moment of its full formation. For a horizon of 2 bars we need to analyse in more detail.

Piligrimm wrote :>>

bstone - Forecast for yellow and red line 1 and 2 bars ahead of the blue one, respectively. Calculation is done on the zero bar and what you see in the pictures is formed on the zero bar without looking into the future, without redrawing the past, I checked this on a demo account (not the first year behind the forex, I take it seriously).

Nevertheless, this is a very important point.

Let's ask Piligrimm once again to confirm the correctness of the data presented. We need to guarantee that the forecast for the next H4 bar (red or yellow line) is received and fixed BEFORE the bar opens and not during the bar's formation.

 
Neutron >> :

The material is raw. I think it's too early to make up an article.

I think it is also important to track the variance of the distribution

the distances from the points to the line plotted on the point cloud. At zero

the prediction error angle is exactly 45 degrees and the variance is

is zero. For real needs we can choose optimal sets

smaller sigma values and larger slope angle.

 

Hi all!

The topic is interesting enough for me personally, so I venture to ask some questions to the participants of this thread.

I am sorry, if I misunderstood something...


1. What are we trying to predict? (probably the future price value, which should be formed within a certain timeframe).

For simplicity, tr=sl. The goal is for the price to reach tr, faster than sl. The ratio n/l should be greater than 0.5 including the spread. Preferably, it should be greater than 0.7.


2. What parameters from the past will we use for our prediction to determine the price to a specific target level (tr)? This question was raised on some page in this thread, but I don't understand it...


3. in my opinion, predicting the market is difficult, maybe even useless (i.e. regressions, etc., that lag behind the price change (slope) are not much different from the MA). All the same, I think the main thing is that the movement depends on the amount of money some people have bet with the expectation of an asset rising/falling and their greed and fear in anticipation of reaching that price level. This fact in my opinion cannot be ignored when forecasting.

 
kch писал(а) >>

1. what are we trying to predict?

2. What parameters from the past will we use for our forecast...

3. In my opinion, forecasting the market is difficult, maybe useless...

1. Increase in price on the next bar.

2. The value of price increments on the current and previous bars.

3... Can you suggest something else for MTS?

Aleku wrote >>

I think it is also important to trace the variance of distribution

of distances from points to the line plotted on the point cloud. At zero

prediction error the angle is exactly 45 degrees and the variance is

is zero. For real-world needs, optimal sets of

smaller values of sigma and a larger slope angle.

Of course you are right.

If we talk about the value of the proposed method, we should emphasize that we operate with two parameters - the slope tangent of the linear regression and the dispersion of point spread (assuming the normal distribution of balance increments) in relation to the constructed line. The first parameter characterizes the profitability of TC, the second characterizes the risks. Having both of them, we can find the optimal percentage (in the sense of maximization of income for a certain period of time) of reinvestments. In other words, the closer the cloud slope is to 45 degrees and the thinner it is, the better.

Reason: