Skip to content

Commit

Permalink
TST: Sync from book-dp1
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Mar 28, 2024
1 parent aef53b0 commit 89d6771
Show file tree
Hide file tree
Showing 52 changed files with 618 additions and 279 deletions.
4 changes: 2 additions & 2 deletions code/jl/american_option.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fontsize=16


function plot_contours(; savefig=false,
figname="./figures/american_option_1.pdf")
figname="../figures/american_option_1.pdf")

model = create_american_option_model()
(; t_vals, z_vals, w_vals, Q, φ, T, β, K, e) = model
Expand Down Expand Up @@ -94,7 +94,7 @@ end

function plot_strike(; savefig=false,
fontsize=12,
figname="./figures/american_option_2.pdf")
figname="../figures/american_option_2.pdf")

model = create_american_option_model()
(; t_vals, z_vals, w_vals, Q, φ, T, β, K, e) = model
Expand Down
2 changes: 1 addition & 1 deletion code/jl/ar1_spec_rad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fs=14

function plot_beta_sim(; T=80,
savefig=false,
figname="./figures/ar1_spec_rad.pdf")
figname="../figures/ar1_spec_rad.pdf")
β_vals = zeros(T)
Z = 1
for t in 1:T
Expand Down
2 changes: 1 addition & 1 deletion code/jl/bellman_envelope.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ ax.set_yticks([])

plt.show()

file_name = "./figures/bellman_envelope.pdf"
file_name = "../figures/bellman_envelope.pdf"
fig.savefig(file_name)

2 changes: 1 addition & 1 deletion code/jl/binom_stoch_dom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ax.plot(x, pdf(ψ), "-o", alpha=0.6, label=lb)
ax.legend(fontsize=16, frameon=false)

if false
fig.savefig("./figures/binom_stoch_dom.pdf")
fig.savefig("../figures/binom_stoch_dom.pdf")
end

plt.show()
Expand Down
2 changes: 1 addition & 1 deletion code/jl/concave_map_fp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ ax.set_ylim(0, 3)
ax.set_xlim(0, 3)

plt.show()
#fig.savefig("./figures/concave_map_fp.pdf")
#fig.savefig("../figures/concave_map_fp.pdf")


Loading

1 comment on commit 89d6771

@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.