OPEN-SOURCE SCRIPT

Forecasting - Quadratic Regression

By capissimo
Updated
This script is written totally thanks to Alex Grover (tradingview.com/script/CDsPknAG-Quadratic-Regression/). Here it is implemented in conjunction with the seasonal forecast I showed in one of my previous posts. It takes the calculated QReg curve and extends its last section (Season) into the future (Forecasted periods).
Release Notes
Note:
A quadratic regression is the process of finding the equation of the parabola that best fits a set of data. As a result, we get an equation of the form: y = ax^^2 + bx + c where a ≠ 0.
See: varsitytutors.com/hotmath/hotmath_help/topics/quadratic-regression
Release Notes
Minor fix.
Release Notes
Minor fix to the seasonal_naive function.
forecastingquadraticregressionTrend AnalysisVolatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer