I'm using the Neat algorithm to build a day trading bot, I'm using market data (2800 days worth) but getting a little stuck on how to correctly train. The market data contains the date and price. I make sure the neural network stays small enough to prevent over-fitting.
The first part of the problem:
If I just calculate the score with all the raw data and then evolve (1 cycle); the model is good for that whole set of data. When using the model, you have to start on day one. If you start on day 10/etc, the model breaks.
So I modified the model so after each cycle, it increases the starting day by one and then starts again at one when it's on the last day. But once it starts again (day one) the model breaks in training. It has had too many mutations and no longer can do the beginning.
So I modified the model so it would only evolve when the starting point starts again (day one) i.e after its going through the data 3921400 (2800+2799+...) times. But doing it this way seems like it would take forever. It seems to get stuck too easily.
What is the best way to solve this kind of problem? I'm guessing that I need to shuffle the data somehow? But what is the correct way?
2nd part of the problem:
I was lucky and got a genome that worked good enough without the 3rd modifications. But when I used the testing data, it failed badly.
I'm using the Neat algorithm to build a day trading bot, I'm using market data (2800 days worth) but getting a little stuck on how to correctly train. The market data contains the date and price. I make sure the neural network stays small enough to prevent over-fitting.
The first part of the problem:
If I just calculate the score with all the raw data and then evolve (1 cycle); the model is good for that whole set of data. When using the model, you have to start on day one. If you start on day 10/etc, the model breaks.
So I modified the model so after each cycle, it increases the starting day by one and then starts again at one when it's on the last day. But once it starts again (day one) the model breaks in training. It has had too many mutations and no longer can do the beginning.
So I modified the model so it would only evolve when the starting point starts again (day one) i.e after its going through the data 3921400 (2800+2799+...) times. But doing it this way seems like it would take forever. It seems to get stuck too easily.
What is the best way to solve this kind of problem? I'm guessing that I need to shuffle the data somehow? But what is the correct way?
2nd part of the problem:
I was lucky and got a genome that worked good enough without the 3rd modifications. But when I used the testing data, it failed badly.
How would do I do some kind of cross-validation?
Example of the data:
Code
Here is some of the code that might help understand my problem.