Skip to content
All library documents

Fitting Nonlinear Price Forecasts with a Seven-Term Regression Model

Article MQL5 articles

Summary

The article proposes a nonlinear regression equation for forecasting prices from two prior observations. Its seven terms combine linear and squared price inputs, a difference representing momentum, a sine component intended to capture cycles, and a constant. The author assigns interpretations to these terms, such as acceleration, memory, impulse, rhythm, and baseline level. Coefficients are selected with Nelder-Mead, which the article favors over the author’s experiments with gradient descent and genetic algorithms. The loss function uses mean squared error and tracks R-squared during fitting.

The account is mainly a personal development narrative, with coefficient behavior described from the author’s experiments rather than a controlled comparison or fully reported validation results. The article acknowledges prior overfitting and losses, and cautions that its trading implementation uses dollar-cost averaging, which can expose an account to severe drawdowns. It does not establish forecast accuracy or profitability across independent data. The model’s fit and selected coefficients may be sensitive to the sample and optimization setup, so the reported interpretations should be treated as hypotheses rather than general market properties.

Key ideas

  • The proposed forecast combines linear and quadratic terms, lagged prices, momentum, a sine term, and a constant.
  • The model uses Nelder-Mead to tune its coefficients against a squared-error objective.
  • The author describes coefficient behavior from experiments but does not provide controlled evidence of predictive advantage.
  • Historical fit can fail in live trading, as the author’s own overfitting experience illustrates.
  • The trading EA averages positions and is explicitly described as carrying substantial account risk.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.