Closed nathanh93 closed 1 year ago
Hi @nathanh93
Thank you for opening this issue! Let's talk about it!
Please let me know, when you would need more input from me. Please, remember to tag me in such a post. Thanks, @donotdespair
Aha @nathanh93
I promised you reliable Realised Library data. Please, use the following file for your computations: RLib. It will have different order/names of columns but at least we'd know that its originally downloaded from the source (I did that myself).
Hi @donotdespair,
I was trying to find the meeting notes for our BVAR meeting. I think you might have posted the SVAR meeting notes in the BVAR meeting link instead as the notes look identical for both meetings. Would you be able to double check?
I specifically wanted to check on your notes regarding the T distributed errors extension again, as I wanted to cross reference your notes with the Geweke (1993) article you provided me.
Thanks,
Nathan
Hi @nathanh93
Yes, indeed! I took the notes in the wrong file! Now they are both uploaded as they should!
Regarding the t-distributed error terms. Feel free to drop by for consultations and talk about this. Let me know if you're joining online via zoom.
T
Hi @donotdespair,
Thanks for looking into it! I have just tried to access the file and it seems it is still showing the SVAR notes for both links. Did you post it under the 'Research Report Stuff' module titled 'BVARs meeting notes'?
Apologies that I am have not been able to make it to your consultation today. It is a little difficult with the timing since I am at work today. I have also found a paper which appears quite useful by E. Bobeica and B. Hartwig which suggests the use of an Inverse Gamma distribution for the scale mixture of normal distributions in order to achieve t distributed errors.
Hey @nathanh93
The notes have just been uploaded. Apologies for the delay. I prepared and exported them yesterday, but then, your colleagues came for a consultation, distracted me, and I forgot to come back to upload them. So, now they're there!
OK @nathanh93
Regarding the Babeica, Hartwig paper - very cool reference, and it's a worthwhile methodology! If you want to introduce the t-distributed error terms as they did, I propose the following:
\lambda_t
to be time-invariant \lambda
? You will simply estimate one \lambda
and not T
of them. (well if you really want to, you can do the extension to time-varying \lambda_t
later on)\lambda
. But I admit this might not have been that clear to you. We'd need to talk about that :)Have you started developing the code? Please, let me know. And see you later!
Hi @nathanh93
Please, have a look at the Appendix I was talking about during the meeting by Bauwens, Lubrano, and Richards (1999). There on page 307 you will find the definition and derivation of the matricvariate t-distribution coherent with our derivations in the notes (the link has been updated on Canvas). The necessary changes are that in our derivation q=1
(and so, the IW distribution becomes IG2) and, their P^{-1}
(P
is the precision matrix) is our Sigma
covariance matrix.
Greetings, @donotdespair
Hi @donotdespair,
Thanks for your comments above, they are very helpful.
I agree that using a time-invariant lambda will probably be wise at this stage. I have attempted the derivation of the full conditional for lambda on paper already and will put it into my page so that you can review it. If I understand correctly you were suggesting I should make the same derivation you went through in our meeting yesterday, however using the matrix-variate normal form for the error distribution rather than the multivariate form you used in your example? I think my end result looks similar to what we arrived at yesterday. As an aside, does the later extension of stochastic volatility make my t-distributed errors extension somewhat obsolete? Would it ultimately achieve the same thing as a time-varying lambda?
Hey @nathanh93
u_t
for all t=1,...,T
\lambda
from the paper could be interpreted as heteroskedasticity, however, it assumes no persistence. And the predominant feature of the volatility of macro and financial (RV included) time series is the volatility persistence. The volatility estimates will be very different. Also, there is no way of forecasting using the model with \lambda
s. And SV is excellent in that. It would be best if you combined the t distribution with the SV heteroskedasticity. That would be a model well fitted to the logRV
data.I'm looking forward to seeing these developments!
Hi @donotdespair ,
I have emailed a copy of my derivation for you to double check. Thanks! As for the posteriors for A and Sigma, I managed to arrive at the same result that is shown in the Babeica, Hartwig paper, it is not too different from the normal derivation without the lambda.
I have also tried to implement the estimation routine in a Gibbs Sampler. I initialise values for the prior parameters and the lambda hyperparameters. I then construct the diagonal lambda matrix and use that to draw from the sigma posterior and A posterior, then calculate the next lambda using the derivation I sent to you.
The loop seems to fail for certain values of lambda, which happens when drawing from the inverse wishart for Sigma. It happens because the scale matrix is not positive definite. The code works, however, if I fix the value of lambda at 1. I suspect there must be something wrong with how I am updating lambda. I have updated my quarto page to include my Gibbs Sampler code now so that you can take a look.
Thanks
Nathan
Aha @nathanh93
I promised you reliable Realised Library data. Please, use the following file for your computations: RLib. It will have different order/names of columns but at least we'd know that its originally downloaded from the source (I did that myself).
Hi @donotdespair,
I was just coming back to this post previously where you provided me with your more reliable Oxford Man RV dataset. Is there a way that I can import the data directly from that link into my quarto file? I remember you mentioned you would like the code to only use datasets accessible from the internet and as such I was wondering if this was possible with that link?
Thanks,
Nathan
Hi @nathanh93
Indeed, if the Realized Library was available, I would encourage you to download the xls file directly into R from the internet, but... it's not available so, for your project, it's OK to use the file. The one I sent you is just more reliable as I know I surely downloaded it from the RL and did not modify it. I'm not sure what folks had done with the file you downloaded before.
Closing this issue as the research report has been finalised. Thanks!
Hi @donotdespair,
Just opening this issue to discuss my planned extensions to the model.
As we discussed last week during our meeting I would like to go ahead with exploring the dummy observations as well as the Student t errors extensions as it sounds like they will complement my research topic well. What would you suggest I look at in terms of material. I will start with your article which you mentioned will be helpful for the dummy observations material.
I also remembered you mentioned that you might know a better source for downloading the Realized Library data? The github file I am currently using looks reasonably sufficient in terms of length but I remember you mentioned it might have had some strange amendments made to it.
Thanks,
Nathan