Skip to content

Commit c402d32

Browse files
committed
Update hank.py
1 parent e8d4b07 commit c402d32

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sequence_jacobian/hank.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,15 @@ def solve_uc(w, T, eis, frisch, vphi, uc_seed):
8787
@njit
8888
def netexp(log_uc, w, T, eis, frisch, vphi):
8989
"""Return net expenditure as a function of log uc and its derivative."""
90-
c, n = cn(np.exp(log_uc), w, eis, frisch, vphi)
90+
uc = np.exp(log_uc)
91+
c = uc ** (-eis)
92+
n = (w * uc / vphi) ** frisch
9193
ne = c - w * n - T
9294

9395
# c and n have elasticities of -eis and frisch wrt log u'(c)
9496
c_loguc = -eis * c
9597
n_loguc = frisch * n
9698
netexp_loguc = c_loguc - w * n_loguc
97-
9899
return ne, netexp_loguc
99100

100101

0 commit comments

Comments
 (0)