Aug-04-2019, 03:09 PM
Could someone help me with the formulas in point 2 and 3? I've already written the matrices.
And I know already the formulas of Fnew and Q but I don't know how to put all together. Thank you so much for every help.
1.2 Tasks
1.Write the model in the following form:
AZt = CEtZt+1 + DZt−1 + ut, (8)
with the vector
Zt = [yt, πt, it, bt, vt, gt]j (9)
Clearly write down the 6x6 matrices A,C and D and the vector ut.
2.Define a function that has as input matrices A,C and D and an initial guess for F. The function should return the matrices F and Q that satisfy Zt = F Zt 1 + Qut. That is, define a function that applies the linear time iteration algorithm. You can use your ’while loop’ for this.
Hint remember the formulas
Fnew = ((A − CF )^(−1))*D
and
Q = (A − CF new)^(−1)
3.Use the function that you just defined to obtain the general solution,
Zt = F Zt−1 + Qut
And I know already the formulas of Fnew and Q but I don't know how to put all together. Thank you so much for every help.
1 2 |
Fnew = np.dot(np.linalg.inv(A - np.dot(C,F)),D) Q = np.linalg.inv(A - np.dot(C,Fnew)) |
1.Write the model in the following form:
AZt = CEtZt+1 + DZt−1 + ut, (8)
with the vector
Zt = [yt, πt, it, bt, vt, gt]j (9)
Clearly write down the 6x6 matrices A,C and D and the vector ut.
2.Define a function that has as input matrices A,C and D and an initial guess for F. The function should return the matrices F and Q that satisfy Zt = F Zt 1 + Qut. That is, define a function that applies the linear time iteration algorithm. You can use your ’while loop’ for this.
Hint remember the formulas
Fnew = ((A − CF )^(−1))*D
and
Q = (A − CF new)^(−1)
3.Use the function that you just defined to obtain the general solution,
Zt = F Zt−1 + Qut