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

 
Vladimir Karputov:

I can't print the first five lines of the DataFrame object.

I take the script from the 'data folder'\Scripts\Python\copy_rates_from.py' package and add the lines:

and the method doesn't output anything:

Maybe I should do it this way?
print( rates_frame.head())
 
elibrarius:
How about this?
print( rates_frame.head())

no, it seems to be some kind of a messed up ide

 
Aleksey Vyazmikin:

That's why we didn't know at the time that pivot points are poorly predicted by this method, and training is mostly by trend....

It is quite reasonable to use different strategies for diversification, and MO helps to improve basic strategies, which is what I suggested to use in the article.

So it's not about pivot points, is it?

It's about a solid "Perfect" teacher. Save in each line of time series Time/OHLC/V also information from the future, which will definitely still go up without a rollback at a given %/points, and it will last for so many that bar. You may choose (let the algorithm choose) what is better predicted and trained. It may be better and more robust (with minimal retraining/fitting) to which target it evolves.

 
dr.mr.mom:

It's not about pivot points, is it?

It's about a solid "Perfect" teacher. Save in each line of time series Time/OHLC/V also information from the future, what exactly will still go up without rollbacks by the given %/points, and it will last for so many bars. You may choose (let the algorithm choose) what is better predicted and trained. It evolves into a better and more robust target (with minimal retraining/fitting).

There are many variations. There is no goal to choose the best hypothetical variant.

 
mytarmailS:

This is what the balance looks like


Is the spread taken into account?

 
mytarmailS:

I'm studying optimization algorithms, and a little bit of Fourier...

I came up with the following thing: I decided to build a trading system out of 4 sinusoids...

The problem is this: to find sinusoids (or rather their parameters (amplitude, frequency, phase)), trading on which will give the biggest profit


I searched for the sinusoid parameters using the annealing simulation method

Parameter search graphic (or training))

This is what the result looks like, 4 simple, clear functions

Trade on the signals from the sum of sinusoids

This is how the balance looks like

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

In short, the idea itself seems interesting to me, in the sense that any kind of functions can be created with harmonics...

You can create new signs, trading systems, or you can synthesize anything you want, and it is cool!



I doubt it, but maybe someone will be interested in the code.

You are counting it wrong.

sig <- ifelse(res>=0, 1, -1)
library(TTR)
euqity <- function(sig,x){
  sig <- dplyr::lag(sig)%>% na.omit
  dC <- c(NA, diff(x))
  cumsum(sig * tail(dC, length(sig) )
}

The signal should be shifted back 1 bar. I think it's clear why.

Good luck

 
elibrarius:

Is the spread taken into account?

No, the purpose of the post is different, to introduce the Fourier on a practical example

Vladimir Perervenko:

You're counting it wrong. change it to the one below

Thank you, I'll fix it, I wrote it fast.

 
mytarmailS:

No, the purpose of the post is different, to introduce Fourier using a practical example.

It is better to get acquainted with reality, not with rose-colored glasses)

Subtract 0.00005 from each trade and the curve will go down. It will go down to about -0.06.
 
mytarmailS:

No, the purpose of the post is different, to introduce Fourier using a practical example

Write an article.

 
mytarmailS:

I'm studying optimization algorithms, and a little bit of Fourier...

I came up with the following thing: I decided to build a trading system out of 4 sinusoids...

The problem is this: to find sinusoids (or rather their parameters (amplitude, frequency, phase)), trading on which will give the biggest profit


I searched for the sinusoid parameters using the annealing simulation method

Parameter search graphic (or training))

This is what the result looks like, 4 simple, clear functions

Trade on the signals from the sum of sinusoids

This is how the balance looks like

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

In short, the idea itself seems interesting to me, in the sense that any kind of functions can be created with harmonics...

You can create new signs, trading systems, or you can synthesize anything, and it is cool!



I doubt it, but maybe someone will be interested in the code.

Very interesting, thank you for sharing. As soon as I figure out my current tasks I will try to run the code.

Reason: