Stock-Watson Factor with Stochastic Volatility
-
myoungblood
- Posts: 3
- Joined: Wed Aug 25, 2010 8:49 am
Stock-Watson Factor with Stochastic Volatility
Stock and Watson continue to develop their common factor model. In "The Evolution of National and Regional Factors in U.S. Housing Construction," in Essays in Volatility in Finance and Economics, Time Series, and Regional Economics (2010), they allow volatilities to break midway through the sample. (The working paper is available from Watson's website: http://www.princeton.edu/~mwatson/publi.html.) How should one change the code posted for the Stock Watson Factor with Missing Data to calculate two regimes for the SIGSQE of each factor? Thank you, Michael
Re: Stock-Watson Factor with Stochastic Volatility
You need to use a VECT[VECT] with outer dimension 2 for the variances. Write a function which switches these at the break point.
function swf time
type symm swf
type integer time
if time<=breakpoint
compute swf=%diag(sigmac(1)~~sigma(1))
else
compute swf=%diag(sigmac(2)~~sigma(2))
end swf
Then use the option SW=SWF(t) in the DLM instruction.
function swf time
type symm swf
type integer time
if time<=breakpoint
compute swf=%diag(sigmac(1)~~sigma(1))
else
compute swf=%diag(sigmac(2)~~sigma(2))
end swf
Then use the option SW=SWF(t) in the DLM instruction.
-
myoungblood
- Posts: 3
- Joined: Wed Aug 25, 2010 8:49 am
Re: Stock-Watson Factor with Stochastic Volatility
Tom: Thank you. However, I encounter a problem with the dimension of swf(). The example program swgibbsmissing.prg dimensions sw as 5x5, whereas swf is 2x2, which is not conformable with f in the DLM (f is also 5x5, of course). Should swf() return two 5x5 matrices? Clearly, I am not following well enough the matrix algebra within DLM. I appreciate your help. Best regards, Michael
-
myoungblood
- Posts: 3
- Joined: Wed Aug 25, 2010 8:49 am
Re: Stock-Watson Factor with Stochastic Volatility
Tom: I have resolved the initial difficulty with the solution that you provided, by correctly dimensioning the vect[vect]. However, the DLM requires another adjustment that eludes me. I am receiving this error message:
dlm(method=bfgs,parmset=fixparms,start=DLMSetup(),presample=ergodic,$
a=a,c=c,f=f,sw=swf(t),y=%xt(y,t),type=smooth) rstart rend xstates
## DLM1. Rank of Prediction Error Variance < Number of Observables
Thank you, Michael
dlm(method=bfgs,parmset=fixparms,start=DLMSetup(),presample=ergodic,$
a=a,c=c,f=f,sw=swf(t),y=%xt(y,t),type=smooth) rstart rend xstates
## DLM1. Rank of Prediction Error Variance < Number of Observables
Thank you, Michael