Тёмный

Do stock returns follow random walks? - Variance ratio test (Excel) 

NEDL
Подписаться 27 тыс.
Просмотров 9 тыс.
50% 1

Опубликовано:

 

13 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 56   
@NEDLeducation
@NEDLeducation 4 года назад
You can find the spreadsheets for this video and some additional materials here: drive.google.com/drive/folders/1sP40IW0p0w5IETCgo464uhDFfdyR6rh7 Please consider supporting NEDL on Patreon: www.patreon.com/NEDLeducation
@jmk1160
@jmk1160 4 года назад
Hi, I can't find the spreadsheet in the folder. Could you maybe upload it again?
@randall.chamberlain
@randall.chamberlain 2 года назад
Your channel is a hidden treasure. I'm so glad I found it. Thanks for your pinpoint explanations and demos.
@joeseph8788
@joeseph8788 3 года назад
Thank you for this video. I am currently writing my thesis on the relationship between discretionary accruals and informational efficiency. This has been of great help!
@NEDLeducation
@NEDLeducation 3 года назад
Hi Joe, and glad you liked the video! All the best with your research!
@gwpiaser
@gwpiaser 2 года назад
THank you for your nice video. I have one concern, the "x_t" in Lo-MacKinlay are the first differences in prices x_t = P_t - P_t-1. You take the returns. It could be an issue. But thank you again !
@aslas89
@aslas89 2 года назад
Thank you for your great videos Savva. I have an observation here. Correct me if I'm wrong, but I think that the z-stat is not VR/st.d, but z-stat = (VR-1)/st.d.
@NEDLeducation
@NEDLeducation 2 года назад
Hi, and thanks for the question! This is indeed accounted for when I am calculating the test statistic.
@habozaid
@habozaid Год назад
Hi, excellent video! one issue I noticed for n, you used 1258 for all periods while you should have used different n's based on the length of data you used to calculate the period variance. Unless I missing something?
@bobo0612
@bobo0612 3 года назад
Hi, thank you for your video and your time put into this excellent tutorial! I have a fundamental question about that null, that if we can not reject the null, then the return follows random walk, and we say the market is efficient? Since the current return is correlated with past returns... Or am i misunderstanding anything...
@NEDLeducation
@NEDLeducation 3 года назад
Hi Bolin, and glad you liked the video! As for your question, you are generally correct. If we cannot reject the null and so we stick with the null (variance ratio is equal to 1), it means variance scales just like you would expect from a random walk, providing evidence it is indeed a random walk. If variance scales like you would not expect from a random walk, you can then suspect it is not a random walk. Hope it helps!
@JOYANDCHILLAND
@JOYANDCHILLAND 3 года назад
hello , i wanted to thank you for all your amazing videos first , they were vert helpfull to me ! i have a question please : why using the product formula ? i really didn't undestood , can you give an exemple please
@NEDLeducation
@NEDLeducation 3 года назад
Hi Saad, and glad you liked the videos! As for your question, the product formula is always used to calculate holding period returns over a particular time period to account for continuous compound growth. For example, if a portfolio went up 10% yesterday and 10% today, a sum function would say it went up 20% overall. But in reality, the total return has been 21%, and you need the product function to evaluate it correctly. The concept is the same as with the continuous compound interest rate. Hope it helps!
@alejandroleiva1771
@alejandroleiva1771 2 года назад
Excelent video!
@srabantidebnath1755
@srabantidebnath1755 3 года назад
Thanks a lot, it was so help full for me. Can you farther explain Kim (2006) and VR tests based on ranks and signs Wright(2000)
@NEDLeducation
@NEDLeducation 3 года назад
Hi Srabanti, and glad you found the video helpful! As for your suggestions, will do a video based on Wright (2000) and possibly Kim (2006) as well in the near future. Hope it helps.
@srabantidebnath1755
@srabantidebnath1755 3 года назад
@@NEDLeducation tanks sir, i will be very thankful
@Andy98333
@Andy98333 3 года назад
Hey bro, I love your video's they're amazing!.. I had a question. Lets say we were to get the two tailed 95% confidence intervals and they turned out to be 2.5% = -2 and 97.5% = +2. How would we determine in this case if the timeseries is mean reverting or momentum?
@NEDLeducation
@NEDLeducation 3 года назад
Hi and glad to hear you are enjoying the channel! As for your question, I believe you are referring to z-stats being positive for some specifications (for example, for a 16-day variance ratio) and negative for others (for example, for a 2-day variance ratio). In this case, it can be said that stock returns are mean-reverting in the short-term and persistent in the long-term which is nothing to be too surprised by :) Hope it helps!
@Andy98333
@Andy98333 3 года назад
@@NEDLeducation Thanks so much, that makes sense :)
@joimemok2800
@joimemok2800 3 года назад
thank you very much for the series of great videos. These help me a lot in understanding quant trading. May I ask couple questions on the intuition behind the test? 1. under the null, the daily return should be IID and follow random walk. i.e there are no auto correlations. Right? 2. But the rolling 2 ,4,8 & 16 days returns do have autocorrelation with the previous 1,3,7 & 15 days, why can we still use sample variance as the estimator? 3. By the same reasoning, would the test statistic, variance ratio, violates the assumption that no autocorrelation in the null? Please correct me if I've any misunderstandings on the logic behind. Thanks again for your teaching such great resource on RU-vid.
@NEDLeducation
@NEDLeducation 3 года назад
Hi Joime, and glad you found the videos helpful! There will be more to come from the random walk series very soon :) As for your questions, yes, the null hypothesis is that the daily returns are IID, this would mean that a variance of cumulative N day returns should be N times higher than the variance of daily returns, this is what the idea of the test is based on (and this is also why we annualise standard deviation by multiplying by the square root of 252 when assuming return independence). If the test statistic is roughly zero, it means we should accept the null (returns are IID, stock prices follow random walks). If it is significantly positive, it means returns over longer time periods are more volatile than returns over shorter time periods. It implies returns are magnified through time, i.e., a persistent, positively correlated time series. Analogously, a significantly negative test statistic would mean negative correlation. Hope it helps!
@joimemok2800
@joimemok2800 3 года назад
@@NEDLeducation thanks Saba. Your explanation is awesome as always. Highly recommended your channel to anyone who wants to learn financial econometrics.
@kianfayazbakhsh1862
@kianfayazbakhsh1862 Год назад
Hi, thanks for the video. I apply the test for Dow Jones in the period between 1990-2001. The value of this test is exactly opposite of the result of your test. The p-value for 2 days, 4 days, 8 days, 16 days are 4.41%, 39.53%, 14.72% , and 15.76% respectively which means for the 4 days, 8 days and 16 days return we can not reject the null hypothesis and these return the null hypothesis and stock return follow random walk. However, the 2 days return p-value rejects the null hypothesis and the return does not follow the random walk. This is in contradiction with what your result are and I expected from the test on my data. Do you think my test result can be coorect or the y dont make sense?
@NEDLeducation
@NEDLeducation Год назад
Hi Kian, and glad you liked the video! Well done applying the test for your own data. As you have got a slightly different sample and a different index, getting different outputs makes sense, and p-values seem realistic.
@expertyourself4333
@expertyourself4333 3 года назад
Hello Sir. This video is just an amazing work and concept building. Thanks for it. However, I am doing my research work on Market Efficiency through the Automatic Variance Ratio Test of Choi 1999. I request you to please make such video explaining what is Automatic Variance Ratio Test of Choi 1999 and secondly perform this test through R codes as simple and early as possible. Loads of Respect
@NEDLeducation
@NEDLeducation 3 года назад
Hello Nasir, and thanks so much for the feedback! I will definitely investigate the automatic VR test at some point in the future.
@NEDLeducation
@NEDLeducation 3 года назад
Hello Nassir, just to let you know the video on AVR is in the pipeline and due to be posted in the next 2-3 weeks. Hope it helps and stay tuned!
@NEDLeducation
@NEDLeducation 3 года назад
Hello again Nasir, the video on the automatic variance ratio test is live, check it out if you are interested: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-uO7uaHSxSrY.html
@expertyourself4333
@expertyourself4333 2 года назад
@@NEDLeducation Thank you sir It really helped much in interpreting my results.
@ouafaecharif819
@ouafaecharif819 4 года назад
i have a probleme using the product formula , since i use it , i always have the same value , is tere smthing wrong with my excel ?? thank u so much for your videos
@NEDLeducation
@NEDLeducation 4 года назад
Hi Ouafae, and glad the videos helped! As for your question, try enforcing the product formula with Shift+Ctrl+Enter instead of just Enter. It is a matrix formula so it works properly only if enforced that way. Hope it helps!
@neerajkumarsharma8853
@neerajkumarsharma8853 3 года назад
@@NEDLeducation Thank you i was facing the same problem
@johnklee3843
@johnklee3843 4 года назад
Hey where did you get the 1258 number for the variance of the VR? Please and thanks!
@NEDLeducation
@NEDLeducation 4 года назад
Hi John and thanks for the question! 1258 is just the number of observation (trading days in a sample). For your own estimations, just plug in the number of observations you have. Hope it helps!
@johnklee3843
@johnklee3843 4 года назад
NEDL gotchya ok! I thought it was that but wanted to double check. Thank you sir
@zkovanci
@zkovanci 2 года назад
Hi NEDL, I want to ask something, I have readen from some articles that if variance ratio increasing it means that trending price and if the ratio is decreasing it means that mean reverting, if this explination is true what do you think such a example, firstly ratio -0,1 -0.4, -0.5 and after that -0.4 ,-0.3 etc, all results negative but firstly decrasing after that increasing samples (of course for different time frames like 2 day 4 day 8 day...). ??
@NEDLeducation
@NEDLeducation 2 года назад
Hi Zafer, and thanks for the question! Conventionally, the properties of the series (persistent, efficient, mean reverting) are determined based on the value of the variance ratio, not the first difference. However, you can use the first differences to determine where exactly (in terms of lags) your mean-reverting behaviour is the most pronounced.
@zaig7401
@zaig7401 4 года назад
What does longer multiple of days for variance ratio are less random imply? Longer period are more random than shorter period? Can we use intraday data compare to daily to construct variance ratio?
@NEDLeducation
@NEDLeducation 4 года назад
Hi Dingxin, and many thanks for your questions! Generally it can be interpretable as such: over a longer time period (here, 16 days) there is more negative autocorrelation in returns (in practitioner circles it might be called "market corrections"), and the volatility over such intervals would be lower than implied by a linear scaling formula and the independence assumption. Basically, the market can overreact to some news in the short-term and over the course of several trading days return to a more stable trend-like movement. Regarding intraday data - by all means yes, this approach can be generalised to any high-frequency data, for example you can get 15 minute and hourly candles, compare respective return variance and have a variance ratio test for the interval length of four (15*4 = 60), etc.
@zaig7401
@zaig7401 4 года назад
NEDL if the short period can’t reject random walk hypothesis and all the long period can. Does this mean the returns doesn’t follow random walk in general? Or we can’t entirely reject because the 2 day variance ratio is too small?
@NEDLeducation
@NEDLeducation 4 года назад
@@zaig7401 Excellent question! Generally, we reject the null hypothesis (random walk) if at least one of our tests shows a statistically significant z-stat, i.e. a statistically significant deviation of the variance ratio statistic from zero. However, it is obvious that if you execute the test dozens of times, sometimes you will get a significant result out of mere chance (so-called "data mining"). Therefore, if the test is applied to a large number of various intervals and the number of statistically significant results are very small, one should be alarmed whether the null rejections are genuine or occur due to chance. Formally, one can perform a p-value adjustment procedure for multiple testing (i.e., Bonferroni adjustment or Holm adjustment), but those are already quite niche statistics concepts.
@zaig7401
@zaig7401 4 года назад
NEDL can you make a video about augmented dickey-fuller test?
@NEDLeducation
@NEDLeducation 4 года назад
Thanks for your suggestion! I will definitely do a video covering the Dickey-Fuller test after a short break :)
@dh6167
@dh6167 3 года назад
Any chance you can upload this sheet... I cannot find it in the Google Drive. Thanks!
@NEDLeducation
@NEDLeducation 3 года назад
Hi, and thanks for pointing this out! Have just uploaded it. Hope it helps!
@yourswimpal
@yourswimpal 3 года назад
can i check my understanding, if it is not random ( i.e : 16 days long period ) , does this Variance ratio test tell you that it is highly likely trending or is it mean reverting ? Thanks :)
@NEDLeducation
@NEDLeducation 3 года назад
Hi Darren, excellent question! If the variance ratio test statistic is negative (variance is lower than would be expected from a random walk), it would imply reversals (corrections follow strong upward and downward movements), and if the variance ratio test statistic is positive (variance is higher than would be expected from a random walk), it would imply momentum (high returns persist over longer periods). Hope it helps!
@yourswimpal
@yourswimpal 3 года назад
@@NEDLeducation thanks Sava for the explanation , to clarify , the test statistics you mentioned is the z-stat , is that right ? So for example, for 16 period "lookback" , the z-stat is -2.119 in your example , that means it is very likely it is mean reverting. Also , this is kinda similiar to a Hurst exponent test as well , whereby 0.5 indicate a "trending" series. Do you agree? :)
@NEDLeducation
@NEDLeducation 3 года назад
@@yourswimpal That is correct! The similarity with the Hurst exponent is quite striking, well spotted! However, Hurst deals with longer-term memory, while variance ratio covers shorter periods.
@z.i.6134
@z.i.6134 3 года назад
What is the optimal look-back period using this approach?
@NEDLeducation
@NEDLeducation 3 года назад
Hi, and thanks for the question! As with all econometric tests in essence - the longer, the better, however practically it is mostly limited to around 5 years in studies as market efficiency can itself change over longer periods. The best practice would be to get as long of a period as you can lay your hands on, separate it into subsamples of roughly 5 years, estimate the test on these, and see if results differ significantly. If not, you can estimate it on the whole sample (which is as large as possible). Hope it helps!
@z.i.6134
@z.i.6134 3 года назад
@@NEDLeducation Awesome. Thanks for the clarification.
@francoistoo
@francoistoo 3 года назад
The returns overlap. So they won't be iid by design. Why not decouple the returns by having them not overlap?
@NEDLeducation
@NEDLeducation 3 года назад
Hi and thanks for the comment! Overlapping returns would not be iid by design, that is true, but the test is devised to check whether individual daily returns (that do not overlap) are iid and uses overlapping cumulative returns and their variance to achieve that. Hope it helps!
Далее
Portfolio Optimisation with Higher Moments (Excel)
22:57
The Random Walk
13:31
Просмотров 7 тыс.
Testing market efficiency in Python: Runs test
17:18
Просмотров 2,4 тыс.
Expected Values, Main Ideas!!!
13:39
Просмотров 192 тыс.