Search code examples
time-seriesforecastingstocksmoothing

How to calculate Exponential Moving average for a Stock


I have searched a lot and every authour of Website gave a formula for EMA Calculation as shown below

EMA = EMAp + {K * (Price - EMAp)}

EMA = exponential moving average
EMAp = the previous period exponential moving average
K = smoothing constant
Price = current price 

But nobody has mentioned how to get the previous period exponential moving average

Could you please tell me how to get the previous day EMA ??


Solution

  • Exponential smoothing is a recursive formula for time-series analysis. As a basis case, you start with the actual data for the first time series data point. So, in your case you would use the actual stock price for the first day and then start using your formula for the second day.