Skip to content
All library documents

Using Linear Regression, Time-Series Forecast, and Standard Deviation Indicators

Article vn.py community

Summary

This short example demonstrates adding three technical-analysis series to closing-price data: a linear regression value over a 14-period window, a time-series forecast over the same window, and a standard deviation over five periods. It also shows plotting the close alongside the regression and forecast series, with the chart arranged into separate panels.

The material is a compact indicator example rather than a trading strategy. It gives no rules for entries, exits, or position sizing, and provides no backtest or evidence that these measures predict returns. The regression and forecast can describe or extrapolate recent price behavior, while standard deviation summarizes dispersion; their usefulness depends on the data, parameter choices, and how they are incorporated into a tested process.

Key ideas

  • A 14-period linear regression indicator can summarize the fitted closing-price level over a rolling window.
  • A 14-period time-series forecast extends the recent fitted price pattern.
  • A five-period standard deviation provides a short-window measure of price dispersion.
  • Plotting indicators beside closing prices can help inspect their behavior, but the example gives no trading rules or performance evidence.

Tags

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