Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fsolve
#1
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.

Fnew=np.dot(np.linalg.inv(A-np.dot(C,F)),D)
Q=np.linalg.inv(A-np.dot(C,Fnew))
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
Reply
#2
Error:
Zt = F * Z(t-1) + Qut
in both cases
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  fsolve over meshgrid schniefen 0 1,701 Oct-20-2019, 07:30 PM
Last Post: schniefen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020