Machine learning in trading: theory, models, practice and algo-trading - page 269

 

The zero model fitting error story posted here is purely alchemical in nature.

1. model fitting error = 0. Well, it can't be like that, it can't be. How can it be? Can 1% do it or can't it? And 5% can or can't either? And how many %% does it take to "can"?

2. Two concepts: redrawing and looking ahead. What are they? An amazing proof was used: somehow found suspicious indicators, threw them away and got a fitting error = 50%. That's it. Proved. Looking ahead. What the object of the proof is, what the proof itself is .... No comment.

Or maybe it's much deeper and alchemy didn't allow you to delve into the problem?

I called the problem above: methods of analysis and methods of prediction are different, have their own specifics, and you can't just transfer methods of analysis to predictions - you have to prove the permissibility of applying methods of analysis to predictions.

In our example.

We take some indicators (none of them really matter) and calculate their values for the whole sample on which we are going to teach and test the model. No problem for the analysis of the past. But for prediction such an approach must be proved, because we are interested in the next bar after the one we have. This means that we should take a window and calculate all indicators on it and then fit the model. When a new bar arrives, we should repeat this procedure again. Whether the history has changed or not is of no interest. The model should be built on the values of the last indicator bar. When we have once calculated the indicator for the entire sample, then it is likely that the values of this indicator will NOT contain the values of the last bar during the window movement.

Therefore.

If we want to teach models ON TIMES, we should use the indicator values that are derived from the values of the last bar as the window moves along the training sample.

PS.

If you use this method for the zigzag, then depending on the zigzag algorithm you will get either zeros or specks or lines that have nothing to do with the zigzag. And no talk about redrawing and looking ahead - you can't use it, that's all.

 
Vladimir Perervenko:

There is a new and very promising package RKEEL gateway to KEEL.

Good luck

Can you tell at least in two words what is the prospects of the package? Or three)

SanSanych Fomenko:

The story posted here with zero model fit error is purely alchemical in nature..................

What did you say? I do not understand anything :)

 
mytarmailS:

Can you at least tell me in two words what the prospects of the package? Or three)

===========================================================

Explanation:

1. The software product "KEEL" allows to create, test and study different classes of models to solve problems of regression, clustering and classification without deep knowledge of R language. It is a program like rattl , but more advanced.

The program is built with graphical ready-made "cubes"/modules, fast and clear, similar to KNIME, but more simple. After prototyping, simply transfer the finished program to R with the "RKEEL" package

Graphical representation of the program, consisting of modules, greatly speeds up and facilitates its creation, especially for novice programmers, most of whom are traders. There are analogous programs for R - "RedR" and "RAnaliticFlow", but they are poorly supported.

2. There is a large number of modules for preprocessing and transformation of variables, which is good.

3. Many original algorithms have been proposed which are not in R.

Variety of methods of knowledge extraction from data allows to solve trading tasks more flexibly.

Good luck

 
Vladimir Perervenko:
Thank you
 
mytarmailS:

What did you say? I don't understand a word of it :)

You have to type in the last values

for(i in ...)
{

    X29_1 <- TrendDetectionSMA(D[i:i+windows,])

    X29[i+windows] <- X29_1[windows]
}

As a result X29 will consist of LAST values, penultimate values will not be corrected for redrawing indicators

 
SanSanych Fomenko:

If we want to teach models ON TIMES, we should use indicator values that are taken from the last bar when the window is moving along the training sample.

I did it myself, look at the code I attached a couple of pages ago and its description.

The problem is that those 6 indicators give NA results for the last bar. And then, when analyzing subsequent bars - change this NA value to something else, the result of past bars is changed according to the new data (in the common parlance - "re-flipping").
It will turn out that we teach the model using the same results, and when we want to get a forecast with new data - these indicators will tell us NA instead of the needed values, which is unacceptable.

If you want to analyze these indicators, here is the rdata file, with indicator values obtained in the sliding window. The values of those six redrawing indicators are taken not for the last bar, but for the penultimate one in order to have something instead of NA.

Files:
 
Dr.Trader:

I did it myself, look at the code I attached a couple of pages ago and its description.

The problem is that those 6 indicators give the result NA for the last bar. And then, in the analysis of subsequent bars - change the NA value to something else, occurs changing the result of past bars according to the new data (in the common parlance - "re-rating").
It will turn out that we teach the model using the same redrawn results and when we want to make a forecast with new data these indicators will tell us NA instead of the necessary values, which is unacceptable.

If you want to analyze these indicators, here is the rdata file, with indicator values obtained in the sliding window. The values of those six redrawing indicators were taken not for the last bar, but for the penultimate one, so there was something instead of NA.

So we don't get it: we don't need to get into it. We remember the last bar. If it is NA, then there is never a value. By the way, this is exactly the value of ZZ on the last bar.
 
A review of Deep Learning in R came across
 
SanSanych Fomenko:
I found a review on Deep Learning in R

Superficial and with many inaccuracies article. Obviously written by students as a term paper.

Wanted to write a comment, could not find where to do it.

As a popular review is good, but not a guide to action.

Good luck

 

Why is everyone so fixated on models? Why doesn't anyone develop the topic of signs? Why doesn't anyone talk about non-stationarity? Why doesn't anyone try to solve these problems? Why doesn't anyone think about what drives prices?

If you input the stochastic, it doesn't matter what model you use, be it a usual KNN or the most sophisticated deep net,the accuracy will be 51-53%, no matter how deep it is. What's the use of these models if the input is garbage? But 95% of attention goes to the models, for me personally models are the last stage of the system, and it's only 2% of the work

In the meantime I will share my results ...

My extreme algorithm ....

So far, no MO in the classical sense, but recognition is present.

The decision making system is semi-automatic.

at the first stage, the algorithm itself recognizes some formations and gives them to me

At the second stage I evaluate what it has calculated and make my trading decision. Despite the fact that it is evaluated very easily and unambiguously I cannot yet transfer the second stage to the automatic mode of recognition, so that the system is essentially semi-manual

The system is intraday, trading is on the frame 5M, a day on average about 20 deals, for 15 trading days was only two days with a small loss

In the red profitability chart it is the same black, but with the commission

й

Also converted trades in the program of technical analysis for more flexible and deeper understanding

р

And I'll add more about non-stationarity, look at this wild spike in volatility, which I marked with an arrow it was a few days ago, I tell you with confidence that all systems that traded on fixed parameters, they all got squashed, in fact this whole volatility is their stop loss, but I digress from this ....

So what I want to say is that to react more or less adequately to market movements the decision-making system should either be constantly corrected in its parameters adequately to the market(what I once said about a Fourier) or the system should be generally non-parametric, otherwise I don't know how (in Russian).

And no grid will help you, no matter how deep it is, if you have a stochastic at the input

л

Good luck

Reason: