Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPLICA: PR 149 for testing #153

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lectures/arellano.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,7 @@ def compute_q(v_c, v_d, q, params, arrays):
for B_idx in range(len(B_grid)):
for y_idx in range(len(y_grid)):
# Compute default probability and corresponding bond price
default_states = 1.0 * (v_c[B_idx, :] < v_d)
delta = np.dot(default_states, P[y_idx, :])
delta = P[y_idx, v_c[B_idx, :] < v_d].sum()
q[B_idx, y_idx] = (1 - delta ) / (1 + r)
```

Expand Down Expand Up @@ -769,8 +768,7 @@ zz = np.empty_like(v_c)

for B_idx in range(B_grid_size):
for y_idx in range(y_grid_size):
default_states = 1.0 * (v_c[B_idx, :] < v_d)
zz[B_idx, y_idx] = np.dot(default_states, P[y_idx, :])
zz[B_idx, y_idx] = P[y_idx, v_c[B_idx, :] < v_d].sum()

# Create figure
fig, ax = plt.subplots(figsize=(10, 6.5))
Expand Down
Loading