A question regarding state-space

Topics: IRIS in General, Models
Jan 14, 2015 at 8:29 AM
Hi All,

May I have your suggestion on this matter?

When solving a model, IRIS gives a solution (given 'triangular=' false):
[Xf;Xb] = [Kf;Kb] + [Tf;Tb]*Xb(-1) + [Rf;Rb]*e
Let's split into forward-looking and backward-looking:
Xf = Kf + Tf*Xb(-1) + Rf*e
Xb = Kb + Tb*Xb(-1) + Rb*e
If I want to have matrices that transforms Xb to Xf, i.e.
Xf = Kt + Tt*Xb + Rt*e
Is it correct if I derive as following:
Xb(-1) = inv(Tb)*[Xb-Kb-Rb*e]
Xf = Kf + Tf*inv(Tb)*[Xb-Kb-Rb*e] +Rf*e
Xf = Kf-Tf*inv(Tb)*Kb + Tf*inv(Tb)*Xb + [Rf-Tf*inv(Tb)*Rf]*e

Kt = Kf-Tf*inv(Tb)*Kb 
Tt = Tf*inv(Tb)
Rt =[Rf-Tf*inv(Tb)*Rf]
Jan 14, 2015 at 12:47 PM

No, this is (unfortunately:) not correct. The problem is that the model is a probabilistic causal system, and you are trying to reverse the causality. The critical step you make is
Xb(-1) = inv(Tb)*[Xb-Kb-Rb*e]
Now look at the equation from a probabilistic/statistical point of view. The equation suggests that Xb(-1) is correlated with current shocks e. But these two are not correlated (by assumption).

So if you want to use the new matrices Tt etc. to write an alternative description of the model, you will make a fatal error.

What is the reason you want to derive an equation like Xf = Kt + Tt*Xb + Rt*e? If it is e.g. for you to be able to calculate cross-covariance matrix between Xf and Xb, this can be done directly from the state space matrices (and it is, of course, done within the acf(...) function).

Marked as answer by jaromirbenes on 1/14/2015 at 5:47 AM
Jan 14, 2015 at 1:35 PM
Thank you so much.

Please let me go back to original question.
Can we write Xf as a function of Xb?
Normally, we know that everything can be written as functions of Xb(-1).
But I wonder if we can do something like mapping Xb to measurement variables with Xf (or this is not normal in state-space culture).
Jan 14, 2015 at 1:59 PM
Edited Jan 14, 2015 at 1:59 PM
I'll try to look into that. I'm not sure if the mapping exists for a general case. Will get back to you.

And no, there is not established state-space culture in forward-looking models :)

Marked as answer by jaromirbenes on 1/14/2015 at 6:59 AM
Jan 14, 2015 at 5:20 PM
I had a quick look into the issue. Unfortunately, I now believe it is not possible to express Xf(t) as a transformation of Xb(t) (and e(t)) in a general case. Is there a particular reason why you need to do this? Maybe we can think of some workaround.

Marked as answer by jaromirbenes on 1/14/2015 at 10:20 AM
Jan 15, 2015 at 3:18 AM
It's not a big deal, actually.

Some finance model map X(t) to yield curve (known as Affine model). Always in the form of
y = A + B*X(t)
No problem at this point. But imagine that you have some forward-looking variable in X(t), let's pick 'real interest rate for example,
r = i - pi{+1}
All I want is just to "make it clean" by eliminating what is not "necessary" in B and X(t) because you realize that r is just a transformation of other things somehow (and I may mistaken that this is possible).

However, as I said this is not a big deal, it's still OK to have r in X(t).

Thanks again
Jan 15, 2015 at 12:54 PM
Edited Jan 15, 2015 at 12:54 PM
Oh, I see what you want now.

If I understand correctly, you want the variable r (and possibly some other, too) to appear in the vector of backward-looking variables, Xb, don't you?

That's actually easy. Let me first give you a bit of background. The variables that don't have any lags or leads can be, from a technical point of view, treated either as Xb or Xf; either way leads to identical results. Because it's computationally much more efficient, IRIS automatically includes such variables in Xf, and that is the case with your r too. But you can 'fool' IRIS by simply typing an artificial lag of that variables somewhere with a zero parameter so it has no effect whatsoever only that IRIS will now see the lag and include that variable in Xb instead.

For example, you can write
r = 0*r{-1} + i - pi{1};
This is little bit clumsy, I admit, especially if you have multiple variables like this. So in the next release, I will create a special option in the model(...) function to handle this problem so that you will be able to do it in a more systematic way. The option will named 'makeBkw=' and will be assigned the list of variables you want to make sure are included in Xb.

Let me know if this is want...

Marked as answer by jaromirbenes on 1/15/2015 at 5:54 AM
Jan 15, 2015 at 2:54 PM
Not really, I think.

I want r to "disappear', not just moving it from Xf to Xb.
"Disappear" means writing r as a function of other variables (this is what I'm not sure it's possible). What inspires me is that we all know that r is "nothing" but just a combination of i and pi{1}.
While i is rather straightforward as it is a part of X(t), I suspect if we can think of pi{1} as other variables too. (I assume that we can because pi{1} is "nothing" but a consequence of X(t) as well.)

So if it's possible, what I said above is something like "compacting" the size of system (X) to be as small as possible.

What will I benefit from doing this?
Recall the equation y = A + B*X(t) above, I can have it less complicated and make sure there's no redundant.
But, if I can't, I think there's no harm too. It's just not good when you have many Xfs.
Jan 15, 2015 at 3:09 PM
Edited Jan 15, 2015 at 3:10 PM
Then you should not declared r as a variable, but rather as a mere substitution. For instance:
    rr := i - pi{1} ;

   y = 0.5*$rr$ + ...
But I still don't understand why you simple don't ignore the entire forward looking part of the solution... You can just take the lower part (of all the matrices and vectors) referring to the bkw-looking variables, and you have all you need to describe the minimum necessary state space transition equation. That way you remove all redundant variables (redundant in the sense that they are not true state variables).

Marked as answer by jaromirbenes on 1/15/2015 at 8:09 AM
Jan 16, 2015 at 8:31 AM
Sorry that I didn’t make it clear enough. Please let me try one more…

First, let’s change r to pie where
pie = pi{+1}
So pie is my only Xf now and suppose that I have some other Xbs, e.g. y and pi.

It is equation
Yield = A + B*X(t)
Yield = a + b1*pie(t) + b2*y(t) + b3*pi(t)
that forces me to do this strange thing. The implication of this equation is that, at every point in time, with coefficients A and B, one can draw a yield curve if he only knows the state he currently belongs to (i.e. pie(t), y(t) and pi(t)) without knowing those state-space things. And to come to this step, I DO NEED pie for some reason (for example, it’s easier to model pie separately because it’s obviously a part of yield, etc.)
But when it comes to interpret the equation, I realize that pie is not TRUE, it should be determined by other things (I believe that one combination of y and pi can be mapped to only one value of pie).
Now let’s put some numbers into the equation:
Yield = 0.1 +  0.4*pie(t) + 1.2*y(t) + 0.5*pi(t)
Then if I can find that
pie(t) = 0.1 + 0.5*y(t) + 0.7*pi(t)
Plugged into original equation, I will eventually have a CLEAN version of it:
Yield = 0.1 + 0.4*0.1 + (0.4*0.5 + 1.2)*y(t) + (0.4*0.7 + 0.5)*pi(t)
This is what I tried to do at the first post.
Jan 16, 2015 at 2:13 PM
I see. I'm afraid you only have two options. Either keep pie in the 'unclean' equation, or express the right-hand side in terms of lagged variables and current shocks (in which case you can substitute for pie),
Yield = a + b*y{-1} + c*pi{-1} + d*shock1 + e*shock2 + ...
Marked as answer by jaromirbenes on 1/16/2015 at 7:13 AM