TradingView
alexgrover
20 אוג׳ 2018 21:39

Quadratic Regression 

EUR/USDOANDA

תיאור

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



Here it look like the Quadratic Regression have a best fit than the LSMA
תגובות
NAD3
Thank you for taking your time to write this script...Terry
mcbw_
Hey @alexgrover, have you ever tried implementing any more sophisticated forms of regression? I've been interested in seeing what ridge regression or lasso regression does on the charts.

Regards
alexgrover
@mcbw_, Im not into regression analysis but i can give it a try.

Best regards :)
mcbw_
@alexgrover, It would be super interesting. Let me know if you want to put something together!
sudhir.mehta
great! thanks for sharing!!!
syracusepro
What the variable n stands for? Thanks.
alexgrover
@syracusepro, the number of data samples :)
עוד