You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to rewrite this lecture in JAX, but I failed to generate the same plot for the complete vs. incomplete market case under the same setup, even though the code produces the same results for the first few plots.
I think the code in this lecture is sensitive to numerical precision and diverges with slight changes in parameters or precision, as noted in the code comment:
classAMSS:
# WARNING: THE CODE IS EXTREMELY SENSITIVE TO CHOICES OF PARAMETERS.# DO NOT CHANGE THE PARAMETERS AND EXPECT IT TO WORK
I will try to rewrite the code without aiming to replicate the original plot and instead conduct sanity checks to see whether the results align with the theoretical predictions.
I will work on it once we push towards the advanced series.
Yes, I used high-precision mode, but the result is still off. I’ll try to make it more robust and see if we can add an exercise where we can tweak the parameters and perform sensitivity analysis.
Activity
HumphreyYang commentedon Aug 13, 2025
I have been trying to rewrite this lecture in JAX, but I failed to generate the same plot for the complete vs. incomplete market case under the same setup, even though the code produces the same results for the first few plots.
I think the code in this lecture is sensitive to numerical precision and diverges with slight changes in parameters or precision, as noted in the code comment:
I will try to rewrite the code without aiming to replicate the original plot and instead conduct sanity checks to see whether the results align with the theoretical predictions.
I will work on it once we push towards the advanced series.
jstac commentedon Aug 13, 2025
Many thanks @HumphreyYang !
@thomassargent30 will be the best guide concerning theory.
It's not great that we have that comment in our code so it will be nice if we can get a little more robustness :-)
(BTW, did you try with 64 bit floats? That might make a difference.)
HumphreyYang commentedon Aug 13, 2025
Many thanks, @jstac for the suggestion!
Yes, I used high-precision mode, but the result is still off. I’ll try to make it more robust and see if we can add an exercise where we can tweak the parameters and perform sensitivity analysis.
jstac commentedon Aug 14, 2025
Thanks @HumphreyYang, it's a big challenge. Please touch base with @thomassargent30 regarding changes.