@@ -744,8 +744,10 @@ print(f"Vectorized utilities: {utilities}")
7447444 . ** Pure Functions** : All computations are done with pure functions rather than methods:
745745
746746``` {code-cell} python3
747- # Example of pure function design
748- tax_rates = compute_tax_rates(solution['c'], solution['l'], crra_params)
747+ # Example of pure function design with example values
748+ c_example = jnp.array([0.5, 0.4]) # Example consumption values
749+ l_example = jnp.array([0.3, 0.4]) # Example leisure values
750+ tax_rates = compute_tax_rates(c_example, l_example, crra_params)
749751print(f"Tax rates computed with pure function: {tax_rates}")
750752```
751753
@@ -1038,33 +1040,11 @@ print("This demonstrates how the choice of utility function affects Ramsey outco
10381040
10391041In {doc}` this subsequent lecture <amss2> ` and {doc}` this subsequent lecture <amss3> ` , some ultimate consequences of that force are explored.
10401042
1041- ``` {code-cell} python3
1042- T = 200
1043- s_0 = 0
1044- mc = MarkovChain(Π)
1045-
1046- s_hist_long = mc.simulate(T, init=s_0, random_state=5)
1047- ```
1048-
1049- ``` {code-cell} python3
1050- sim_amss = amss_model.simulate(s_hist_long, b_0)
1051- sim_ls = ls_model.simulate(0.5, 0, T, s_hist_long)
1052-
1053- titles = ['Consumption', 'Labor Supply', 'Government Debt',
1054- 'Tax Rate', 'Government Spending', 'Output']
1055-
1056-
1057- fig, axes = plt.subplots(3, 2, figsize=(14, 10))
1058-
1059- for ax, title, ls, amss in zip(axes.flatten(), titles, sim_ls, \
1060- sim_amss):
1061- ax.plot(ls, '-k', amss, '-.b', alpha=0.5)
1062- ax.set(title=title)
1063- ax.grid()
1064-
1065- axes[0, 0].legend(('Complete Markets','Incomplete Markets'))
1066- plt.tight_layout()
1067- plt.show()
1043+ ``` {note}
1044+ The simulation comparison between complete and incomplete markets models
1045+ is demonstrated in the subsequent AMSS lectures. The JAX implementation
1046+ focuses on demonstrating the core concepts of automatic differentiation,
1047+ JIT compilation, and functional programming approaches to optimal taxation.
10681048```
10691049
10701050[ ^ fn_a ] : In an allocation that solves the Ramsey problem and that levies distorting
0 commit comments