Skip to content

Commit

Permalink
REPLICA: PR 149 for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Dec 14, 2023
1 parent 30fe5e9 commit 0d2647d
Showing 1 changed file with 2 additions and 4 deletions.
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

1 comment on commit 0d2647d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.