Moving Average Time Series Forecasting with Excel

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024

Комментарии • 58

  • @Terniedintorni
    @Terniedintorni 3 года назад +3

    Very well done. Amazing explanation. Easy for everyone! Thanks

  • @missmona9731
    @missmona9731 7 месяцев назад +1

    This was extremely helpful - Thank You!

    • @MattMacarty
      @MattMacarty  7 месяцев назад +1

      Glad it was helpful!

  • @hassanalianees5530
    @hassanalianees5530 Год назад

    Thanks buddy. You saved me

  • @thebongscookbook2273
    @thebongscookbook2273 4 года назад

    nicely explained

  • @NCF80M3
    @NCF80M3 2 года назад

    How would you do this for a large data switch non uniform / random dates? I’m trying to show moving average of how open positions have been open since Jon posted date and the dates are all over. All videos like this start with uniform date delta

    • @MattMacarty
      @MattMacarty  2 года назад

      Hi Tyler. This kind of model assumes a sequential time series. It would not be useful for a random sample. You might try regression for random sampling.

  • @grillvogel3455
    @grillvogel3455 Год назад

    If I have monthly totals for the last two years (24 observations) and want to forecast another two years, how do you adjust the formulas to accomplish this? I’d like to use a 3 month moving average. So where my dataset ends, how do I forecast where the observations end?

    • @MattMacarty
      @MattMacarty  Год назад

      You really can't do it. Since these models are reliant on past observations, eventually your forecast becomes the last observed data point as you move out into the future.

  • @user-vx5vp7ig4t
    @user-vx5vp7ig4t 3 года назад

    TQ

  • @denvervegas1909
    @denvervegas1909 3 года назад +1

    where does the 1.28 in cell H4 come from? (towards the end of the video, under 10 week forecast errors)

    • @MattMacarty
      @MattMacarty  3 года назад +1

      Hi. It's the median absolute deviation, which I forgot to talk about. Just for comparison to the mean. In a "good" forecasting model they should be abolut equal.

  • @azar77840
    @azar77840 26 дней назад

    how we did not forecasting for 1/1/18, this there specific reason for it ?

    • @MattMacarty
      @MattMacarty  19 дней назад

      Yes. If you forecast 1/1, you will incorporate look ahead bias. Your first 5-period MA forecast will occur at the 6th obsevation.

  • @analizamagnaye9906
    @analizamagnaye9906 5 лет назад +2

    How can you forecast the data in week 6/4/2018 and so on? Can we use the same method being use before this week and just use the forecasted data(125.45 in week 5/28/2018)?

    • @MattMacarty
      @MattMacarty  5 лет назад +3

      Thanks for your question. With these models, if I am using 5 data points to forecast 1 period into the future, that's really all I can do. If I out one more period, then I will only have 4 actual data points to base the forecast at t+2 on. Going farther out into the future you could rely on the forecast value, but your error tends to increase.

  • @emensonjean7424
    @emensonjean7424 4 года назад +1

    thank you for sharing. I played fantasy sports, can this moving average predict the next performance of player?

    • @MattMacarty
      @MattMacarty  4 года назад +2

      It's hard for me to imagine a good application of this method for a single football player. Mainly because there are lots of explanatory variables to consider. So if you are looking to forecast something like rushing yards it will depend on things like the defense being played against, are they home or away, how many carries, etc.

    • @MattMacarty
      @MattMacarty  4 года назад

      @@annadad2023 Let me think about this. It's really a different kind of model where we are optimizing some outcome. It will be pretty involved.

  • @moesadr3342
    @moesadr3342 3 года назад

    How I can calculate equivalent EMA in different time frame? i.e. I would like to find stocks which their price is higher than 13 EMA on a weekly chart frame but my options are Daily Moving Averages like 20,50,100 and 200. So what daily EMA number would represent 13 weekly EMA? Can anyone help please?

    • @MattMacarty
      @MattMacarty  3 года назад

      See this video: ruclips.net/video/IjETktmL4Kg/видео.html EMA 13 is effectively alpha = 0.14ish

    • @moesadr3342
      @moesadr3342 3 года назад

      @@MattMacarty thanks for the input but I am not sure if I understand. Do I have to go through the Excel spreadsheet to generate the result? Or you are saying if a stock's Alfa is around 0.14 then it's price should be at 13 weeks EMA?

  • @aryaandhika8613
    @aryaandhika8613 3 года назад

    Hi Matt, thanks for the great video. Do you mind to explain what is the difference between Mean Absolute Deviation (MAD) and Mean Absolute Error (MAE)? Because the formula that you are using for calculating MAD is similar with MAE.

    • @MattMacarty
      @MattMacarty  3 года назад +2

      Glad it helped. Just a different name for the same thing. MAD makes for a catchier acronym!

  • @AlyzaJoyPabillore-uu5ql
    @AlyzaJoyPabillore-uu5ql 9 месяцев назад

    So where did u use the k+1 data?

  • @NewClips-yv9rl
    @NewClips-yv9rl Месяц назад

    Nicely Explained. I have a question - How can we utilize MAD, MAPE to improve our model ?

    • @MattMacarty
      @MattMacarty  19 дней назад

      You will would try several different MA periods, say 5, 10, etc. and look for the model that minimizes the error measurements

  • @skepptickle1522
    @skepptickle1522 4 года назад

    how do you deal with real-life scenarios? i.e., missing data? should we just use interpolation methods?

    • @MattMacarty
      @MattMacarty  4 года назад

      Yes I might use something like the median of the surrounding values assuming there is no reason to believe the missing data is vastly different. You could also just fill forward the last known data point into the missing one.

  • @alhawraalshams2388
    @alhawraalshams2388 4 года назад

    Thank you for the video. My question is how do we determine how many period to include? Why did you choose 5 or 10?

    • @MattMacarty
      @MattMacarty  4 года назад +1

      It really depends on the data you are looking at, and stock prices are notoriously difficult to forecast. I chose these lookback periods arbitrarily just to compare two different forecasts using the same method.

    • @Diego-ck9zl
      @Diego-ck9zl 4 года назад

      @@MattMacarty and if you were forecasting sales, how do you determine the periods to include? Don´t it have to be the one who minimize the errors?

    • @MattMacarty
      @MattMacarty  4 года назад +1

      @@Diego-ck9zl It is sort a trial and error approach. Over time you see which forecasts work the best. As a baseline though I would choose something that historically has lower errors. Forecasting is both Art and Science.

    • @lisaculp6864
      @lisaculp6864 4 года назад

      I need to do a forecast of staffing need. How do I do that?

    • @rainbowdu509
      @rainbowdu509 2 года назад

      @@lisaculp6864 how did u go?

  • @mohammadsalim9547
    @mohammadsalim9547 3 года назад

    hi
    in this case how can we do for next 7 months forecasting

    • @MattMacarty
      @MattMacarty  3 года назад

      You can't use this model to reliably forecast more than one period since moving out farther drops actual observations. Eventually your forecast just becomes the last observation.

  • @nidhiparker9133
    @nidhiparker9133 2 года назад

    Is this simple, exponential or weighted MA?

    • @MattMacarty
      @MattMacarty  2 года назад

      This one is simple moving average. This one is weighted and Exponential: ruclips.net/video/IjETktmL4Kg/видео.html

  • @yangli5208
    @yangli5208 5 лет назад

    how can you forecast the data after week 6/4/2018?

    • @MattMacarty
      @MattMacarty  5 лет назад +1

      Thanks for your question. With these models, if I am using 5 data points to forecast 1 period into the future, that's really all I can do. If I out one more period, then I will only have 4 actual data points to base the forecast at t+2 on. Going farther out into the future you could rely on the forecast value, but your error tends to increase.

  • @kalyankumar2790
    @kalyankumar2790 2 года назад

    I can't understand 😕

  • @raphaelbonillo2192
    @raphaelbonillo2192 2 месяца назад

    This is not a forecast. Where is the extrapolation with the data? You are just drawing the trend

    • @MattMacarty
      @MattMacarty  2 месяца назад

      This kind of model will forecast out one period into the future. Most of the work is to fit the model and measure how well it can be expected to forecast.

  • @user-xn5tb9sc8j
    @user-xn5tb9sc8j Год назад

    你算錯了

  • @samwoon1947
    @samwoon1947 4 года назад

    is there any fast way to forecast 1000 part numbers (inventory) at one go?

    • @MattMacarty
      @MattMacarty  4 года назад

      Do you mean to forecast each one based on its own history?

    • @samwoon1947
      @samwoon1947 4 года назад

      @@MattMacarty yes correct. each part number base on 3 years historical data to forecast.

    • @MattMacarty
      @MattMacarty  4 года назад +2

      @@samwoon1947 Assuming you can get all of the data in one file, you should be able to do this with a Macro in Excel. I would output the results to a second workbook. It would be pretty easy to do this in Python or other languages as well.

    • @samwoon1947
      @samwoon1947 4 года назад

      @@MattMacarty thanks and appreciate your reply. =)
      .but even with macro I will need to manually enter one part number at a time (since the formula is based on each PN). and that will also mean that many worksheets need to be created separately . and end of the day, manual entering of each PN is tedious and compile it into one worksheet after that is also tedious.

    • @MattMacarty
      @MattMacarty  4 года назад +1

      @@samwoon1947 I think I would look at automating this with Python. It might be painful the first time, but after that a big time saver.