Linear XY Regression: Coefficient of Regression (Slope)

Abbreviation: LinXYReg Slope
Category: Regression

Input Parameters:

Name Range Default
X Axis Close
Y Axis Close
Regression Periods Int >= 3 40

 
Calculation:

[ n * sum(X*Y) – sum(X) * sum(Y) ]

[ n * sum(X*X) – sum(X) * sum(X) ]

where
sum(X*X) = sum of X*X over the last n periods
sum(X*Y) = sum of X*Y over the last n periods
sum(X) = sum of X over the last n periods
sum(Y) = sum of Y over the last n periods

X = X Axis
Y = Y Axis
n = Regression Periods

 
Discussion:

Computes the slope of the linear regression line. Note that the linear regression line is the straight line that provides the best fit to the X and Y points over the last n periods.
 

Was this article helpful?

Related Articles