Linear Regression (or) Least square Moving Averages

The LSMA or Linear Regression Indicator is also called “End Point Moving Average”. This Indicator is applied for trend identification & trend following in the same way as moving averages.

least square

LSMA helps to identify forward projections from the current period by calculating the least squares regression line for the preceding time periods.

Therefore, the indicator can suggest the possibility of what could happen if the regression line continues.

How do we calculate the Least Squares Moving Average?

The indicator is based on sum of least squares method to find a straight line that best suits data for the selected period. The end point of the line is plotted and the process is repeated on each succeeding period.

The formula for calculating the line of best fit is:

least square

In the chart below

We can notice that, the LSMA indicator (blue line) has been applied in the in the Daily chart of Silver.

The default settings of 47 Day – LSMA has been applied.

when the price deviates from the indicator . The LSMA generates signals.

least square

Now, like any other moving average, we need to assess when the least squares moving average is indicating a change in trend.

If the signal changes to an uptrend along with recovery in prices, a buy signal is generated. If the signal changes to a downtrend along with a fall in price, a sell signal is generated.