STO1 Competitive storage model

This model is a standard competitive storage model with supply reaction. Its setting is close to Wright and Williams (1982).

Model's structure

Response variables Storage ($S$), Planned production ($H$) and Price ($P$).

State variable Availability ($A$).

Shock Productivity shocks ($\epsilon$).

Parameters Unit physical storage cost ($k$), Depreciation share ($\delta$), Interest rate ($r$), Scale parameter for the production cost function ($h$), Inverse of supply elasticity ($\mu$) and Demand price elasticity ($\alpha$).

Equilibrium equations

$$S_{t}: S_{t}\ge 0 \quad \perp \quad P_{t}+k-\frac{1-\delta}{1+r}\mathrm{E}_{t}\left(P_{t+1}\right)\ge 0,$$

$$H_{t}: \frac{1}{1+r}\mathrm{E}_{t}\left(P_{t+1}\epsilon_{t+1}\right)=h {H_{t}}^{\mu},$$

$$P_{t}: A_{t}={P_{t}}^{\alpha}+S_{t}.$$

Transition equation

$$A_{t}: A_{t}=\left(1-\delta\right)S_{t-1}+H_{t-1}\epsilon_{t}.$$

Writing the model

The model is defined in a Yaml file: sto1.yaml.

Create the model object

Mu                = 1;
sigma             = 0.05;
model = 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	

Define approximation space

[interp,s] = recsinterpinit(40,model.sss*0.7,model.sss*1.5);

Find a first guess through the perfect foresight solution

interp = recsFirstGuess(interp,model,s,model.sss,model.xss,struct('T',5));

Solve for rational expectations

interp = recsSolveREE(interp,model);
Successive approximation
  Major	 Minor	Residual
      0	     0	7.18E-02 (Input point)
      1	     1	4.27E-02
      2	     1	2.88E-02
      3	     1	1.22E-02
      4	     1	3.88E-03
      5	     1	1.08E-03
      6	     1	2.84E-04
      7	     1	7.40E-05
      8	     1	1.92E-05
      9	     1	4.97E-06
     10	     1	1.28E-06
     11	     1	3.32E-07
     12	     1	8.57E-08
     13	     1	1.85E-08
     14	     1	0.00E+00
Solution found - Residual lower than absolute tolerance

Plot the decision rules

recsDecisionRules(model,interp,[],[],[],struct('simulmethod','solve'));
subplot(2,2,1)
xlabel('Availability')
ylabel('Storage')
subplot(2,2,2)
xlabel('Availability')
ylabel('Planned production')
subplot(2,2,3)
xlabel('Availability')
ylabel('Price')

Simulate the model

[ssim,~,~,stat] = recsSimul(model,interp,model.sss(ones(1000,1),:),200);
subplot(2,2,1)
xlabel('Availability')
ylabel('Frequency')
subplot(2,2,2)
xlabel('Storage')
ylabel('Frequency')
subplot(2,2,3)
xlabel('Planned production')
ylabel('Frequency')
subplot(2,2,4)
xlabel('Price')
ylabel('Frequency')
Statistics from simulated variables (excluding the first 20 observations):
 Moments
    Mean      Std. Dev. Skewness  Kurtosis  Min       Max       %LB       %UB
    1.0162    0.0518    0.0200    2.9951    0.7931    1.2528

  Columns 1 through 7

    0.0155    0.0220    1.6549    5.5814         0    0.1787   23.9717
    1.0010    0.0081   -1.4145    4.3785    0.9553    1.0072         0
    1.0164    0.2026    1.8692    7.7382    0.6993    3.1864         0

  Column 8

         0
         0
         0

 Correlation
    1.0000    0.8664   -0.8778   -0.9043
    0.8664    1.0000   -0.9979   -0.5780
   -0.8778   -0.9979    1.0000    0.5958
   -0.9043   -0.5780    0.5958    1.0000

 Autocorrelation
    1         2         3         4         5
    0.2127    0.0413    0.0059   -0.0080   -0.0089

    0.2412    0.0510    0.0054   -0.0092   -0.0105
    0.2400    0.0505    0.0056   -0.0090   -0.0102
    0.1191    0.0165    0.0028   -0.0063   -0.0071

Assess solution accuracy

recsAccuracy(model,interp,ssim);
Accuracy of the solution
 Equilibrium equation error (in log10 units)
    Max       Mean
   -2.2986   -3.1470
   -2.7699   -3.7235
   -3.3881   -4.3434

References

Wright, B. D. and Williams, J. C. (1982). The economic role of commodity storage. The Economic Journal, 92(367), 596-614.