Skip to main content
Track System optimization
20 / 23
Library

2006issue C061-9

A linear-regression next-bar forecast needs a searchable cutoff

A three-bar linear regression of closes yields a next-bar forecast, but that residual becomes a mechanical rule only after it is scaled into alpha and compared with a cutoff. The archive supplies a default cutoff and then searches a small parameter-grid instead of treating the threshold as a fixed constant.

  • A next-bar close forecast from a three-bar linear regression of closes becomes alpha when the residual versus the current close is divided by a seven-bar standard deviation of one-bar price changes, and only when that standard deviation is positive.
  • The mechanical rule reads the previous bar’s alpha against a cutoff and the negative of that cutoff, then outputs a signal of +1, -1, or 0, staying flat in the open band.
  • Chart, table, and strategy defaults use a three-bar forecast-length, a seven-bar standard-deviation-length, and a cutoff of 1.04, while a ten-step parameter-grid reports the best-cutoff by peak fractional-gain.
  • A later rewrite keeps the same three-bar forecast and seven-bar deviation construction and exposes long and short coefficients as optimizable inputs over zero to 1 in steps of 0.1.
Entries in this reading3 entries

From a next-bar forecast to alpha

A next-bar close forecast is formed with a three-bar linear regression of closes. The residual versus the current close is then divided by a seven-bar standard deviation of one-bar price changes. That scaled score is alpha, and it is used only when the standard deviation is positive.

Forecast-length is the number of recent closes used to fit the linear regression that produces the next-bar price forecast. Standard-deviation-length is the lookback used to estimate a typical one-bar price change so the forecast residual can be expressed in volatility units.

A cutoff turns lagged alpha into a signal

The mechanical rule goes long when the previous bar’s alpha exceeds a cutoff, goes short when that lagged score falls below the negative of the cutoff, and stays flat otherwise. The integer rule output is the signal: +1, -1, or 0.

Default inputs supplied for the chart, table, and strategy implementations are a seven-bar standard-deviation-length, a three-bar forecast-length, and a cutoff of 1.04.

GM fractional gain at the default 1.04 cutoff

On daily General Motors the default 1.04 cutoff turns the volatility-scaled next-bar forecast into a long/short rule. Cumulative fractional gain stays near zero through March–April 2005, then steps higher in early May and early June and finishes at 0.25 by 10 October. The path was read from the eSignal Trading System pane; the quote box on that same screenshot prints Fortune 0.25, which matches the last plotted point.
On daily General Motors the default 1.04 cutoff turns the volatility-scaled next-bar forecast into a long/short rule. Cumulative fractional gain stays near zero through March–April 2005, then steps higher in early May and early June and finishes at 0.25 by 10 October. The path was read from the eSignal Trading System pane; the quote box on that same screenshot prints Fortune 0.25, which matches the last plotted point.GM · Daily · 2005-03-07T00:00:00.000Z to 2005-10-10T00:00:00.000Z

Forecast is a 3-bar linear regression of the close; omega is the 7-bar standard deviation of one-day price changes. The pane is labeled Trading System (1.04), the archive default cutoff. Intermediate points are approximate readings off the raster; the terminal 0.25 is also printed in the quote box.

Search the cutoff on a parameter-grid

A companion table implementation builds ten cutoffs from an initial value of 1.04 plus increments of 0.02. That set is the parameter-grid. On the last bar the table reports the best-cutoff, the grid member whose recorded peak fractional-gain path is highest.

On each bar with a non-zero signal and a positive prior close, the table adds the signed one-bar percentage change to that cutoff’s fractional-gain total and increments a win or loss count by the sign of that increment. Fractional-gain is the running sum of those signed one-bar percentage changes, taken only on bars where the rule is not flat.

Strategy form and a later coefficient rewrite

The strategy form enters long or short at the close when current alpha crosses the plus or minus cutoff, and flattens when alpha returns from beyond that cutoff into the open band between the two thresholds.

A later platform rewrite uses the same three-bar forecast and seven-bar deviation construction but exposes long and short coefficients as optimizable inputs over zero to 1 in steps of 0.1, or as fixed coefficients such as 0.6 on a daily Yahoo chart.

The procedure is presented as software implementations that turn a spreadsheet forecast-and-threshold idea into indicators, a tabular parameter comparison, and an optimizable mechanical system.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
20 of 23 in the System optimization track
20156-6 pp.Next on System optimizationConstruct if-then rules, then backtest and optimizeConstruction is more than writing an entry idea. It requires relevant data, a backtest, and optimization before the procedure is treated as complete.
All readings on this track · 23 readings
  1. 1984Evaluating mechanical systems beyond net profit
  2. 1987Mechanical systems need more than pretty charts
  3. 1987Evaluating silver moving averages and RSI by scoring rule
  4. 1988Simple systems over optimized complexity
  5. 1988Cycle rule inputs until the parameter search stops
  6. 1990Split-sample tests for stochastic parameter grids
  7. 1993Four-subsystem trading system construction
  8. 1993Randomized price paths for stock system parameters
  9. 1994Mechanical timing with out-of-sample and filter checks
  10. 1995Evaluating asymmetric percent-reversal trading rules
  11. 1996Evaluating a daily volume-strength and new-high new-low timing procedure
  12. 1997Rule-based intraday system design with genetic search
  13. 1997Evolving three-rule systems with genetic templates
  14. 1997Audit the holdout and the exposure before the fitted entries
  15. 2001Inner weights are part of the candlestick signal
  16. 2003Mechanical short-term rules for news-sensitive rallies
  17. 2004Band construction as a testable trading procedure
  18. 2006Layered day-session automation from brackets to rules
  19. 2006Why mechanical rules must be retuned per security
  20. 2006A linear-regression next-bar forecast needs a searchable cutoff
  21. 2015Construct if-then rules, then backtest and optimize
  22. 2015Mechanical system design as a critique of discretion
  23. 2025Joint channel design with a trend filter and stop-loss orders
All 131 readings tagged System optimization
Also on System optimization5 readings