Test Shock Grid Cout (Savings Dynamic Programming Problem)

back to Fan's Dynamic Assets Repository Table of Content.

Testing the ff_az_vf_vecsv program for solving the savings only dynamic programming problem.

Loop over the number of shock points. 9, 15, and 27 shocks points share the same AR1 shock process parameters following the benchmark simulation. The benchmark parameters can be adjusted below or inside the default parameters function: ffs_az_set_default_param.

@seealso

Contents

Simulate Model with Different Shock Grid Count

close all

ar_it_z_n = [9, 15, 27];

for it_z_n = ar_it_z_n

    disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx');
    disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx');
    disp(['it_z_n = ' num2str(it_z_n)]);
    disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx');
    disp('xxxxxxxxxxxxxxxxxxxxxxxxxxx');
    disp('');
    disp('');
    disp('');
    disp('');

    it_param_set = 4;
    [param_map, support_map] = ffs_az_set_default_param(it_param_set);

    % Simulation Accuracy
    param_map('it_a_n') = 750;
    param_map('it_z_n') = it_z_n;

    % Display Parameters
    support_map('bl_display') = false;
    support_map('bl_display_final') = false;
    support_map('bl_time') = true;
    support_map('bl_profile') = false;

    % Call Program
    ff_az_vf_vecsv(param_map, support_map);

    % Snap
    snapnow;

end

% close all
close all;
clear all;
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
it_z_n = 9
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
Elapsed time is 0.964463 seconds.
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
it_z_n = 15
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
Elapsed time is 1.605720 seconds.
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
it_z_n = 27
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
Elapsed time is 8.336128 seconds.