Simple Moving Average (SMA)
What is a Simple Moving Average?
A Simple Moving Average (SMA) is a statistical tool we use to smooth out data by creating a constantly updated average price. Essentially, it’s the average stock price over a specific period of time.
The formula for SMA is straightforward: we add up the closing prices of the stock for a set number of time periods and then divide by that same number of periods.
The formula for calculating a Simple Moving Average (SMA) is:
SMA = (Sum of closing prices for a specified number of periods) / (Number of periods)
For example, to calculate a 10-day SMA, we would:
- Add the closing prices of the stock for the past 10 days.
- Divide the total by 10.
This process gives us the average price of the stock over the last 10 days, which is the 10-day SMA.
Number of Days | Closing Prices | Simple Moving Average (SMA) |
---|---|---|
10 | Sum of closing prices from Day 1 to Day 10 | Total divided by 10 |
20 | Sum of closing prices from Day 1 to Day 20 | Total divided by 20 |
50 | Sum of closing prices from Day 1 to Day 50 | Total divided by 50 |
By using SMA, we can identify trends in stock prices over time and make more informed decisions about when to buy or sell securities.
The length of the time period for SMA can be adjusted to suit our investment strategy, with shorter periods being more responsive to price changes and longer periods providing a more smoothed out trend line.