|
1 | 1 | """
|
2 |
| -Provides a class called DLE to convert and solve dynamic linear economics |
| 2 | +Provides a class called DLE to convert and solve dynamic linear economies |
3 | 3 | (as set out in Hansen & Sargent (2013)) as LQ problems.
|
4 | 4 | """
|
5 | 5 |
|
@@ -69,15 +69,14 @@ def __init__(self, information, technology, preferences):
|
69 | 69 | self.nb, self.nh = self.llambda.shape
|
70 | 70 | self.nd, self.nc = self.phic.shape
|
71 | 71 | self.nz, self.nw = self.c2.shape
|
72 |
| - junk, self.ng = self.phig.shape |
| 72 | + _, self.ng = self.phig.shape |
73 | 73 | self.nk, self.ni = self.thetak.shape
|
74 | 74 |
|
75 | 75 | # === Creation of various useful matrices === #
|
76 | 76 | uc = np.hstack((np.eye(self.nc), np.zeros((self.nc, self.ng))))
|
77 | 77 | ug = np.hstack((np.zeros((self.ng, self.nc)), np.eye(self.ng)))
|
78 | 78 | phiin = np.linalg.inv(np.hstack((self.phic, self.phig)))
|
79 | 79 | phiinc = uc.dot(phiin)
|
80 |
| - phiing = ug.dot(phiin) |
81 | 80 | b11 = - self.thetah.dot(phiinc).dot(self.phii)
|
82 | 81 | a1 = self.thetah.dot(phiinc).dot(self.gamma)
|
83 | 82 | a12 = np.vstack((self.thetah.dot(phiinc).dot(
|
@@ -306,7 +305,6 @@ def canonical(self):
|
306 | 305 | Ac2 = np.hstack((np.zeros((self.nz, self.nh)), self.a22))
|
307 | 306 | Ac = np.vstack((Ac1, Ac2))
|
308 | 307 | Bc = np.vstack((self.thetah, np.zeros((self.nz, self.nc))))
|
309 |
| - Cc = np.vstack((np.zeros((self.nh, self.nw)), self.c2)) |
310 | 308 | Rc1 = np.hstack((self.llambda.T.dot(self.llambda), -
|
311 | 309 | self.llambda.T.dot(self.ub)))
|
312 | 310 | Rc2 = np.hstack((-self.ub.T.dot(self.llambda), self.ub.T.dot(self.ub)))
|
|
0 commit comments