Test Preference No 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
Set Shared Parameters
close all; clear all; ar_fl_beta = [0.94, 0.96, 0.98]; ar_fl_crra = [1, 1.5, 2.0]; % Accuracy % ar_it_a_n_hg = [750, 1250, 1750, 2250]; % ar_it_z_n_hg = [15, 19, 23, 27]; ar_it_a_n_hg = [750]; % Borrowing/Savings Parameters it_a_n = 750; bl_default = false; fl_c_min = 0.01; % irrelevant when bl_default = false fl_b_bd = -20;
Simulate Model with Discount = 0.94
for fl_crra = ar_fl_crra disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp(['fl_beta = ' num2str(ar_fl_beta(1))]); disp(['fl_crra = ' num2str(fl_crra)]); disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); 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); % Preference param_map('fl_beta') = ar_fl_beta(1); param_map('fl_crra') = fl_crra; % Borrowing Parameters param_map('bl_default') = bl_default; param_map('fl_c_min') = fl_c_min; param_map('fl_b_bd') = fl_b_bd; % Display Parameters support_map('bl_display') = false; support_map('bl_display_final') = false; support_map('bl_time') = true; support_map('bl_profile') = 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); it_z_n = param_map('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); end % Snap snapnow; end % close all close all;
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.94 fl_crra = 1 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 16.127563 seconds. Elapsed time is 1.775653 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.023 2.1201 0.70132 -11.446 20.517 0 0.079711 0.92029 1.1648e-05 -1.7447e-35 -6.0557 -2.9884 -0.69358 0.34648 0.96172 1.4551 1.794 2.394 3.1961 3.9571 4.3106 4.7759 5.0621 5.5279 6.2361 7.6082 8.9244 4.4949 1 2.0529 0.87978 1.9853 0.80547 0.76212 0.95188 -0.0023963 -0.014202 -0.034668 -0.036381 -0.025253 -0.003636 0.023131 0.093416 0.23258 0.40645 0.54316 0.61765 0.70372 0.78646 0.88528 0.97307 0.99697 cl_mt_pol_a -0.059675 1.1006 -18.444 -4.4853 47.426 0.063691 0.48126 0.45505 2.7955e-08 -1.7447e-35 -4.1311 -3.1306 -1.9291 -1.3284 -0.95853 -0.67164 -0.46814 -0.20342 0 0.14963 0.36355 0.50617 0.72008 1.0766 1.7897 3.2871 5.355 2.0529 0.87978 1.2114 1 1.26 0.98469 0.36109 0.86874 0.075139 0.63393 2.297 3.6417 4.5237 5.2282 5.7106 6.272 6.5382 6.3512 5.9363 5.6535 5.1751 4.4165 3.1446 1.7042 1.0998 cl_mt_coh 0.025911 1.1625 44.867 -4.6385 50.122 0 0.43088 0.56912 4.117e-07 9.2938e-35 -4.352 -3.3064 -1.9908 -1.333 -0.93925 -0.62449 -0.40522 -0.15767 0.0992 0.25258 0.47184 0.64042 0.85969 1.2251 1.9112 3.4909 5.6105 1.9853 0.80547 1.26 0.98469 1.3515 1 0.35102 0.79954 -0.18308 -1.5281 -5.5199 -8.672 -10.678 -12.219 -13.201 -14.194 -14.208 -13.256 -12.02 -10.81 -9.4909 -7.4887 -4.5892 -0.70465 0.76039 cl_mt_pol_c 1.2544 0.37764 0.30105 0.038494 5.8528 0 0 1 1.1648e-05 -1.7447e-35 0.40694 0.60346 0.75078 0.82845 0.88157 0.92104 0.9437 1.0476 1.2061 1.3948 1.5141 1.6038 1.664 1.7629 1.934 2.2263 2.5121 0.76212 0.95188 0.36109 0.86874 0.35102 0.79954 0.14261 1 0.00025687 0.0041497 0.02619 0.058122 0.091998 0.1282 0.16724 0.25146 0.39145 0.53596 0.64709 0.70848 0.77521 0.84221 0.91774 0.98138 0.99799
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.94 fl_crra = 1.5 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 20.378633 seconds. Elapsed time is 2.455936 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 2.7323 2.1962 0.80381 -21.203 14.902 0 0.098058 0.90194 9.3742e-06 -1.9031e-35 -8.3844 -4.0433 -1.178 0.014172 0.67268 1.2285 1.5504 2.1976 2.9227 3.637 4.1865 4.4581 4.7807 5.2252 5.86 7.0138 8.1175 4.8235 1 2.9226 0.86217 2.8639 0.80778 0.73331 0.94682 -0.0037731 -0.021666 -0.054147 -0.063437 -0.056398 -0.037703 -0.013229 0.062543 0.20255 0.38209 0.52568 0.60299 0.6875 0.77908 0.88023 0.97254 0.99696 cl_mt_pol_a 0.27459 1.5435 5.6209 -4.414 48.353 0.046613 0.41545 0.53793 1.7446e-07 -1.9031e-35 -4.1311 -3.3308 -2.0626 -1.3951 -0.95853 -0.67164 -0.52741 -0.19367 0.078328 0.50617 0.8627 1.2192 1.5758 2.1462 3.0732 5.2837 8.0646 2.9226 0.86217 2.3823 1 2.463 0.98848 0.48913 0.89864 -0.015957 -0.14288 -0.52173 -0.82318 -1.0313 -1.1831 -1.2926 -1.4142 -1.4199 -1.2411 -1.039 -0.80063 -0.58245 -0.24239 0.19988 0.76813 0.96772 cl_mt_coh 0.36831 1.6143 4.3831 -4.6385 50.122 0 0.38586 0.61414 2.372e-07 -1.534e-34 -4.352 -3.5256 -2.137 -1.4061 -0.93925 -0.62449 -0.45591 -0.090469 0.20189 0.59562 1.0059 1.3265 1.7368 2.2991 3.2716 5.5374 8.3878 2.8639 0.80778 2.463 0.98848 2.606 1 0.47964 0.84253 -0.013053 -0.11147 -0.40697 -0.6362 -0.79026 -0.89779 -0.97091 -1.0381 -0.99396 -0.85041 -0.63315 -0.47493 -0.25325 0.0014065 0.37369 0.81988 0.97504 cl_mt_pol_c 1.2626 0.35265 0.27931 0.038494 4.9258 0 0 1 9.3742e-06 -1.9031e-35 0.3877 0.60346 0.75882 0.8359 0.88933 0.92817 0.97632 1.0766 1.2194 1.4056 1.507 1.5874 1.665 1.7165 1.8832 2.1194 2.3671 0.73331 0.94682 0.48913 0.89864 0.47964 0.84253 0.12436 1 0.00023771 0.0039908 0.0262 0.058349 0.092166 0.12812 0.16564 0.24876 0.38502 0.54835 0.65681 0.71871 0.7818 0.85004 0.92018 0.98228 0.99805
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.94 fl_crra = 2 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 19.491582 seconds. Elapsed time is 2.939172 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 2.5269 2.2614 0.89493 -49.046 11.406 0 0.1113 0.8887 3.6087e-06 6.7218e-35 -10.788 -4.8954 -1.5013 -0.1978 0.54188 1.0515 1.4872 2.0948 2.8363 3.5121 3.9999 4.2583 4.5709 4.9409 5.4858 6.4353 7.3196 5.114 1 3.6402 0.82828 3.5985 0.78733 0.70666 0.93148 -0.0058344 -0.029846 -0.073238 -0.088275 -0.084367 -0.067967 -0.042734 0.03213 0.17992 0.36623 0.51785 0.59829 0.68392 0.77791 0.88008 0.97304 0.99702 cl_mt_pol_a 0.68083 1.9434 2.8544 -4.414 48.78 0.018056 0.36149 0.62045 2.2253e-08 6.0704e-35 -4.0614 -3.2641 -2.0283 -1.35 -0.9279 -0.66091 -0.40692 -0.060175 0.36355 0.934 1.5045 1.9323 2.4314 3.1445 4.3567 6.995 10.418 3.6402 0.82828 3.7768 1 3.8918 0.99085 0.59345 0.91026 -0.0061296 -0.05573 -0.20463 -0.32451 -0.41729 -0.47374 -0.50627 -0.54064 -0.50127 -0.37107 -0.19264 -0.062745 0.097961 0.29969 0.56632 0.87512 0.98319 cl_mt_coh 0.78627 2.0211 2.5705 -4.6385 50.122 0 0.33822 0.66178 4.4502e-08 7.0905e-35 -4.2565 -3.4526 -2.0863 -1.3495 -0.89445 -0.60209 -0.35454 0.055709 0.44944 1.079 1.6637 2.1022 2.6138 3.3447 4.5872 7.2915 10.8 3.5985 0.78733 3.8918 0.99085 4.0848 1 0.58579 0.86398 -0.0073182 -0.050409 -0.18541 -0.2911 -0.37047 -0.41643 -0.44108 -0.45763 -0.41345 -0.26559 -0.093446 0.029034 0.17868 0.36465 0.60819 0.88776 0.98494 cl_mt_pol_c 1.2743 0.33547 0.26326 0.038494 4.498 0 0 1 3.6087e-06 6.7218e-35 0.38789 0.6028 0.76767 0.85493 0.90748 0.94893 1.0231 1.1153 1.2864 1.4127 1.5143 1.5681 1.6265 1.7229 1.8395 2.0736 2.3262 0.70666 0.93148 0.59345 0.91026 0.58579 0.86398 0.11254 1 0.00023704 0.0040266 0.026423 0.058204 0.092657 0.12907 0.16858 0.25194 0.39172 0.55116 0.66552 0.7248 0.78784 0.85331 0.92264 0.98289 0.99813
Simulate Model with Discount = 0.96
close all for fl_crra = ar_fl_crra disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp(['fl_beta = ' num2str(ar_fl_beta(2))]); disp(['fl_crra = ' num2str(fl_crra)]); disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); 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); % Preference param_map('fl_beta') = ar_fl_beta(2); param_map('fl_crra') = fl_crra; % Borrowing Parameters param_map('bl_default') = bl_default; param_map('fl_c_min') = fl_c_min; param_map('fl_b_bd') = fl_b_bd; % Display Parameters support_map('bl_display') = false; support_map('bl_display_final') = false; support_map('bl_time') = true; support_map('bl_profile') = 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); it_z_n = param_map('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); end % Snap snapnow; end % close all close all;
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.96 fl_crra = 1 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 21.624278 seconds. Elapsed time is 3.004299 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 5.8629 2.2563 0.38484 -11.559 26.853 0 0.0024673 0.99753 5.9597e-09 1.4169e-31 -0.58859 0.98812 2.3944 3.1549 3.6273 4.0506 4.2451 4.9754 5.7689 6.5687 7.2578 7.6794 8.1896 8.8289 9.8287 11.731 13.751 5.0909 1 3.3976 0.85623 3.2509 0.79783 0.72963 0.98768 -0.000226 0.00048837 0.013926 0.038957 0.065578 0.099325 0.13773 0.21884 0.34908 0.50629 0.62543 0.68884 0.7565 0.82833 0.90716 0.97854 0.99755 cl_mt_pol_a 1.2418 1.7587 1.4162 -4.414 48.78 0.058107 0.15898 0.78291 6.4261e-11 4.5901e-31 -1.6213 -0.82063 -0.32717 -0.12898 -0.060175 0 0.007022 0.22094 0.64878 1.2905 1.861 2.2888 2.788 3.5723 4.8558 7.7081 11.273 3.3976 0.85623 3.093 1 3.1434 0.98972 0.48318 0.83913 -0.0016626 -0.0095715 -0.027827 -0.035908 -0.03955 -0.03955 -0.039279 -0.027977 0.029817 0.1461 0.26336 0.34957 0.44299 0.57642 0.73873 0.92784 0.98992 cl_mt_coh 1.381 1.8059 1.3077 -4.6385 50.122 0 0.12718 0.87282 1.4622e-10 2.9688e-31 -1.6477 -0.79307 -0.23665 -0.03978 0.055709 0.1216 0.1288 0.34806 0.7642 1.422 2.0291 2.4676 2.9793 3.7608 5.0988 7.9552 11.677 3.2509 0.79783 3.1434 0.98972 3.2613 1 0.46766 0.79094 -0.0015398 -0.0085449 -0.022587 -0.026646 -0.025796 -0.019938 -0.017044 0.0010601 0.058943 0.1753 0.30134 0.38488 0.47462 0.59483 0.75525 0.93053 0.99063 cl_mt_pol_c 1.308 0.32741 0.2503 0.038494 4.498 0 0 1 5.9597e-09 1.4169e-31 0.56825 0.64657 0.77739 0.8695 0.90866 0.98747 1.0625 1.2063 1.3235 1.4287 1.5285 1.5931 1.639 1.7353 1.8502 2.0825 2.2922 0.72963 0.98768 0.48318 0.83913 0.46766 0.79094 0.1072 1 0.00042278 0.0046986 0.027334 0.060534 0.091595 0.13087 0.17372 0.26335 0.40456 0.55816 0.67334 0.73075 0.79275 0.85729 0.92474 0.98338 0.99817
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.96 fl_crra = 1.5 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 27.345981 seconds. Elapsed time is 2.737524 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 5.6174 2.3388 0.41635 -21.917 20.423 0 0.011389 0.98861 2.3294e-07 1.5984e-16 -3.2135 -0.15395 1.874 2.7307 3.3506 3.7296 4.1098 4.7126 5.5734 6.4547 7.1343 7.5457 8.012 8.5968 9.4906 11.112 12.815 5.4701 1 5.1406 0.87188 5.0318 0.83069 0.70435 0.98867 -0.00085489 -0.0026112 0.0055901 0.026368 0.053341 0.088363 0.121 0.19881 0.33757 0.49787 0.61952 0.68407 0.75284 0.82691 0.90675 0.97887 0.99762 cl_mt_pol_a 2.0335 2.5209 1.2397 -4.414 48.78 0.02109 0.14223 0.83668 2.5432e-09 7.5416e-16 -2.7968 -1.4654 -0.52741 -0.19367 0 0.078328 0.22094 0.57747 1.2905 2.2175 3.0732 3.7149 4.428 5.4263 7.0663 10.703 15.267 5.1406 0.87188 6.355 1 6.4853 0.9933 0.67311 0.87657 -0.0016011 -0.010036 -0.028393 -0.036196 -0.037791 -0.036834 -0.032527 -0.011621 0.058296 0.18531 0.31703 0.4045 0.50667 0.62186 0.77216 0.93805 0.99176 cl_mt_coh 2.1907 2.5899 1.1822 -4.6385 50.122 0 0.12219 0.87781 5.1037e-09 4.8769e-16 -2.9126 -1.4792 -0.45591 -0.090469 0.0992 0.20189 0.34806 0.71351 1.4444 2.3946 3.2716 3.9294 4.6379 5.6836 7.3646 11.092 15.77 5.0318 0.83069 6.4853 0.9933 6.7078 1 0.66273 0.84006 -0.0015623 -0.010123 -0.02594 -0.031127 -0.030528 -0.026815 -0.020231 0.0046497 0.07881 0.20714 0.33756 0.42343 0.5176 0.63521 0.78071 0.94056 0.99211 cl_mt_pol_c 1.3261 0.30461 0.2297 0.038494 4.498 0 0 1 2.3294e-07 1.5984e-16 0.56142 0.68824 0.80609 0.88136 0.98175 1.0607 1.1293 1.2205 1.3378 1.4501 1.5428 1.5766 1.6466 1.704 1.8245 2.0141 2.2745 0.70435 0.98867 0.67311 0.87657 0.66273 0.84006 0.092785 1 0.00038581 0.0048042 0.027931 0.060511 0.097092 0.13785 0.17474 0.2682 0.40821 0.56694 0.67913 0.73808 0.79751 0.86048 0.92685 0.984 0.99825
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.96 fl_crra = 2 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 29.054555 seconds. Elapsed time is 3.091486 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 5.4153 2.3035 0.42536 -50.633 16.099 0 0.016628 0.98337 1.5772e-07 1.0211e-12 -4.8233 -0.79032 1.5551 2.5689 3.164 3.6132 4.0278 4.6537 5.486 6.3349 6.9538 7.313 7.7339 8.2694 9.0093 10.343 11.675 5.3061 1 6.3443 0.86768 6.2815 0.83658 0.66358 0.98598 -0.0013097 -0.0046374 0.00073862 0.021029 0.048049 0.078903 0.11712 0.19551 0.33511 0.49993 0.62073 0.68673 0.75657 0.83007 0.90935 0.97989 0.99777 cl_mt_pol_a 2.8683 3.1742 1.1067 -4.414 48.78 0.015339 0.11733 0.86733 9.7256e-10 7.8644e-12 -2.9303 -1.5954 -0.52741 -0.12898 0.078328 0.29225 0.57747 1.0766 2.0749 3.2871 4.3567 5.0698 5.9967 7.1376 9.2055 13.413 18.832 6.3443 0.86768 10.076 1 10.296 0.99507 0.8297 0.89463 -0.0012445 -0.0076367 -0.020824 -0.025718 -0.025757 -0.022191 -0.012616 0.015791 0.099596 0.23581 0.37048 0.44774 0.5454 0.65697 0.79753 0.94514 0.99289 cl_mt_coh 3.0465 3.2597 1.07 -4.6385 50.122 0 0.10667 0.89333 1.945e-09 5.0856e-12 -3.0871 -1.6253 -0.45591 -0.01738 0.20189 0.42115 0.64631 1.2251 2.226 3.4685 4.5648 5.3181 6.2459 7.4377 9.5349 13.87 19.402 6.2815 0.83658 10.296 0.99507 10.625 1 0.82411 0.86532 -0.0012196 -0.0074375 -0.019361 -0.02271 -0.020618 -0.015507 -0.0072408 0.02675 0.10831 0.24449 0.37698 0.45984 0.55161 0.66537 0.80015 0.94669 0.99295 cl_mt_pol_c 1.3471 0.29217 0.21689 0.038494 4.498 0 0 1 1.5772e-07 1.0211e-12 0.55356 0.70411 0.84161 0.95638 1.0404 1.1206 1.1481 1.2372 1.3549 1.4662 1.5396 1.5981 1.6355 1.7247 1.8092 2.0053 2.2665 0.66358 0.98598 0.8297 0.89463 0.82411 0.86532 0.085364 1 0.00036538 0.0047689 0.028039 0.061064 0.098587 0.13757 0.18029 0.26902 0.4144 0.57249 0.68207 0.74098 0.80037 0.86276 0.92818 0.98421 0.99826
Simulate Model with Discount = 0.98
close all for fl_crra = ar_fl_crra disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); disp(['fl_beta = ' num2str(ar_fl_beta(3))]); disp(['fl_crra = ' num2str(fl_crra)]); disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx'); 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); % Preference param_map('fl_beta') = ar_fl_beta(3); param_map('fl_crra') = fl_crra; % Borrowing Parameters param_map('bl_default') = bl_default; param_map('fl_c_min') = fl_c_min; param_map('fl_b_bd') = fl_b_bd; % Display Parameters support_map('bl_display') = false; support_map('bl_display_final') = false; support_map('bl_time') = true; support_map('bl_profile') = 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); it_z_n = param_map('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); end % Snap snapnow; end % close all close all; clear all;
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.98 fl_crra = 1 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 45.195227 seconds. Elapsed time is 4.741955 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 44.317 1.4256 0.032167 -6.6785 47.672 0 3.3685e-25 1 1.1004e-28 0.0028378 38.587 40.393 41.759 42.434 42.861 43.193 43.459 43.909 44.458 44.981 45.332 45.559 45.614 46.081 46.508 47.153 47.672 2.0322 1 2.6026 0.89604 2.5256 0.84828 0.42441 0.84698 0.00085517 0.0089792 0.046419 0.094283 0.14264 0.19092 0.24098 0.34007 0.48963 0.64009 0.74108 0.79246 0.84489 0.89644 0.94795 0.99604 1 cl_mt_pol_a 46.782 2.0375 0.043553 -4.414 48.78 1.5175e-16 2.3815e-16 1 7.9217e-31 0.1299 37.015 40.295 42.648 43.932 44.645 45.286 45.786 46.499 47.354 48.067 48.424 48.567 48.709 48.78 48.78 48.78 48.78 2.6026 0.89604 4.1514 1 4.2281 0.9936 0.46813 0.65364 0.00079489 0.0085177 0.045003 0.092613 0.13801 0.18965 0.24073 0.34184 0.48791 0.64762 0.7489 0.79278 0.86455 1 1 1 1 cl_mt_coh 48.063 2.0885 0.043453 -4.6385 50.122 0 1.3625e-16 1 1.9085e-30 0.084004 38.04 41.424 43.836 45.129 45.882 46.54 47.029 47.76 48.66 49.391 49.756 49.902 50.049 50.099 50.122 50.122 50.122 2.5256 0.84828 4.2281 0.9936 4.3618 1 0.45556 0.62055 0.00076979 0.0085224 0.04502 0.090391 0.13805 0.18969 0.23558 0.33447 0.48797 0.64768 0.74896 0.79284 0.86477 0.9124 1 1 1 cl_mt_pol_c 2.4496 0.3515 0.1435 0.038494 4.498 0 0 1 1.1004e-28 0.0028378 1.8791 1.9723 2.0904 2.1436 2.1671 2.1884 2.2201 2.2937 2.3775 2.4573 2.534 2.6178 2.6926 2.9457 3.0499 3.9037 4.498 0.42441 0.84698 0.46813 0.65364 0.45556 0.62055 0.12356 1 0.00075289 0.0079115 0.041157 0.084455 0.12893 0.17389 0.21796 0.31119 0.45503 0.60077 0.70474 0.75647 0.82491 0.87502 0.92781 0.99397 1
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.98 fl_crra = 1.5 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 49.923797 seconds. Elapsed time is 4.994447 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 35.394 1.1441 0.032323 -18.458 37.678 0 2.4212e-14 1 2.2826e-18 0.0024024 29.736 31.92 33.308 33.908 34.267 34.541 34.764 35.131 35.566 35.941 36.2 36.365 36.503 36.723 36.876 37.396 37.678 1.3089 1 3.0448 0.93438 3.0085 0.90072 0.30851 0.80958 0.00081207 0.0088202 0.045928 0.093991 0.14201 0.19046 0.2392 0.33849 0.48885 0.64076 0.74261 0.79518 0.86793 0.89689 0.94758 0.9964 1 cl_mt_pol_a 45.846 2.8483 0.062128 -4.414 48.78 4.2508e-11 2.1417e-10 1 1.6571e-20 0.10327 31.097 36.587 40.366 42.006 42.933 43.718 44.36 45.429 46.57 47.568 48.139 48.353 48.638 48.78 48.78 48.78 48.78 3.0448 0.93438 8.1129 1 8.28 0.99569 0.6437 0.67847 0.00062784 0.0076416 0.041767 0.088743 0.13314 0.18445 0.23107 0.33672 0.47703 0.64508 0.74445 0.78891 0.86776 1 1 1 1 cl_mt_coh 47.103 2.9196 0.061983 -4.6385 50.122 0 1.6341e-10 1 4.0271e-20 0.066778 31.996 37.601 41.497 43.156 44.128 44.887 45.59 46.619 47.856 48.834 49.441 49.683 49.908 50.077 50.122 50.122 50.122 3.0085 0.90072 8.28 0.99569 8.5238 1 0.63466 0.65261 0.00062876 0.0074915 0.04179 0.087018 0.13319 0.18018 0.23113 0.32618 0.4771 0.63084 0.73514 0.78897 0.84067 0.90053 1 1 1 cl_mt_pol_c 2.4261 0.33309 0.13729 0.038494 4.498 0 0 1 2.2826e-18 0.0024024 1.8195 1.9574 2.0565 2.1114 2.1671 2.2177 2.2397 2.2701 2.3703 2.427 2.5197 2.5828 2.6719 2.7942 3.0188 3.9037 4.498 0.30851 0.80958 0.6437 0.67847 0.63466 0.65261 0.11095 1 0.00072688 0.0078315 0.041246 0.084342 0.12824 0.17344 0.21973 0.3124 0.45575 0.60362 0.70694 0.75817 0.81216 0.86977 0.93736 0.99469 1
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx fl_beta = 0.98 fl_crra = 2 xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx it_a_n = 750, it_z_n = 55 xxxxxxxxxxxxxxxxxxxxxxxxxxx Elapsed time is 56.272448 seconds. Elapsed time is 4.171493 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 28.915 0.88271 0.030527 -48.661 30.456 0 9.3877e-12 1 3.7455e-16 0.0021564 24.322 26.097 27.247 27.754 28.063 28.294 28.477 28.76 29.085 29.364 29.548 29.618 29.751 29.86 29.957 30.301 30.456 0.77917 1 2.9306 0.95211 2.9219 0.92613 0.22542 0.7879 0.00081383 0.0087727 0.046122 0.093847 0.14192 0.19062 0.24012 0.33863 0.4898 0.64135 0.74274 0.79395 0.84511 0.89638 0.94976 0.99668 1 cl_mt_pol_a 45.101 3.487 0.077317 -4.414 48.78 7.5851e-10 5.2377e-09 1 2.2314e-18 0.089075 28.173 33.949 38.227 40.152 41.507 42.506 43.361 44.573 46 47.14 47.854 48.21 48.495 48.638 48.78 48.78 48.78 2.9306 0.95211 12.159 1 12.422 0.99667 0.79078 0.69968 0.00057593 0.0070095 0.039953 0.083358 0.13007 0.1762 0.22563 0.32408 0.47511 0.62608 0.73282 0.79467 0.85692 0.89327 1 1 1 cl_mt_coh 46.339 3.5743 0.077132 -4.6385 50.122 0 4.301e-09 1 4.2388e-18 0.057602 28.999 34.919 39.304 41.278 42.667 43.69 44.544 45.809 47.271 48.441 49.171 49.514 49.807 49.975 50.122 50.122 50.122 2.9219 0.92613 12.422 0.99667 12.775 1 0.7857 0.67822 0.00057701 0.0070171 0.03998 0.083402 0.13012 0.17627 0.22276 0.32416 0.4752 0.62616 0.73289 0.78628 0.84267 0.89331 1 1 1 cl_mt_pol_c 2.4075 0.32412 0.13463 0.038494 4.498 0 0 1 3.7455e-16 0.0021564 1.7571 1.9068 2.0383 2.1225 2.1668 2.1938 2.2159 2.2559 2.3621 2.4138 2.509 2.5647 2.6248 2.714 3.0188 3.8306 4.498 0.22542 0.7879 0.79078 0.69968 0.7857 0.67822 0.10505 1 0.0007069 0.0076753 0.040649 0.083978 0.12861 0.174 0.21978 0.31237 0.45688 0.60633 0.70882 0.7663 0.81374 0.86998 0.94394 0.98354 1