|
|
|
|
| load('model')
|
| addpath('files')
|
|
|
| Parameters;
|
| MU = 0.1;
|
|
|
|
|
| params = eval(symparams);
|
|
|
|
|
| nodes = exp([G,G-B]);
|
| weights = [1-P,P];
|
|
|
| T = 2000/period_length;
|
|
|
|
|
| rng('default')
|
| disaster = double(rand(1,T+1)<P) + 1;
|
|
|
| GAMMA1 = 2.6;
|
| GAMMA2 = GAMMA1;
|
| params(logical(symparams==sym('GAMMA1'))) = GAMMA1;
|
| params(logical(symparams==sym('GAMMA2'))) = GAMMA2;
|
|
|
|
|
| tolX=1e-7; tolF=1e-7; maxiter=10; testF=1e-5;
|
|
|
| OPTIONS = optimoptions('lsqnonlin','TolX',tolX,'TolF',tolF,'MaxIter',100,'display','iter-detailed');
|
|
|
| solve_and_simulate;
|
|
|
|
|
|
|
| GAMMA1 = 2.6;
|
| GAMMA2 = 4.15;
|
|
|
| newparams = params;
|
| newparams(logical(symparams==sym('GAMMA1'))) = GAMMA1;
|
| newparams(logical(symparams==sym('GAMMA2'))) = GAMMA2;
|
|
|
| burn=1;
|
|
|
| correct_params;
|
| simulate_with_disasters;
|
| summarize_results;
|
|
|
| Table = [GAMMA1,GAMMA2,RHO,mean_roe,mean_rb,mean_equity,mean_W1_share,mean_debt_to_assets,mean_debt_to_GDP,mean(abs(R_results(:))),max(abs(R_results(:)))];
|
| Table_labor = [GAMMA1,GAMMA2,mean_equity_excluding_labor,mean_W1_share_excluding_labor,mean_debt_to_assets_excluding_labor,mean_debt_to_GDP];
|
| Table_vol = [vol_roe,vol_rb];
|
|
|
|
|
|
|
| GAMMA1=2.5;
|
| GAMMA2=4.29;
|
|
|
| burn=1;
|
| newparams=params;
|
| newparams(logical(symparams==sym('GAMMA1')))=GAMMA1;
|
| newparams(logical(symparams==sym('GAMMA2')))=GAMMA2;
|
|
|
| correct_params;
|
|
|
| simulate_with_disasters;
|
|
|
| summarize_results;
|
|
|
| Table = [Table;GAMMA1,GAMMA2,RHO,mean_roe,mean_rb,mean_equity,mean_W1_share,mean_debt_to_assets,mean_debt_to_GDP,mean(abs(R_results(:))),max(abs(R_results(:)))];
|
| Table_labor = [Table_labor;GAMMA1,GAMMA2,mean_equity_excluding_labor,mean_W1_share_excluding_labor,mean_debt_to_assets_excluding_labor,mean_debt_to_GDP];
|
| Table_vol = [Table_vol;vol_roe,vol_rb];
|
|
|
|
|
| GAMMA1=2.4;
|
| GAMMA2=4.54;
|
|
|
| newparams=params;
|
| newparams(logical(symparams==sym('GAMMA1')))=GAMMA1;
|
| newparams(logical(symparams==sym('GAMMA2')))=GAMMA2;
|
|
|
| params=newparams;
|
| xt=max(x_results);
|
| [coeffs,model]=tpsolve(coeffs,xt,model,params,c0,nodes,weights,tolX,tolF,maxiter,OPTIONS);
|
|
|
| simulate_with_disasters;
|
|
|
| summarize_results;
|
|
|
| Table = [Table;GAMMA1,GAMMA2,RHO,mean_roe,mean_rb,mean_equity,mean_W1_share,mean_debt_to_assets,mean_debt_to_GDP,mean(abs(R_results(:))),max(abs(R_results(:)))];
|
| Table_labor = [Table_labor;GAMMA1,GAMMA2,mean_equity_excluding_labor,mean_W1_share_excluding_labor,mean_debt_to_assets_excluding_labor,mean_debt_to_GDP];
|
| Table_vol = [Table_vol;vol_roe,vol_rb];
|
|
|
| save('Table_6_MU','Table*')
|
|
|
|
|