Structural equation model with regime switching
Structural equation model with regime switching
Dear all,
I'm very new to RATS and I'm struggling with the implementation of my methodology with other software. I firstly want to figure out whether RATS can solve my problem, and then move to the learning curve of coding. I have a dataset of stock's liquidity (liq`i') for 100 companies and market liquidity (liqm).
I want to implement the following simple ols model:
liq_i = a + b liq_i + \omega (Z_t) e
However, I want the beta coefficient to change according to a regime of Illiqj, identified using a Markov switching model with 2 states and regime-dependent variances:
liq_m = \mu (z_t) + \omega_m \zeta
Ideally, the two models should be simultaneously identified, as in a structural equation modelling framework. In this way I should end up with 2 alphas (1 for each regime) and 2 betas (1 for each regime).
Is it possible to achieve this in RATS?
Thanks
Stefano
I'm very new to RATS and I'm struggling with the implementation of my methodology with other software. I firstly want to figure out whether RATS can solve my problem, and then move to the learning curve of coding. I have a dataset of stock's liquidity (liq`i') for 100 companies and market liquidity (liqm).
I want to implement the following simple ols model:
liq_i = a + b liq_i + \omega (Z_t) e
However, I want the beta coefficient to change according to a regime of Illiqj, identified using a Markov switching model with 2 states and regime-dependent variances:
liq_m = \mu (z_t) + \omega_m \zeta
Ideally, the two models should be simultaneously identified, as in a structural equation modelling framework. In this way I should end up with 2 alphas (1 for each regime) and 2 betas (1 for each regime).
Is it possible to achieve this in RATS?
Thanks
Stefano
Re: Structural equation model with regime switching
Sorry. I'm totally lost by your notation. You have liq_i as both the dependent variable and the explanatory variable in the first equation. What is Z_t? The regime? What is liq_m and how does it enter the model. You're probably better off either posting the GIF, JPG or PDF of the model.
Re: Structural equation model with regime switching
Thanks for your reply Tom,
I'm sorry but my notation was actually imprecise. Please find attached a pdf with the structural equation.
The first equation is a Markov switching model with two regimes of market illiquidity and the two regimes are identified by the unobservable variable z. The second equation is an ols where the stock-specific liquidity must have an alpha and betas that change according to the regime of equation 1.
Hope this clarifies
I'm sorry but my notation was actually imprecise. Please find attached a pdf with the structural equation.
The first equation is a Markov switching model with two regimes of market illiquidity and the two regimes are identified by the unobservable variable z. The second equation is an ols where the stock-specific liquidity must have an alpha and betas that change according to the regime of equation 1.
Hope this clarifies
- Attachments
-
- Model.pdf
- (34.55 KiB) Downloaded 1208 times
Re: Structural equation model with regime switching
What you wrote doesn't have regime-dependence in the 2nd equation. Are *all* the regression coefficients regime-dependent?
It's not simultaneous because it has a recursive structure (assuming that the two residual terms are assumed to be uncorrelated). However, it's not a standard form of a MS model. But it's not especially difficult, because the regime-dependent likelihood is relatively straightforward---assuming independent Normally distributed residuals, the log likelihood is just the sum of the log likelihoods of the equations, which gets "exp'ed" to convert into the likelihood itself. MS models are covered in Section 11.7 of the User's Guide, but we would strongly recommend that you get the Structural Breaks and Switching Models course.
A word of caution, however. I would give very good odds that your regimes will end up splitting the sample mainly on differing variances. That's very common in almost any model like this that has both switching regression coefficients and switching variances, and I suspect that regressions on returns data would show that even more strongly.
It's not simultaneous because it has a recursive structure (assuming that the two residual terms are assumed to be uncorrelated). However, it's not a standard form of a MS model. But it's not especially difficult, because the regime-dependent likelihood is relatively straightforward---assuming independent Normally distributed residuals, the log likelihood is just the sum of the log likelihoods of the equations, which gets "exp'ed" to convert into the likelihood itself. MS models are covered in Section 11.7 of the User's Guide, but we would strongly recommend that you get the Structural Breaks and Switching Models course.
A word of caution, however. I would give very good odds that your regimes will end up splitting the sample mainly on differing variances. That's very common in almost any model like this that has both switching regression coefficients and switching variances, and I suspect that regressions on returns data would show that even more strongly.
Re: Structural equation model with regime switching
Well, the gamma parameter is supposed to change according to the regime of market illiquidity (at least in my idea). With regard to the *all*, I don't think is a good idea to only make a conditional slope, therefore, also the alpha should switch.
Thanks for the advice, I definitely need to get into RATS. In this phase I just wanted to know whether my query was something implementable.
Furthermore, I already have markov switching estimates for the illiquidity time series. It is absolutely acceptable that regimes switch based on variance changes in this type of empirical exercise. Thanks for it!
Thanks for the advice, I definitely need to get into RATS. In this phase I just wanted to know whether my query was something implementable.
Furthermore, I already have markov switching estimates for the illiquidity time series. It is absolutely acceptable that regimes switch based on variance changes in this type of empirical exercise. Thanks for it!
Re: Structural equation model with regime switching
Yes, it's quite doable. And you are quite correct that if gamma switches, alpha needs to switch as well.