Tom --
In comparing code I have for VARs with stochastic volatility to the code of other researchers that actually use different algorithms for drawing volatility, I have come to realize that my coding of the drawing of the mixture states used in the Kim, Shephard, and Chib (1998, RESTUD) algorithm is something of a bottleneck (this is the section of code in lines 590-618 and some dimensioning or setup that comes earlier in the .src file in the attached .zip) file. Are there ways you see to make the drawing of the mixture states more efficient, time-wise, than I have them? Any suggestions would be a great help. Thanks.
Todd
drawing mixture states of Kim, Shephard, and Chib (1998)
drawing mixture states of Kim, Shephard, and Chib (1998)
- Attachments
-
- publicupdated.zip
- (58.95 KiB) Downloaded 817 times
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland
Re: drawing mixture states of Kim, Shephard, and Chib (1998)
This would be my way to implement that. Other than doing the sqrt(...) just once, I'm not sure anything would significantly change the timing.
- Attachments
-
- mixturegibbs.rpf
- (2.91 KiB) Downloaded 936 times
Re: drawing mixture states of Kim, Shephard, and Chib (1998)
Much, much appreciated, Tom. I will give your implementation a try. It is of course more elegant, even if it proves to be not a lot faster.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland