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

 
Mihail Marchukajtes:
Greetings!!!! I use LibVMR but it seems to be an old version, because it keeps getting "Bad Data" error. I understand that there is a new version. Where can I download it? If it is possible?

Freshly made and raw versions of them are now being distributed through the BitBucket repository at: https://bitbucket.org/jprediction/jprediction/downloads

Project name also changed from libVMR to jPrediction

 
Yury Reshetov:

Not quite clear? Are you taking prices in the form of OHLC for patterns or some transformation of them?

The point is that if we take OHLC as it is, a similar pattern 1000 points higher or lower from the one being compared will be more different by the Euclidean distance than a totally different pattern 10 points higher or lower from the one being compared. And the difference will be two orders of magnitude, so the comparison error will also be two orders of magnitude.

When I measured with Euclid, all vectors were normalized and censored
 
mytarmailS:
When I measured with Euclid, all vectors were normalized and censored
How?
 
mytarmailS:

The solution was found.....

If you apply spectrum analysis to the current vector (current prices) and decompose it into simpler components, such components can be more easily found in the history because of their simple structure

s

price <- cumsum(rnorm(200))+1000

library(Rssa)
s <- ssa(price)
r <- reconstruct(s)

par(mfrow=c(1,2))
plot(price,t="l")
plot(r$F2,t="l")
for(i in 3:50) {lines(r[[i]],col=i)}

I used the "caterpillar" or "ssa" method for the decompositionhttp://www.milanor.net/blog/wp-content/uploads/2014/07/SingularSpectrumAnalysisWithRssa.pdf.

We look for analogues in the history and see how they end up, but we look for analogues not for prices, but for each of the individual spectral components, and then we connect them and obtain a simple forecast

According to the first tests, the theme is quite promising, if you predict each component separately. The forecast is often correct, but rarely not displaced...

ss

Black color indicates one of the current components, blue color indicates a component analog found in the history after the black vertical line is a new data unknown to the algorithm - in fact, the forecast - as you can see pretty well effective

But as you see there is always a bias in the prediction, and not always a good one naturally, the proximity between analogues looking for the old way by correlation, I understand that this is one of the most unsuitable ways, so I wanted to replace the algorithm that would be looking for similarities in the amplitude, phase, frequency. Now do you understand what I mean when I say Fourier?

 

Dr.Trader

How's your neural network doing?

RNeat? No, the training is very slow, the fitness that determines the model is now 0.018, growing one hundredth a day. Accuracy on the training and validation data is now 0.52, very little, but at least it's in the plus side and without retraining.
 
Yury Reshetov:
How?

Well, just before comparing the two vectors, I scaled with the " scale " function

scale(x = data , center = TRUE, scale = TRUE )

 
Yury Reshetov:
How?
I wondered downloaded version 6.0 because 5.0 does not save and does not create a text file, so it is not clear why in the training some error values, but in the text file values are completely different???
 
Mihail Marchukajtes:
Interesting downloaded version 6.0 because 5.0 does not save and does not create a text file, so it is not clear why during training one error values, but in the text file values are completely different???
In the text file, the characteristics for the binary classifier, and after training for the ternary. There are two grids and if their readings coincide, we get an affirmative answer, if they differ, we get a dash. Binary classifiers always give only affirmative answers irrespective of the fact whether the data of similar patterns was or was not present in the sample. Ternary classifiers sometimes give no affirmative answers, if the training sample did not contain similar patterns.
 
Dr.Trader:
RNeat? No, the training is very slow, the fitness that determines the model is now 0.018, growing one hundredth a day. Accuracy on training and validation data is now 0.52, very low, but at least it's in the plus side and without retraining.
Oh 52 is better than 50, as I remember the last time it was 0,017 so one hundredth makes it 2% more accurate), I think if the network is good enough it's better to rewrite it for SI, keep me posted, I'm very interested...
 
mytarmailS:
Oh 52 is already better than 50, as I remember it was 0,017 last time, so one hundredth raises prediction accuracy by 2%) , I think if the network is worth attention it's better to rewrite it on SI, keep me posted, I'm very interested...

The fitness may grow simply because the model has improved its topology and dropped a couple of neurons, for the same accuracy.
As far as I understand from the comments in the code, it's a port from Lua. And Lua is also a port, because the original was already in c++:http://nn.cs.utexas.edu?neat
Port from port is unfortunate, a lot of unnecessary actions, it would be better if the author of RNeat took C++ code as a basis, and applied the existing R genetic packages to evolve the network.

Reason: