Unfortunately, I've lost the code to generate this model and the backtest results. If I remember right, the R
2 was marginally lower than that of an exponential trend, which means that the model is probably marginally
less accurate than an exponential extrapolation. The graph in the OP is roughly accurate so far only by coincidence.
- Treat the logarithm of the time series as a function with domain [0, π).
- Detrend the dataset.
- Fit the function as a linear combination of sin(x), sin(2x), sin(3x), etc. to the desired precision.
- Extrapolate this to the domain [π, 2π).
- Retrend the dataset and remove the logarithm to get predicted price values.
- Multiply by the "depression factor" to correct predicted price values so as to be consistent with today's price.
Since this algorithm has no skill, I feel comfortable sharing it as a curiosity. Does anyone else have any similar failed models that nevertheless produce interesting results?
You mean you changed the entire domain available at the time to [0, π)? Or do you change every year to [0, π), or something like that?
If it's the first, how do you refit the model as more data becomes available? Do you set the entire domain to [0, π) every time?
The "depression factor" bothers me. You mean, your model yields an expected price, which you have to change to current price?
Instead of doing that, try creating a model for the differences in price. That way, you won't need any depression factor. See the first model in my signature for an example.
Yes, I agree that the "depression factor" is not at all desirable. Also, you are correct that the refits require compressing the domain, and so even a minor refit can produce a significant change in the model. The only benefit of the model seems to be that the price movements look more natural than the other ones I've tried, with only negligible loss of skill. I will look at your model when I have time.