For my program, I used the raw, unprocessed data from column 7 of inputData.csv in
https://www.elitetrader.com/et/thre...-prediction-models.357511/page-3#post-5368622
I didn't want to normalize or standardize the data because I wanted to fit the actual data. And I've never found volume too useful for machine learning problems because it varies too much.
My x values were offsets in number of days from the input data (0 through 88 for the data I posted for fitting; > 88 for predicting the future).
It's possible your genetic optimization for function minimization implementation
- Trained with too few or too many generations.
- Had a too small or too large population size.
- Used a crossover that mixed data of different types (e.g., y intercept of a parabola and frequency of a cosine wave probably shouldn't be crossed over).
- Initialized and/or mutated parameter values that had no chance of helping (e.g., using a value of 123456789 when the input data was orders of magnitude away from that).
- Used a pseudorandom number generator that wasn't very random or had too short a period. I use WELLRNG44497 (ported from http://www.ritsumei.ac.jp/~harase/WELL44497a_new.c).
Another thing that could help is using a larger input data size. I've been using 123 calendar days instead of the 89 I posted in this thread because the results seem more consistent among different runs on assorted assets.
Regarding other function minimizers/sinusoid fitters, I tried
None of these worked that well for me, because they would sometimes not be able to find a good solution (or sometimes any solution at all).
So then I tried function minimization by genetic optimization and later linear genetic programming. I currently use the genetic optimization method because my genetic programming implementation produced about the same results but ran slower.