QuantEcon / lecture-python-programming.myst

Python Programming for Finance and Economics
https://python-programming.quantecon.org
43 stars 26 forks source link

Migrate Sympy Lecture from the Intro Series #284

Closed HumphreyYang closed 1 year ago

HumphreyYang commented 1 year ago

Migrate from QuantEcon/lecture-python-intro#272

github-actions[bot] commented 1 year ago

🚀 Deployed on https://64cf227f842a6d1b1497c444--epic-agnesi-957267.netlify.app

HumphreyYang commented 1 year ago

Hi @Smit-create @chappiewuzefan and @HengchengZhang

It would be greatly appreciated if you were available to have a quick review of this lecture : )

Many thanks in advance.

HumphreyYang commented 1 year ago

Nice work team. I just had a few comments and questions.

Hi @mmcky,

Many thanks for your comments.

I have been working on another project lately, so this is still a writing-in-progress lecture. I will look into your comments and make the changes you suggested today : )

HumphreyYang commented 1 year ago

Hi @chappiewuzefan,

On a second look, the example in the application section looks slightly strange to me.

In this case, cost $D$ is a positive value represented in the PV, which gives values to go to college instead of diminishing it. Please let me know what your thoughts are when setting up this example : )

chappiewuzefan commented 1 year ago

Hi @chappiewuzefan,

On a second look, the example in the application section looks slightly strange to me.

In this case, cost D is a positive value represented in the PV, which gives values to go to college instead of diminishing it. Please let me know what your thoughts are when setting up this example : )

Thanks for point that out, it was my mistake, the cost of attending the college will decrease the pv, previously, my equation is below: PV_college = D + phiw(1 + g)4/R + phiw(1 + g)5/R2 + phiw(1 + g)6/R3 + phiw(1 + g)7/R4 it should be : PV_college = -D + phiw(1 + g)4/R + phiw(1 + g)5/R2 + phiw(1 + g)6/R3 + phiw(1 + g)7/R4 Many thanks

HumphreyYang commented 1 year ago

Hi @chappiewuzefan, On a second look, the example in the application section looks slightly strange to me. In this case, cost D is a positive value represented in the PV, which gives values to go to college instead of diminishing it. Please let me know what your thoughts are when setting up this example : )

Thanks for point that out, it was my mistake, the cost of attending the college will decrease the pv, previously, my equation is below: PV_college = D + phiw(1 + g)4/R + phiw(1 + g)5/R2 + phiw(1 + g)6/R3 + phiw(1 + g)7/R4 it should be : PV_college = -D + phiw(1 + g)4/R + phiw(1 + g)5/R2 + phiw(1 + g)6/R3 + phiw(1 + g)7/R4 Many thanks

Many thanks @chappiewuzefan, I have updated your example and used derivatives to calculate some of the factors. Please have a look.

chappiewuzefan commented 1 year ago

Hi @chappiewuzefan, On a second look, the example in the application section looks slightly strange to me. In this case, cost D is a positive value represented in the PV, which gives values to go to college instead of diminishing it. Please let me know what your thoughts are when setting up this example : )

Thanks for point that out, it was my mistake, the cost of attending the college will decrease the pv, previously, my equation is below: PV_college = D + phiw(1 + g)4/R + phiw(1 + g)5/R2 + phiw(1 + g)6/R3 + phiw(1 + g)7/R4 it should be : PV_college = -D + phiw(1 + g)4/R + phiw(1 + g)5/R2 + phiw(1 + g)6/R3 + phiw(1 + g)7/R4 Many thanks

Many thanks @chappiewuzefan, I have updated your example and used derivatives to calculate some of the factors. Please have a look.

Yeah, indeed your method is more elegant, great work and many thanks !!!

HumphreyYang commented 1 year ago

Hi @mmcky,

This PR is ready for your review.

Many thanks in advance.

mmcky commented 1 year ago

@HumphreyYang this is looking really nice. Thanks for migrating this.

As you have already pointed out it is a long lecture. My thinking is to break the lecture at

13.6. Application: Equalizing Differences Model

and include that content in lecture-python-intro as a sympy add on closer to the Equalizing Differences Model.

What do you think of that ideas.


I think we could also include 1 or 2 simpler exercises in the realm of "getting started with sympy"

HumphreyYang commented 1 year ago

As you have already pointed out it is a long lecture. My thinking is to break the lecture at

13.6. Application: Equalizing Differences Model

Hi @mmcky

Are there any other issues apart from this? Should we hand it over to John for a quick review as discussed if there are no further issues : )

Many thanks in advance.

jstac commented 1 year ago

Great work @HumphreyYang and @chappiewuzefan , thanks @mmcky for the review.

The lecture is excellent but the equalizing differences material should not be in there. It's too dense and complex.

I thought we agreed to shift it to the equalizing differences lecture in the intro lecture series.

Please see also my minor comments above.

HumphreyYang commented 1 year ago

I thought we agreed to shift it to the equalizing differences lecture in the intro lecture series.

Many thanks @jstac for the review. I will update these suggestions.

I thought the plan was to have your opinion before migrating the content. I will put together a PR on the intro series side to integrate this application into the equalizing differences lecture. I will also move the content in exercise 3 on pure exchange economy to the main text.

jstac commented 1 year ago

Thanks @HumphreyYang , you are right.

I appreciate it. Please go ahead.

mmcky commented 1 year ago

Thanks @jstac and @HumphreyYang I will merge and make this live and then seek comment from Tom re: Equalising Difference Model re: integrating it into that lecture.

HumphreyYang commented 1 year ago

Thanks @jstac and @HumphreyYang I will merge and make this live and then seek comment from Tom re: Equalising Difference Model re: integrating it into that lecture.

Hi @mmcky,

I have removed the content on equalizing differences model and am now putting together a PR in the intro series.

I will put SymPy as a separate section in that lecture and seek suggestions from you.

Many thanks.

HumphreyYang commented 1 year ago

Hi @jstac and @mmcky,

I think this PR is ready to be merged if there are no other comments/issues.

Many thanks in advance.

mmcky commented 1 year ago

thanks @HumphreyYang I will merge this now.