Test Borrowing Default (Save + Borr Distribution)
back to Fan's Dynamic Assets Repository Table of Content.
@seealso
- test speed: fsi_abz_ds_vecsv_speed
- test joint RANDOM: fsi_abz_ds_vecsv_joint_rand
- test price no default CROSS: fsi_abz_ds_vecsv_price_nbc_cross
- test price default CROSS: fsi_abz_ds_vecsv_price_default_cross
- test interest rate no default: fsi_abz_ds_vecsv_nbc
- test interest rate no default CROSS: fsi_abz_ds_vecsv_nbc_cross
- test interest rate no default GRID: fsi_abz_ds_vecsv_nbc_grid
- test interest rate default: fsi_abz_ds_vecsv_default
- test interest rate default V(a,z) Comparison: fsi_abz_ds_vecsv_default_compaz
- test interest rate default CROSS: fsi_abz_ds_vecsv_default_cross
- test interest rate default GRID: fsi_abz_ds_vecsv_default_grid
- test shock default (very low cmin): fsi_abz_ds_vecsv_shk_default_lowcmin
- test shock no default: fsi_abz_ds_vecsv_shk_nbc
- test shock no default CROSS: fsi_abz_ds_vecsv_shk_nbc_cross
- test shock default: fsi_abz_ds_vecsv_shk_default
- test shock default CROSS: fsi_abz_ds_vecsv_shk_default_cross
- test preference no default: fsi_abz_ds_vecsv_pref_nbc
- test preference no default CROSS: fsi_abz_ds_vecsv_pref_nbc_cross
- test preference default: fsi_abz_ds_vecsv_pref_default
- test preference default CROSS: fsi_abz_ds_vecsv_pref_default_cross
- test preference default (very low cmin): fsi_abz_ds_vecsv_pref_default_lowcmin
Contents
Loop over Savings Bounds
clear all; close all; ar_fl_a_max = linspace(0,50,2); for fl_a_max = ar_fl_a_max
Generate Data A: Varying Savings Bounds, Compare Two Borrowing Interest Rates along all AZ points
Do not allow for savings, Compare V(a,z;low borrow r) vs V(a,z;high borrow r)
% Number of Borrowing Interest Rates it_size = 2; % Do not Allow for Savings ar_fl_a_max = zeros([1,it_size]) + fl_a_max; % fl_z_r_borr_poiss_mean: see fft_gen_discrete_var ar_fl_z_r_borr_max = linspace(0.035, 0.065, it_size); % default or not bl_default = true; ar_bl_default = zeros([1,it_size]) + bl_default; % cmin fl_c_min = 0.01; ar_fl_c_min = zeros([1,it_size]) + fl_c_min; % borrow bound fl_b_bd = -30; ar_fl_b_bd = zeros([1,it_size]) + fl_b_bd; % Accuracy ar_fl_z_r_borr_n_hg = 1; ar_it_a_n_hg = zeros([1,length(ar_fl_z_r_borr_n_hg)]) + 750; it_z_wage_n = 15; % other parameters fl_crra = 1.5; fl_beta = 0.96; fl_r_save = 0.025; % Results Map Collection cl_result_map = []; it_cl_res_map_ctr = 0; % Simulate Model for it_cur_param = 1:1:length(ar_bl_default) disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp(['bl_default = ' num2str(ar_bl_default(it_cur_param))]); disp(['fl_c_min = ' num2str(ar_fl_c_min(it_cur_param))]); disp(['fl_b_bd = ' num2str(ar_fl_b_bd(it_cur_param))]); disp(['fl_a_max = ' num2str(ar_fl_a_max(it_cur_param))]); disp(['z_r_borr_max = ' num2str(ar_fl_z_r_borr_max(it_cur_param))]); disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp(''); disp(''); disp(''); disp(''); % Call Default Parameters <https://fanwangecon.github.io/CodeDynaAsset/m_az/paramfunc/html/ffs_abz_set_default_param.html ffs_abz_set_default_param> bl_input_override = true; it_param_set = 9; [param_map, support_map] = ffs_abz_set_default_param(it_param_set); % Changing Savings Allowed param_map('fl_a_max') = fl_a_max; % Borrowing Interest Rates, Same borrow and save rate, no random rate param_map('fl_z_r_borr_max') = ar_fl_z_r_borr_max(it_cur_param); param_map('fl_z_r_borr_min') = ar_fl_z_r_borr_max(it_cur_param); % Borrowing Parameters param_map('bl_default') = ar_bl_default(it_cur_param); param_map('fl_b_bd') = ar_fl_b_bd(it_cur_param); param_map('fl_c_min') = ar_fl_c_min(it_cur_param); param_map('fl_beta') = fl_beta; % Display Parameters support_map('bl_display') = false; support_map('bl_display_final') = false; support_map('bl_time') = true; support_map('bl_profile') = false; support_map('bl_graph_funcgrids') = false; for it_accuracy = 1:length(ar_it_a_n_hg) % Accuracy Regular param_map('it_a_n') = ar_it_a_n_hg(it_accuracy); param_map('it_z_wage_n') = it_z_wage_n; param_map('fl_z_r_borr_n') = ar_fl_z_r_borr_n_hg(it_accuracy); it_z_n = param_map('it_z_wage_n') * param_map('fl_z_r_borr_n'); param_map('it_z_n') = it_z_n; disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp(['it_a_n = ' num2str(ar_it_a_n_hg(it_accuracy)) ', it_z_n = ' num2str(it_z_n)]); disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); % Call Grid Generator <https://fanwangecon.github.io/CodeDynaAsset/m_az/paramfunc/html/ffs_abz_get_funcgrid.html ffs_abz_get_funcgrid> [armt_map, func_map] = ffs_abz_get_funcgrid(param_map, support_map, bl_input_override); % Call Dynamic Programming Problem <https://fanwangecon.github.io/CodeDynaAsset/m_az/solve/html/ff_abz_vf_vecsv.html ff_abz_vf_vecsv> result_map = ff_abz_vf_vecsv(param_map, support_map, armt_map, func_map); % Call Distribution CProgram result_map = ff_az_ds_vecsv(param_map, support_map, armt_map, func_map, result_map, bl_input_override); % Collect it_cl_res_map_ctr = it_cl_res_map_ctr + 1; cl_result_map{it_cl_res_map_ctr} = result_map; end % Snap snapnow; end
xxxxxxxxxxxxxxxxxxxxxxxxxxx bl_default = 1 fl_c_min = 0.01 fl_b_bd = -30 fl_a_max = 0 z_r_borr_max = 0.035 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 15 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 8.498366 seconds. Elapsed time is 3.953699 seconds. mean sd coefofvar min max pYis0 pYls0 pYgr0 pYisMINY pYisMAXY p0_1 p1 p5 p10 p15 p20 p25 p35 p50 p65 p75 p80 p85 p90 p95 p99 p99_9 fl_cov_cl_mt_val fl_cor_cl_mt_val fl_cov_cl_mt_pol_a fl_cor_cl_mt_pol_a fl_cov_cl_mt_coh fl_cor_cl_mt_coh fl_cov_cl_mt_pol_c fl_cor_cl_mt_pol_c fracByP0_1 fracByP1 fracByP5 fracByP10 fracByP15 fracByP20 fracByP25 fracByP35 fracByP50 fracByP65 fracByP75 fracByP80 fracByP85 fracByP90 fracByP95 fracByP99 fracByP99_9 ________ _______ _________ _______ ______ ________ _______ ________ __________ __________ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ ________ ______ ______ ________________ ________________ __________________ __________________ ________________ ________________ __________________ __________________ __________ __________ ________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ ___________ cl_mt_val -0.41897 5.4354 -12.973 -13.572 9.0406 0 0.463 0.537 0.00010153 0.00041717 -12.956 -12.199 -10.533 -8.7695 -7.2146 -5.8015 -4.503 -2.2043 0.6371 2.9001 4.1842 4.7698 5.3112 5.9417 6.6537 7.8575 8.6918 29.543 1 40.062 0.8645 47.014 0.9802 0.96313 0.69721 0.072111 0.37743 1.3844 2.5343 3.4857 4.2616 4.8745 5.6668 5.9264 5.2781 4.4286 3.8933 3.2903 2.6201 1.8749 1.1934 1.015 cl_mt_pol_a -11.666 8.5259 -0.73084 -28.986 0 0.030483 0.96952 0 0.020353 0.030483 -28.986 -28.986 -27.051 -24.69 -22.484 -20.394 -18.421 -14.86 -10.255 -6.3853 -4.1408 -3.0959 -2.1284 -1.2384 -0.42569 0 0 40.062 0.8645 72.69 1 66.581 0.88498 0.68251 0.31498 0.05057 0.05057 0.12339 0.23323 0.33339 0.42555 0.50907 0.65098 0.81147 0.91778 0.96277 0.9781 0.98923 0.99627 0.99966 1 1 cl_mt_coh -12.029 8.8243 -0.73357 -29.955 0.0448 0 0.96892 0.031081 0.020353 0.030483 -29.955 -29.955 -27.953 -25.509 -23.226 -21.063 -19.021 -15.336 -10.569 -6.564 -4.2409 -3.1595 -2.1581 -1.2369 -0.39579 0.0448 0.0448 47.014 0.9802 66.581 0.88498 77.868 1 1.513 0.67462 0.050683 0.050683 0.12366 0.23372 0.33407 0.42639 0.51003 0.6521 0.81263 0.91877 0.96356 0.97876 0.98975 0.99662 0.99984 1 1 cl_mt_pol_c 1.4298 0.25415 0.17775 0.01 3.2858 0 0 1 0.019286 0.00041717 0.01 0.01 1.2284 1.2982 1.3252 1.3428 1.3588 1.3912 1.4417 1.4958 1.5349 1.5566 1.5799 1.6114 1.6653 1.9375 2.8484 0.96313 0.69721 0.68251 0.31498 1.513 0.67462 0.064593 1 0.00013488 0.00013488 0.024254 0.06862 0.11456 0.16121 0.20844 0.30467 0.45316 0.6073 0.71319 0.76721 0.82201 0.87777 0.93789 0.9839 0.9988
xxxxxxxxxxxxxxxxxxxxxxxxxxx bl_default = 1 fl_c_min = 0.01 fl_b_bd = -30 fl_a_max = 0 z_r_borr_max = 0.065 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 15 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 6.513409 seconds. Elapsed time is 3.153783 seconds. mean sd coefofvar min max pYis0 pYls0 pYgr0 pYisMINY pYisMAXY p0_1 p1 p5 p10 p15 p20 p25 p35 p50 p65 p75 p80 p85 p90 p95 p99 p99_9 fl_cov_cl_mt_val fl_cor_cl_mt_val fl_cov_cl_mt_pol_a fl_cor_cl_mt_pol_a fl_cov_cl_mt_coh fl_cor_cl_mt_coh fl_cov_cl_mt_pol_c fl_cor_cl_mt_pol_c fracByP0_1 fracByP1 fracByP5 fracByP10 fracByP15 fracByP20 fracByP25 fracByP35 fracByP50 fracByP65 fracByP75 fracByP80 fracByP85 fracByP90 fracByP95 fracByP99 fracByP99_9 _______ _______ _________ _______ ______ ______ _______ _______ __________ _________ _______ _______ _______ _______ _______ ________ _______ _______ ________ ________ _________ ______ ______ ______ ______ ______ ______ ________________ ________________ __________________ __________________ ________________ ________________ __________________ __________________ __________ __________ ________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ ___________ cl_mt_val 1.8123 4.5947 2.5354 -16.325 7.657 0 0.22406 0.77594 3.8048e-05 0.0021127 -14.933 -13.348 -9.1242 -5.2745 -2.5296 -0.66494 0.58056 2.0992 3.3804 4.3386 4.9213 4.9461 5.45 5.9045 6.3799 6.8545 7.657 21.111 1 24.4 0.88693 27.918 0.95287 0.28647 0.1736 -0.014737 -0.078389 -0.32287 -0.51857 -0.62395 -0.66624 -0.66611 -0.58768 -0.35549 -0.029654 0.23669 0.36122 0.60965 0.65333 0.81587 0.96671 1 cl_mt_pol_a -3.3364 5.9875 -1.7946 -28.169 0 0.2296 0.7704 0 0.008895 0.2296 -28.169 -26.251 -18.579 -11.621 -7.2209 -4.6635 -3.1968 -1.6924 -0.67696 -0.18804 -0.037609 0 0 0 0 0 0 24.4 0.88693 35.85 1 34.245 0.89694 -0.33624 -0.15637 0.075101 0.083889 0.35339 0.57617 0.71489 0.80107 0.85912 0.92928 0.97934 0.99732 1 1 1 1 1 1 1 cl_mt_coh -3.47 6.3767 -1.8376 -29.917 0.0832 0 0.7099 0.2901 0.008895 0.2296 -29.917 -27.874 -19.703 -12.293 -7.6071 -4.8834 -3.3213 -1.7192 -0.63776 -0.11707 0.043147 0.0832 0.0832 0.0832 0.0832 0.0832 0.0832 27.918 0.95287 34.245 0.89694 40.662 1 0.016683 0.0072846 0.076688 0.085661 0.36067 0.58758 0.72842 0.81548 0.87371 0.94314 0.99074 1.0054 1.0055 1 1 1 1 1 1 cl_mt_pol_c 1.3187 0.35914 0.27235 0.01 3.2858 0 0 1 0.0088609 0.0021127 0.01 1.0064 1.0296 1.0419 1.0531 1.067 1.0832 1.1157 1.2063 1.3555 1.4585 1.5525 1.6085 1.819 2.1004 2.4692 3.2858 0.28647 0.1736 -0.33624 -0.15637 0.016683 0.0072846 0.12898 1 6.7197e-05 0.00099679 0.032092 0.071412 0.11125 0.15122 0.19248 0.27857 0.41547 0.55267 0.65904 0.71614 0.80583 0.83942 0.91069 0.98202 1
xxxxxxxxxxxxxxxxxxxxxxxxxxx bl_default = 1 fl_c_min = 0.01 fl_b_bd = -30 fl_a_max = 50 z_r_borr_max = 0.035 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 15 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 10.347854 seconds. Elapsed time is 0.348654 seconds. mean sd coefofvar min max pYis0 pYls0 pYgr0 pYisMINY pYisMAXY p0_1 p1 p5 p10 p15 p20 p25 p35 p50 p65 p75 p80 p85 p90 p95 p99 p99_9 fl_cov_cl_mt_val fl_cor_cl_mt_val fl_cov_cl_mt_pol_a fl_cor_cl_mt_pol_a fl_cov_cl_mt_coh fl_cor_cl_mt_coh fl_cov_cl_mt_pol_c fl_cor_cl_mt_pol_c fracByP0_1 fracByP1 fracByP5 fracByP10 fracByP15 fracByP20 fracByP25 fracByP35 fracByP50 fracByP65 fracByP75 fracByP80 fracByP85 fracByP90 fracByP95 fracByP99 fracByP99_9 ________ _______ _________ _______ ______ ________ _______ ________ __________ __________ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ ________ ______ ______ ______ ________________ ________________ __________________ __________________ ________________ ________________ __________________ __________________ __________ __________ ________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ ___________ cl_mt_val -0.25773 5.5161 -21.402 -13.576 20.49 0 0.45519 0.54481 9.9918e-05 1.2824e-20 -12.958 -12.194 -10.484 -8.7131 -7.1481 -5.696 -4.394 -2.0664 0.78554 3.0599 4.3392 4.9306 5.4981 6.123 6.9781 8.6449 10.525 30.427 1 41.842 0.87138 48.738 0.98079 0.94789 0.71026 0.11514 0.59912 2.2528 4.1071 5.6337 6.8858 7.8589 9.0951 9.431 8.2858 6.8358 5.9355 4.932 3.8086 2.5477 1.3635 1.0433 cl_mt_pol_a -11.375 8.7051 -0.76528 -28.986 48.78 0.020778 0.94369 0.035528 0.020309 8.3345e-20 -28.986 -28.986 -27.022 -24.645 -22.372 -20.202 -18.239 -14.622 -9.9718 -6.0451 -3.8751 -2.8417 -1.8084 -0.77501 0 2.3477 6.7301 41.842 0.87138 75.78 1 69.903 0.89137 0.69504 0.33 0.05175 0.05175 0.12724 0.23952 0.34224 0.43822 0.52159 0.66641 0.82771 0.93219 0.97409 0.98843 0.99824 1.0044 1.0057 1.0037 1.0007 cl_mt_coh -11.729 9.0087 -0.76806 -29.955 50.045 0 0.94369 0.056306 0.020309 8.3345e-20 -29.955 -29.955 -27.923 -25.463 -23.11 -20.864 -18.832 -15.089 -10.276 -6.2119 -3.9659 -2.8964 -1.8269 -0.75734 0.0448 2.4512 6.9432 48.738 0.98079 69.903 0.89137 81.156 1 1.5132 0.69428 0.051867 0.051867 0.12753 0.24003 0.34296 0.4391 0.52259 0.66757 0.8289 0.9332 0.97488 0.98909 0.99875 1.0047 1.0058 1.0038 1.0007 cl_mt_pol_c 1.4303 0.24194 0.16916 0.01 4.5053 0 0 1 0.018973 1.2824e-20 0.01 0.01 1.2228 1.291 1.3212 1.342 1.3617 1.3944 1.4466 1.501 1.5431 1.5652 1.587 1.6162 1.6898 1.8549 2.074 0.94789 0.71026 0.69504 0.33 1.5132 0.69428 0.058537 1 0.00013265 0.00013265 0.024521 0.068823 0.11458 0.16116 0.20831 0.30478 0.45367 0.60817 0.71488 0.76925 0.82464 0.88255 0.93758 0.98637 0.9985
xxxxxxxxxxxxxxxxxxxxxxxxxxx bl_default = 1 fl_c_min = 0.01 fl_b_bd = -30 fl_a_max = 50 z_r_borr_max = 0.065 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 15 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 7.534197 seconds. Elapsed time is 0.338167 seconds. mean sd coefofvar min max pYis0 pYls0 pYgr0 pYisMINY pYisMAXY p0_1 p1 p5 p10 p15 p20 p25 p35 p50 p65 p75 p80 p85 p90 p95 p99 p99_9 fl_cov_cl_mt_val fl_cor_cl_mt_val fl_cov_cl_mt_pol_a fl_cor_cl_mt_pol_a fl_cov_cl_mt_coh fl_cor_cl_mt_coh fl_cov_cl_mt_pol_c fl_cor_cl_mt_pol_c fracByP0_1 fracByP1 fracByP5 fracByP10 fracByP15 fracByP20 fracByP25 fracByP35 fracByP50 fracByP65 fracByP75 fracByP80 fracByP85 fracByP90 fracByP95 fracByP99 fracByP99_9 ________ _______ _________ _______ ______ ______ _______ _______ _________ __________ _______ _______ _______ _______ _______ _______ _______ ________ _______ ______ ______ ______ ______ ______ ______ ______ ______ ________________ ________________ __________________ __________________ ________________ ________________ __________________ __________________ __________ _________ ________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ ___________ cl_mt_val 3.9267 4.4984 1.1456 -16.225 20.435 0 0.13358 0.86642 2.315e-05 1.3316e-17 -14.777 -12.257 -6.3375 -1.7941 0.61646 1.8748 2.6905 3.7909 4.9313 5.9046 6.6372 7.0427 7.5339 8.1498 9.0543 10.714 12.442 20.235 1 24.464 0.92278 26.815 0.95742 0.45437 0.37288 -0.0041275 -0.034284 -0.12683 -0.17569 -0.18143 -0.16463 -0.13497 -0.050937 0.11995 0.32449 0.48523 0.5707 0.66428 0.76376 0.87228 0.97082 0.99671 cl_mt_pol_a -0.58517 5.8935 -10.071 -28.169 48.78 0.0261 0.39934 0.57456 0.0054298 8.6269e-17 -28.169 -25.558 -13.708 -6.2765 -3.1634 -1.8578 -1.1549 -0.35149 0.3652 1.3043 2.0347 2.6608 3.3912 4.3302 5.9997 9.4431 14.034 24.464 0.92278 34.733 1 34.246 0.9333 0.25803 0.16163 0.26138 0.4829 1.7657 2.5727 2.9603 3.1658 3.2945 3.4025 3.3803 3.1713 2.9037 2.6833 2.438 2.1086 1.6785 1.1938 1.0258 cl_mt_coh -0.59656 6.2261 -10.437 -29.917 50.083 0 0.38784 0.61216 0.0054298 8.6269e-17 -29.917 -27.136 -14.516 -6.6013 -3.2858 -1.8954 -1.1467 -0.29113 0.45753 1.4201 2.1688 2.8105 3.5591 4.5217 6.2329 9.7623 14.468 26.815 0.95742 34.246 0.9333 38.764 1 0.47199 0.27986 0.2723 0.50302 1.8376 2.6736 3.0714 3.2791 3.4061 3.5057 3.4607 3.2305 2.9486 2.7194 2.4663 2.1282 1.6889 1.1963 1.0261 cl_mt_pol_c 1.3419 0.27088 0.20187 0.01 4.5053 0 0 1 0.0054262 1.3316e-17 0.01 0.9706 1.008 1.0407 1.0659 1.0924 1.1189 1.2088 1.3301 1.4348 1.5321 1.5751 1.607 1.6853 1.789 2.0065 2.2925 0.45437 0.37288 0.25803 0.16163 0.47199 0.27986 0.073376 1 4.0438e-05 0.0033583 0.033289 0.071277 0.11095 0.15117 0.19308 0.27856 0.42295 0.5756 0.68499 0.7434 0.80225 0.86364 0.92822 0.98411 0.9982
Graph A1: Value Graphs Difference in V(A,Z) for Lower and Higher Borrowing Rate
Left to right, increasing z, top to bottom, increasing savings. no borrowing, savings only model, lower borrowing interest rate V(a,z) uniformly higher than higher borrowing interest rate V(a,z).
close all; cl_mt_pol_c = cl_result_map{1}('cl_mt_pol_c'); cl_mt_pol_c{1}; mt_val_1 = cl_result_map{1}('mt_val'); mt_val_2 = cl_result_map{2}('mt_val'); st_y_title = ['V(a,z;r borrow=' num2str(ar_fl_z_r_borr_max(1)) ') - V(a,z;r borrow=' num2str(ar_fl_z_r_borr_max(2)) ')']; figure(); subplot(1,3,1); contour = contourf(mt_val_1, 10); clabel(contour); xlabel('shock grid points'); ylabel('asset grid points'); zlabel('value'); title(['r borrow=' num2str(ar_fl_z_r_borr_max(1))]); subplot(1,3,2); contour = contourf(mt_val_2, 10); clabel(contour); xlabel('shock grid points'); ylabel('asset grid points'); zlabel('value'); title(['r borrow=' num2str(ar_fl_z_r_borr_max(2))]); subplot(1,3,3); mt_val_diff = mt_val_1 - mt_val_2; contour = contourf(mt_val_1 - mt_val_2); clabel(contour); xlabel('shock grid points'); ylabel(['asset grid, ' st_y_title]); zlabel('value diff'); title(['Save <= ' num2str(fl_a_max)]);
Graph A2: Distribution Graphs Difference in f(A,Z) for Lower and Higher Borrowing Rate
Left to right, increasing z, top to bottom, increasing savings. As interest rate decreases, more mass at lower a points. Households are more likely to borrow. Overall EV is a weighted sum of the previous and this graph.
mt_dist_1 = cl_result_map{1}('mt_dist'); mt_dist_2 = cl_result_map{2}('mt_dist'); st_y_title = ['F(a,z;r borrow=' num2str(ar_fl_z_r_borr_max(1)) ') - F(a,z;r borrow=' num2str(ar_fl_z_r_borr_max(2)) ')']; figure(); subplot(1,3,1); surf(mt_dist_1); xlabel('shock grid points'); ylabel('asset grid points'); zlabel('dist'); title(['r br=' num2str(ar_fl_z_r_borr_max(1))]); subplot(1,3,2); surf(mt_dist_2); xlabel('shock grid points'); ylabel('asset grid points'); zlabel('dist'); title(['r br=' num2str(ar_fl_z_r_borr_max(2))]); subplot(1,3,3); contour = contourf(mt_dist_1 - mt_dist_2); clabel(contour); xlabel('shock grid points'); ylabel(['asset grid, ' st_y_title]); zlabel('dist diff'); title(['Save <= ' num2str(fl_a_max)]);
end