OPEN-SOURCE SCRIPT

Quadratic Regression

10 823
A quadratic regression is the process of finding the equation that best fits a set of data.This form of regression is mainly used for smoothing data shaped like a parabola.

Because we can use short/midterm/longterm periods we can say that we use a Quadratic Least Squares Moving Average or a Moving Quadratic Regression.

Like the Linear Regression (LSMA) a Quadratic regression attempt to minimize the sum of squares (sum of the squared difference between a set of data and an estimator), this is why
those kinds of filters have low lag.

Here the difference between a Least Squared Moving Average (green) and a Quadratic Regression (red) of both period 500

snapshot

Here it look like the Quadratic Regression have a best fit than the LSMA

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.