These programs do the analysis of a stochastic volatility model from "Bayesian Analysis of Stochastic Volatility Models." Eric Jacquier, Nicholas G. Polson and Peter E. Rossi; Journal of Business and Economic Statistics, 1994, 12(4), pp. 371-89 using two techniques. The first does the author's original suggestion of a Metropolis procedure for drawing the log h's, but uses a more refined method for doing the draws which is quite a bit more efficient. The second uses the rejection method as proposed in Kim, Shephard and Chib(1998), "Stochastic Volatility: Likelihood Inference and Comparison with ARCH Models", Review of Economic Studies, vol 65, pp 361-93, but with a similar refinement which improves their approximation. The second form requires the kscpostdraw.src procedure which is also posted here.
As written, this requires 7.3, although that's only for the DENSITY instructions at the end. With 7.0-7.2, just take out the SMOOTHING option on the DENSITY instructions at the end. By the way, this runs in half the time with 7.3 compared with 7.0 due to the optimizations that we have made.
Program file - Metropolis method
Program file - rejection method
Procedure file for rejection method
Data file:
