0

Suppose we are calculating a 5-day simple moving average (SMA) of a stock's closing price:

  • If it is now the end of the trading day on Friday, we can calculate the SMA using the closing price on Friday, Thursday, Wednesday, Tuesday, and Monday. The total time period covered by the calculation is 4 days (Monday close to Friday close).

  • If it is now the end of the trading day on Monday, we can calculate the SMA using the closing price on Monday, Friday, Thursday, Wednesday, and Tuesday. The total time period covered by the calculation is 6 days (Tuesday close to Monday close).

Notice the difference in the total time period covered by each calculation. Isn't there a problem with this inconsistency?

The difference between the closing price on Thursday and the closing price on Friday represents the price change over 24 hours (1 day). However, the difference between the closing price on Friday and the closing price on Monday represents the price change over 72 hours (3 days). Presumably, the average price change between Friday and Monday is greater than the average price change between any other two consecutive trading days, because the Friday-Monday gap is 3 days instead of the usual 1 day.

The problem gets even worse when there are holidays. For example, when calculating a 3-day SMA over a 3 day long weekend, the time period covered by each average calculation ranges from 2 days to 5 days.

In light of the inconsistent time periods explained above, why do technical analysis software and literature seem to ignore the problems caused by weekends and holidays when calculating moving averages?

5

Because stocks don't trade on weekends.

Why should the average price change between Friday and Monday be any different from the price change for any other two consecutive trading days? Most if not all markets are closed on weekends and holidays. Whatever happens on Saturday and Sunday will be acted upon once the markets open on Monday morning.

For the purposes of analysis, weekends and holidays pretty much don't exist. It's as if somebody hit a big Pause button Friday afternoon and then unpaused it again on Monday morning.

The total (calendar) period will thus differ, but the number of trading days will be the same for any position of the sliding window. If you did it the other way around, there would always be an artificial dip in observed volatility for windows that overlap a weekend.

2
  • 1
    "Why should the average price change between Friday and Monday be any different from the price change for any other two consecutive trading days?" Because it reflects 72 hours worth of events rather than 24 hours? Major companies don't stop operating and world news doesn't stop breaking over the weekend.
    – nanoman
    Aug 26 at 13:50
  • @nanoman Sure, but (without having any actual data to back it) I would tend to assume that the rate of interesting things happening is lower on weekends than on business days. Say, companies rarely publish financial reports on weekends (or outside business hours, for that matter). Also, I'm not convinced the Monday morning price changes end up being exactly the same as if the market was also open on Saturday and Sunday. Sure, major events will be priced in similarly, but all the random walk around that will just be skipped.
    – TooTea
    Aug 26 at 14:09
1

If it is now the end of the trading day on Friday, we can calculate the SMA using the closing price on Friday, Thursday, Wednesday, Tuesday, and Monday. The total time period covered by the calculation is 4 days (Monday close to Friday close).

For starters, your premise is wrong. A daily bar represents a one time period from the opening of trading to the close of trading. A full week's trading (Monday to Friday) represents five such days so the time period covered by the calculation is 5 days not 4. To repeat, one reading represents ONE day of trading.

A moving average is a mathematical calculation of a subset of data points in a full set of data. Typically, this was done on daily data but traders reduce the time preiod to as short as one or five minute bars. With no trading on Saturday or Sunday, there are no data points on those days. Therefore, non trading days are not considered to be part of the data set and therefore they are ignored.

If it is now the end of the trading day on Monday, we can calculate the SMA using the closing price on Monday, Friday, Thursday, Wednesday, and Tuesday. The total time period covered by the calculation is 6 days (Tuesday close to Monday close).

This is more of the same off the rails reasoning. This would be as silly as asking you to calculate a 5 minute moving average for a day when there is no trading.

The short answer is that you have created an alternative interpretation of what a moving average is and that interpretation is incorrect.

2
  • Your definition of a moving average does not match that in the physical sciences. I would assume you are modelling the true value of the company, with trading prices as samples of valuations. Just because you have no samples on Saturday and Sunday does not mean the value is not changing. Eg. if one was correlating bitcoin price (traded 24/7) with coinbase stock price it would not make sense to ignore changes over the weekend just because you have no valuations then. In fact it would seem even more important, as you should know when the value has changed so you can act 1st think Monday.
    – Dave
    Aug 26 at 13:59
  • 1
    LOL. It's not my definition. You are free to create your own criteria for analysis but the markets have calculated moving averages this way for over 100 years. Your latest supposition is also contradictory and incorrect. If crypto is trading 24/7 then there are data points for Saturday and Sunday and then weekend data would be included in a moving average calculation. Aug 26 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.