Moving Average Time Series Forecasting with Excel

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 60

  • @nisaulkaromah25
    @nisaulkaromah25 12 วันที่ผ่านมา

    Thank you so much! I really need this

    • @MattMacarty
      @MattMacarty  11 วันที่ผ่านมา

      Glad it helped

  • @missmona9731
    @missmona9731 8 หลายเดือนก่อน +1

    This was extremely helpful - Thank You!

    • @MattMacarty
      @MattMacarty  8 หลายเดือนก่อน +1

      Glad it was helpful!

  • @Terniedintorni
    @Terniedintorni 3 ปีที่แล้ว +3

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

  • @hassanalianees5530
    @hassanalianees5530 ปีที่แล้ว

    Thanks buddy. You saved me

  • @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.

  • @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.

  • @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.

  • @thebongscookbook2273
    @thebongscookbook2273 4 ปีที่แล้ว

    nicely explained

    • @MattMacarty
      @MattMacarty  4 ปีที่แล้ว

      Thanks. Glad it helped

  • @azar77840
    @azar77840 หลายเดือนก่อน

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

    • @MattMacarty
      @MattMacarty  หลายเดือนก่อน

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

  • @emensonjean7424
    @emensonjean7424 5 ปีที่แล้ว +1

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

    • @MattMacarty
      @MattMacarty  5 ปีที่แล้ว +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.

  • @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.

  • @user-vx5vp7ig4t
    @user-vx5vp7ig4t 3 ปีที่แล้ว

    TQ

  • @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.

  • @AlyzaJoyPabillore-uu5ql
    @AlyzaJoyPabillore-uu5ql 9 หลายเดือนก่อน

    So where did u use the k+1 data?

    • @MattMacarty
      @MattMacarty  9 หลายเดือนก่อน

      That's the forecast

  • @alhawraalshams2388
    @alhawraalshams2388 5 ปีที่แล้ว

    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  5 ปีที่แล้ว +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?

  • @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!

  • @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: th-cam.com/video/IjETktmL4Kg/w-d-xo.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?

  • @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: th-cam.com/video/IjETktmL4Kg/w-d-xo.html

  • @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.

  • @NewClips-yv9rl
    @NewClips-yv9rl หลายเดือนก่อน

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

    • @MattMacarty
      @MattMacarty  หลายเดือนก่อน

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

  • @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.

  • @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 3 หลายเดือนก่อน

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

    • @MattMacarty
      @MattMacarty  3 หลายเดือนก่อน

      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 ปีที่แล้ว

    你算錯了

    • @MattMacarty
      @MattMacarty  ปีที่แล้ว

      你是什​​么意思?