Time Series Talk : Augmented Dickey Fuller Test + Code

Поділитися
Вставка
  • Опубліковано 6 вер 2020
  • Theory and code behind the Augmented Dickey Fuller Test:
    Code used in this video : github.com/ritvikmath/Time-Se...
    Stationarity Video : • Time Series Talk : Sta...
    Unit Roots Video : • Unit Roots : Time Seri...

КОМЕНТАРІ • 94

  • @Moment_K
    @Moment_K 3 місяці тому +5

    As a quant finance masters student, your contributions to my learning is invaluable, by understanding the theoretical intuition first, any degree of mathematically rigorous syntax that follows becomes tenable, make me less inclined to let the obscurity of academic papers and dense textbooks get the better of me

  • @user-fm8ru3cy5w
    @user-fm8ru3cy5w 3 роки тому +4

    Thank you for the video! This channel makes me understand time series a whole lot better. Best channel for time series!!

  • @mingchuanzhou9363
    @mingchuanzhou9363 Рік тому

    Thank you so much !!! You contributed a very logical and tidy interpretation of the DF test, and I am looking forward to seeing your more useful learning videos and resource.

  • @gautamsethi3751
    @gautamsethi3751 2 роки тому +16

    Another excellent video from you--kudos! I have just a couple of small nitpicky comments.
    1. I think you misspoke around 5:02 when you rejected (and didn't reject) the null; you switched them around.
    2. And if you plan to fix that issue, then it would great if you could be consistent about using either critical values or p-values. While the two are related, they are very different concepts. In the theory part of the talk, you mention critical values but in the code you make the decision based on p-values.
    Aside from these relatively minor issues, this is a fantastic video!

  • @mynameisjoejeans
    @mynameisjoejeans 11 місяців тому +3

    I've watched so many videos and been through so many forums to try and understand this for my dissertation, and this is the first video I truly understood. Even better, you included the code for Python which is exactly what I'm using. Thank you so much this is the perfect video on the subject.

  • @MrJM501
    @MrJM501 3 роки тому +43

    You're timing on these recent uploads could not be better! I'm currently taking Time Series II this semester and my professor just went over reviewing the topic of the Dickey Fuller and Augmented Dickey Fuller test from Time Series I. As someone who was having a hard time understanding all that was being taught things like ACF, PACF, EACF, ARMA model, tests like the ljung-box test, etc, your videos have really helped me understand what my professors have been trying to teach me in class. The videos published around April of last year especially helped me last semester.
    I didn't really understand what was being taught, but in the class recitations my CA went over how to apply the information in R, not Python. From it, I knew how to solve my homework and tests that were in R. I memorized the procedures taught to me, but I didn't truly understand how or why this knowledge worked in my application of the knowledge in R.
    You're videos have helped me a lot in understanding the Time Series material taught to me. You are so much more precise and clearer with your explanations than my professors have been. Because of you, I've been able to more fully understand these Time Series concepts. I managed to get an A in that class. I hope you keep up making these type of videos because Time Series concepts really are interesting, and I would've never really known that if you didn't clear the fog in my head! Thank you so very much!

    • @ANURAGSHARMA091716
      @ANURAGSHARMA091716 3 роки тому

      This happens to all of us. We mug theory and derivations. I remember in an internship interview I couldn't even explain the AR and MA process satisfactorily even after scoring above 60% in time series course at the university. You can think of it as 75 in the relative grading system cz my professor had told us that he wouldn't give anyone above 80/100.

  • @shikhasen3981
    @shikhasen3981 3 роки тому +2

    You are so amazing , and the videos are so comprehensive

  • @gpietra
    @gpietra 2 роки тому

    Unit root was one of the most obscure concept I have ever met. Thanks to you and a couple of other dudes online I reached a sufficient level of comprehension. Thank you!

    • @kisholoymukherjee
      @kisholoymukherjee Рік тому

      Which are the other couple of dudes. pls mention, I am looking for more resources to fully understand these topics

  • @user-xn8wg6yw7g
    @user-xn8wg6yw7g 5 місяців тому

    Good video. Enough detail to make it meaningful but not overwhelming. Thanks.

  • @BChow-td7qh
    @BChow-td7qh 3 роки тому +1

    It's great teaching, makes me understand the time series better!!

  • @zdmsr
    @zdmsr 3 роки тому +10

    I remember the Dickey Fuller test from back when I took Time Series analysis because the name is hilarious.

  • @BhuvaneshSrivastava
    @BhuvaneshSrivastava 3 роки тому +1

    Just Awsumm as Usual 🙏

  • @masonscott2768
    @masonscott2768 3 роки тому

    So cool! Thank you for making this video!

  • @yaqiwu763
    @yaqiwu763 Рік тому

    Omg, you are life saver, much more clear, thumbs up

  • @theophilusashun301
    @theophilusashun301 2 роки тому

    Very much appreciated , making understanding concept pretty easy.. thank you so much.

  • @Yassine-ym4vf
    @Yassine-ym4vf 2 роки тому

    Thank you Ritvik !

  • @VictorOrdu
    @VictorOrdu 2 роки тому

    Great explanation. Thank you!

  • @waseembaig4625
    @waseembaig4625 2 роки тому

    I never studied this in my class. Wanted to understand this concept for my MSc dissertation, thank you for explaining it in just 9 minutes!!

  • @asif09ansari
    @asif09ansari 3 роки тому +39

    Let's "delve into the weeds of the mathematics" please!

    • @quant-prep2843
      @quant-prep2843 3 роки тому

      he dont know, so he didnt lol

    • @abdielbrayden3429
      @abdielbrayden3429 2 роки тому

      I guess Im randomly asking but does anyone know a trick to log back into an instagram account..?
      I stupidly forgot the login password. I would appreciate any assistance you can give me!

    • @kadenjavier331
      @kadenjavier331 2 роки тому

      @Abdiel Brayden instablaster ;)

    • @abdielbrayden3429
      @abdielbrayden3429 2 роки тому

      @Kaden Javier I really appreciate your reply. I got to the site on google and im in the hacking process atm.
      Seems to take a while so I will reply here later with my results.

    • @abdielbrayden3429
      @abdielbrayden3429 2 роки тому

      @Kaden Javier it worked and I now got access to my account again. Im so happy:D
      Thank you so much, you really help me out :D

  • @AndresVeraF
    @AndresVeraF Рік тому

    thanks you very much! your videos helpme a lot

  • @DmitryShevkoplyas
    @DmitryShevkoplyas 2 роки тому

    Beautiful! Thank you!

  • @luisakrawczyk8319
    @luisakrawczyk8319 2 роки тому +1

    thanks a lot for this video! The theoretical part was explained better than anything I've found online. In the code part I would have liked to see a distinction between drift and trend together with an explanation of the output, that would have been amazing (also in R) :D

  • @mehmetnazif5837
    @mehmetnazif5837 3 роки тому +2

    does the ordinary t test on t-2 values indicate unit roots? or is it just significance of the lagged variables? or are they both the same thing? what is the alternative hypothesis in testing the coefficients of the t-2 or bigger lag variables.

  • @at7915
    @at7915 Рік тому

    You're the GOAT!

  • @EricK-bh2sk
    @EricK-bh2sk 2 роки тому

    Thank you so much !!!

  • @allenfiallos5788
    @allenfiallos5788 3 роки тому

    Hey you please make videos on your previous examples with a deeper dive into the math portion. like examples on each model with numbers and perhaps implementing R if possible. Thank you

  • @abhishekdas5851
    @abhishekdas5851 3 роки тому +3

    Hi can you suggest me a book for understanding all these concepts along with VAR? BTW ur teaching method is excellent!

  • @karimaelouahmani7078
    @karimaelouahmani7078 2 роки тому

    Thank you so much , but I'm wondering if we still can use the ADF to test the stationarity of a serie that I'm not assuming is an AR(p)

  • @ankitbiswas8380
    @ankitbiswas8380 Рік тому +1

    so what happens for complicated models where you have delta as well as multiple Betas like you showed here ...we calculate the t-delta and check if its lower than DF-critical value and if yes then the T.S is stationary but how does the Betas influence then ? You said for each Beta we need to calculate t-Beta and check their values with t-distribution critical value and comment whether they are significant or not ...is it possible that some t-Betas < t-critical and some t-Betas>=t-critical ? What happens then ? does it not affect the result of t-delta or do we just decide the stationarity of time series based on t-delta everytime ?

  • @Tapsthequant
    @Tapsthequant 3 роки тому

    Thank you for the video please let's get into the math too... Thank you

  • @enicay7562
    @enicay7562 6 місяців тому

    Thank you

  • @2010kahlan
    @2010kahlan Рік тому

    Sorry in advance for the basic question that I'm about to ask, but I'm really lost. I've data across time on Bitcoin and other cryptocurrencies (w/ daily frequency) on several aspects: volume, market capitalization...
    I want to find unit-roots to then perform cointegration tests, granger casualty testing and dynamic OLS. I assume that I've to perform the Dickey-Fuller test for each of the variables of the currencies individually and then as panel data, right?
    Thank you in advance

  • @AlphaBay14
    @AlphaBay14 10 днів тому

    Hey mate! Thanks for the videos. One question, let’s say I runs the ADF on my time series and the pvalue is indeed less than my alpha but visually I can see the variance is not constant and after plotting the ACF I have serial autocorrelation. Given the my ADF says that my time series is stationary, how can I interpret this difference with what I see and the result of the ACF? Should I just proceed to model an ARIMA model and run a white test or what is your advice? Thanks a lot

  • @elvistapfuma7970
    @elvistapfuma7970 Місяць тому

    you ar brilliant

  • @esplover1994
    @esplover1994 3 роки тому +1

    Very nice explanation...thanks :)
    could you also make a Video on the KPSS-test?

    • @ritvikmath
      @ritvikmath  3 роки тому

      thanks for the suggestion!

  • @ap2139
    @ap2139 2 роки тому

    @ritvikmath I think that there is a little typo in your formula for the ADF test. I believe that the summation shall go from 1 to p-1 rather than from 1 to p

  • @suvkaka
    @suvkaka Рік тому +1

    Please make a video with mathematical details of ADF

  • @itzRoblar
    @itzRoblar Рік тому +1

    Hi! I am a little bit confused regarding your explanation of the null hypothesis. Between 3:00 and 3:28 you say that under the null hypothesis, we expect stationarity since y_(t-1) disappears. This would mean that a rejection of the null hypothesis is a rejection of delta being 0 and hence a rejection of stationarity. However, at 4:20 ->, you say that a rejection of the null would mean that you reject the possibility of a unit root which means we have stationarity. In my mind, the argument makes sense compared to the top left h0, but i'm thrown off by your comment between 3:00 and 3:28 (although that also makes sense in terms of testing for delta = 0). Can you please elaborate a bit on this?

  • @oliviamomeu6932
    @oliviamomeu6932 3 роки тому

    what is the method used for estimating the coefficients? is it OLS(ordinary least squares)?

  • @JoaoVictor-sw9go
    @JoaoVictor-sw9go 3 роки тому +1

    Thank you very muchfor the video! I have a question and would be extremely grateful if anyone could have clarity for me. I'm analyzing some data for my final graduation project and have performed ADF test on a couple of time series for velocity of money in Brazil, and it is a series that visually does't look stationary. My question is: can the ADF test be performed on any time series? Or it has to be an AR compatible (if that makes sense)?
    Another question is: there a parameter on the ADF test in the statsmodels library for the regression model (if it has constant, trend etc), what do they mean and how do I decide which model I should use? The p-value and stat changes a lot based on the model I select.
    Thank you again! The videos are great.

    • @mikelmenaba
      @mikelmenaba 8 місяців тому

      I believe that the ADF is not telling us if a TS is stationary or not, but telling us if an AR time series model holds a unit root or not. So, I imagine that if your TS is not AR compatible, then the ADF test is not giving you any information on the stationarity of it. So, if I were you, I would first check the AutoCorrelation and PartialAutoCorrelation functions, to see if there is strong correlations with any of the lags. If this is the case, you would be able to assess that this TS has a strong autoregressive component, and then, the ADF test would help you test for stationarity.
      (I am by no means an expert in the subjects)

  • @TheTwerkMerc
    @TheTwerkMerc 3 роки тому +1

    Definitely want the math. ALL THE MATH

  • @lizzyzhou4954
    @lizzyzhou4954 Рік тому

    First of all, thanks! I subscribed your channel right away. Then, for the unit root, when |phi|=1, that doesn't mean phi=1. How about the case where phi is a complex number? Finally, could you please also make code examples in R? Thanks again!

  • @aimenmalik8929
    @aimenmalik8929 Рік тому

    hello there, i have a query that,if i have a stationary time series data, then no matter how many sub-sequence i get form it. All the sub_seq should should be stationary. but what i observe is p_value is changing,. and even some sub_seq are throwing up p-value to be >0.05(means non-stationary).why is it so ??

  • @QuantYogi
    @QuantYogi 3 роки тому

    can anyone pls tell difference btw AR1 and AR2 test from application point of view, I did not want to dig deep into this
    I am doing this to complete a project (Pair Trading) where I need to check the stationarity of time series, and which method should be followed ?

  • @kisholoymukherjee
    @kisholoymukherjee Рік тому

    Hi @ritvikmath, can you please share the link to the Dickey Fuller Distribution like you said in the video, that it is in the distribution but I can't find it?

  • @abhinavbhatnagar7796
    @abhinavbhatnagar7796 3 роки тому +1

    I can not find link to Dicky Fuller distribution in the description

  • @dodolookr
    @dodolookr 3 місяці тому

    Bit counterintuitive that D-F t-stat < DF_crit to rejecct the null.

  • @souravdey1227
    @souravdey1227 Рік тому

    Can you please do a video on the intuition of t-distribution

  • @_Sam_-zh7sw
    @_Sam_-zh7sw 6 місяців тому

    Hi Ritvik.....wanted to know if this playlist is in proper sequence? Because how come AR video is after this stationarity video?

  • @lopyus
    @lopyus 2 роки тому

    lol you look exactly like my stats prof except a few years younger XD

  • @iwantyou344
    @iwantyou344 2 роки тому

    How we can know if the serie have determenistic trend or stochastic trend ?

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w Рік тому

    But to get to stationarity, you had to take the first difference. How is predicting the first difference useful, given that you are interested in making predicting of the original series?

  • @kewtomrao
    @kewtomrao 2 роки тому

    Do you have patreon for me to support this wonderful series?

  • @axe863
    @axe863 2 роки тому +1

    Good video but having moments that are "Changing over time" is not a sufficient condition for non-stationarity. You can have a stochastic reverting dynamics without non-stationarity. A good example of this is being the case is Component Garch. Non-Stationarity is a stronger condition of the moments being a sufficiently smooth function of time.

  • @yashgawde610
    @yashgawde610 Місяць тому

    At 4:56, when t calculate is less than t critical then we fail to reject null hypothesis.

  • @prosimulate
    @prosimulate 2 роки тому

    Slick.

  • @DouwSteenkamp
    @DouwSteenkamp 4 місяці тому

    You can see this man is a true mathematician for writing his "e" as an epsilon🤣

  • @chillwithme798
    @chillwithme798 3 роки тому

    null hypothesis against 1st diff is stationary.

  • @soumo3464
    @soumo3464 Місяць тому

    One request, although you said it's a high level video, please try to explain the code at least. Avoiding that defeats the purpose of the video, that makes one go and search through books and other codes. I realise its helpful if I try to understand it myself but this just makes me devote more and more time to each video and makes me rethink should I watch these videos in the first place.
    Keeping all these aside your videos are good for beginners.

  • @wroanee
    @wroanee 2 роки тому

    I don't understand why there is no absolute of fi! in the unit roots video of yours there was an absolute there on fi.

  • @TheSambita20
    @TheSambita20 2 роки тому

    At 6:08 timestamp of this video whatever the other stuffs you mentioned, i am not able to understand how you derived that, could you please help?

    • @ankitbiswas8380
      @ankitbiswas8380 Рік тому

      exactly ...even I couldnt get that part ..were you able to understand that portion later ?

  • @ann-rm3vj
    @ann-rm3vj 3 місяці тому

    this is a left tail test ?
    I concluded this because alt hypothesis has less than sign .
    Please confirm
    : )

  • @kulknira1
    @kulknira1 4 місяці тому

    Don't you think H0 and H1 should be exhaustive and should cover all possible values (0, < 1 and > 1 as well). Let me know your thoughts.

  • @dadimanoj9051
    @dadimanoj9051 3 роки тому

    Why is the alternative hypothesis not equal to 1

  • @yak_music
    @yak_music Рік тому

    Hello, I don't understand why the fact that y(t-1) isn't stationary implies that we can't use the T-Test.

  • @dr.kingschultz
    @dr.kingschultz 3 місяці тому

    How about the case when it is bigger than 1

  • @ghazypheda
    @ghazypheda 4 місяці тому

    what mean d sub t in economics ?

  • @patricka0196
    @patricka0196 Рік тому

    Why do you have your bicycle lock combination tattooed on your arm?

  • @user-qq7ke9xg9v
    @user-qq7ke9xg9v 6 місяців тому

    why you dont prove the seasonality of the ar1

  • @yassinewaterlaw6597
    @yassinewaterlaw6597 2 роки тому +1

    If delta is =0 that mean that our serie is a random walk with drift ???

  • @kanejiang2938
    @kanejiang2938 Рік тому

    I am so confused that when unit Root , the △y is stationary. but the yt is not stationary? why?

    • @kanejiang2938
      @kanejiang2938 Рік тому +1

      I got it . becuase the △y is stationary. so Yt is not stationary

  • @jwbpark
    @jwbpark Рік тому

    Where is dickey fuller distribution video?

  • @harshitdaga2225
    @harshitdaga2225 Місяць тому

    ye kya ho raha hai?
    mai kaha aa gya bhaya
    🤔

  • @adamkolany1668
    @adamkolany1668 Рік тому

    So what when phi_1>1 ??
    You are not conviencing with that what you are saying here …

  • @quant-prep2843
    @quant-prep2843 3 роки тому +1

    Dont comment here, he will not reply because he don't know

  • @VikramSinghT2
    @VikramSinghT2 Рік тому

    When u difference the lag variables then mu should be zero...

  • @lawjef
    @lawjef 9 місяців тому

    Is there any reason this guy places himself in the middle of the video? He is discussing econometrics and he thinks that the viewer needs to see his face not just in the entire video but in the middle of the entire screen. What possible value does that add? Name one other econometrics / maths / statistics / economics / finance channel that thinks “yep, it will help explain the math if I am covering half the screen with my face”. You need a fairly inflated ego to think your face is worth that much YT real estate