I am trying to create a least square moving average of the closing price of a stock. I tried using the TREND function in Excel and it is not giving me the proper results. Instead of using the built in function I would like to do it manually in Excel. I have enclosed the stock price data with what the result of a least square moving average should be. I got these results from my stock charting software, TradeStation. I have looked everywhere for this excel formula but can not find it. It looks like the main formula is Y=m*x+b, but how do you apply this in formula in columns in Excel.
Can you please help me in creating the proper formulas to create this least square moving average. The average would be based on the look back period. In my example I have it set to 34 period look back.
Thanks, Steven
Bookmarks