Skip to content

[update_olg] Editorial updates from #434 #438

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

Merged
merged 2 commits into from
Jun 17, 2024
Merged

[update_olg] Editorial updates from #434 #438

merged 2 commits into from
Jun 17, 2024

Conversation

longye-tian
Copy link
Collaborator

Dear John @jstac ,

I have updated the lecture on OLG model (olg.md) according to the editorial suggestions #434. In particular, this pull request update:

Code:

  • x=1000 to n=1000;
  • vectorize k_grid_next
  • add y labels to plot in 24.6.3
  • remove duplicate codes

Content

  • Add hyphen to 'long run growth' and '45 degree line'

  • firm problem to firm's problem to match with the title

  • interest rate to gross interest rate to match with the content later

  • change $\ell_t w_t$ to $w_t \ell_t$ to match the order with $R_t k_t$

Best ❤️

Longye

This commit is related to #434. In particular, it involves:

Code:
- `x=1000` to `n=1000`;
- vectorize `k_grid_next`
- add y labels to plot in 24.6.3
- remove duplicate codes

Content
- Add hyphen to 'long run growth' and '45 degree line'

- firm problem to firm's problem to match with the title

- interest rate to gross interest rate to match with the content later

- change $\ell_t w_t$ to $w_t \ell_t$ to match the order with $\R_t k_t$
@longye-tian longye-tian requested a review from jstac May 8, 2024 03:09
Copy link

netlify bot commented May 8, 2024

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 742e6f6
🔍 Latest deploy log https://app.netlify.com/sites/taupe-gaufre-c4e660/deploys/663af1db941a350007f959ac
😎 Deploy Preview https://deploy-preview-438--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

- fix error in previous commit
Copy link

github-actions bot commented May 8, 2024

@github-actions github-actions bot temporarily deployed to pull request May 8, 2024 03:38 Inactive
k_grid_next = np.empty_like(k_grid)

for i in range(x):
for i in range(n):
Copy link
Contributor

Choose a reason for hiding this comment

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

see above comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @mmcky, in the exercise, we define k_update again as follows,

def k_update(k, model):
    return optimize.newton(lambda k_prime: f(k_prime, k, model), 0.1)

but this time, the k_update function is not inherently vectorized as in the main text, which is

def k_update(k, α, β):
    return β * (1 - α) * k**α /  (1 + β)

So we cannot use the way in the main text to vectorize k_grid_next.

Best,
Longye

@mmcky
Copy link
Contributor

mmcky commented May 8, 2024

thanks @longye-tian just had a few questions above.

@mmcky
Copy link
Contributor

mmcky commented May 8, 2024

@jstac this looks ready for your review.

@mmcky mmcky changed the title update_olg.md [update_olg] Editorial updates from #434 May 9, 2024
@mmcky mmcky added the ready label Jun 17, 2024
@jstac
Copy link
Contributor

jstac commented Jun 17, 2024

Nice work @longye-tian , many thanks.

@jstac jstac merged commit af6bf16 into main Jun 17, 2024
6 checks passed
@jstac jstac deleted the update_olg branch June 17, 2024 09:36
@longye-tian longye-tian mentioned this pull request Jul 5, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants