STO3 Anticipated switch to a public storage policy

We consider here the transitional dynamics that occurs when a public storage policy defending a floor price is announced a few periods before its beginning. This is a finite-horizon problem in which the terminal condition is not a unique situation, but a state-contingent policy function. This is a transition from problem STO1 to STO2.

Create the model objects

Mu                = 1;
sigma             = 0.05;

Competitive storage model:

model1 = recsmodel('sto1.yaml',struct('Mu',Mu,'Sigma',sigma^2,'order',7));
Deterministic steady state (equal to first guess)
 State variables:
		1	

 Response variables:
		0	1	1	

 Expectations variables:
		1	1	

Floor price model:

model2 = recsmodel('sto2.yaml',struct('Mu',Mu,'Sigma',sigma^2,'order',7));
Deterministic steady state (different from first guess, max(|delta|)=0.392101)
 State variables:
		1.392	

 Response variables:
		6.086e-15	1.004	1.02	0.3961	

 Expectations variables:
		1.02	1.02	

Define approximation space

[interp,s] = recsinterpinit(50,min(model1.e)*0.95,2);

Terminal condition: solve for the infinite-horizon behavior under policy

See STO2 for details.

Find a first guess through the perfect foresight solution

interp2 = recsFirstGuess(interp,model2,s,[],[],struct('T',5));

Solve for rational expectations

[~,x2] = recsSolveREE(interp2,model2,s);
Successive approximation
  Major	 Minor	Residual
      0	     0	3.69E-02 (Input point)
      1	     1	1.57E-02
      2	     1	9.43E-03
      3	     1	1.89E-03
      4	     1	1.06E-03
      5	     1	2.30E-04
      6	     1	3.57E-05
      7	     1	5.32E-06
      8	     1	7.99E-07
      9	     1	1.21E-07
     10	     1	1.85E-08
     11	     1	0.00E+00
Solution found - Residual lower than absolute tolerance

Transition: model without policy in finite horizon

The policy is announced 6 periods before it begins (so $T=7$). In the seventh period, the equilibrium is the one defined by the problem with public storage:

T          = 7;
xT         = x2(:,1:3);
options.eqsolver = 'ncpsolve'; % lmmcp does not work in this case
[~,X]  = recsSolveREEFiniteHorizon(interp,model1,s,x2(:,1:3),xT,T,options);

Initial period: model without policy under infinite horizon

In period 0, the policy is not expected by the agents and the prevailing equilibrium is the one corresponding to the infinite-horizon competitive storage problem (STO1):

[~,x1] = recsSolveREE(interp,model1,s,X(:,1:3,1));
Successive approximation
  Major	 Minor	Residual
      0	     0	3.64E-02 (Input point)
      1	     1	6.25E-03
      2	     1	1.36E-03
      3	     1	3.20E-04
      4	     1	7.72E-05
      5	     1	1.87E-05
      6	     1	4.56E-06
      7	     1	1.11E-06
      8	     1	2.70E-07
      9	     1	6.58E-08
     10	     1	1.60E-08
     11	     1	0.00E+00
Solution found - Residual lower than absolute tolerance

Plot price function

figure
plot(s,[x1(:,3) squeeze(X(:,3,:))])
xlim([0.8 2])
ylim([0.4 3])
legend([repmat('Period ',T+1,1),num2str((0:T)')])
legend('Location','NorthEast')
legend('boxoff')
xlabel('Availability')
ylabel('Price')
title('Price function in each period')