SSFSV
-----
The set of programs in given here are used in the estimations reported
in the article 
  State Space Models with a Common Stochastic Variance
by Siem Jan Koopman and Charles S. Bos.

Programs
--------
The programs used in this project are
  loadcuur.ox
    Load and display the data on inflation
  ssfsvest5.ox
    Estimate the inflation model, according to settings in simox.dec
  ssfsvwgt.ox
    Estimate the inflation model, according to settings in simox.dec, and
    show the weight plots over the full parameter sample

  stforecast.ox
    Estimates the model recursively for all months that are requested
    (if this was not done before) and makes a prediction into the
    future.
  stfore_fig3.ox
    Plot figures concerning one of the forecasts
  stfore_tab3.ox
    Computes the MFE, MAPE, RMSE and RMSEmod for a model
  stfore_cov.ox
    Computes the coverage tests, in excl/covuc.out and excl/covind.out

  svissim3.ox
    Runs a simulation according to the settings in simox.dec. The
    command line may give the 
      iRep  integer, number of repetitions
      iData integer, length of data set
      bGen  boolean, indicates if SV is generated in DGP
      bEst  boolean, indicates if SV is estimated
  svissim_res7.ox
    When a full set of results is simulated, svissim_res7.ox can give
    the output in tables and graphs. It takes as a command line argument
      bGen  boolean, indicates if SV is generated in DGP

Declaration files
-----------------    
These programs depend on the declaration file simox.dec. 
To switch from one model to another, change simox.dec or copy some of
the pre-specified models from the directories
  decl      declarations for simulation exercise
  declinfl  declarations for estimation of models on inflation dataset
to simox.dec.

Data
----
Data on the inflation is included in data/cuur0000sa0l1e.mat. 
The file contains the CPI: U.S. city average; All items less food and
energy; 1982-84=100; not seasonally adjusted, as downloaded from
Economagic on 29/10/2001. See www.economagic.com.

Output
------
Output is saved into directory excl/*. Graphics can be created in eps
format using the standard oxdraw library, or using GnuDraw, by changing
the corresponding line in 
  include/choosedraw.h
Note that for GnuDraw, the package itself and GnuPlot need to be
installed, see http://www.tinbergen.nl/~cbos/gnudraw.html

Jobs
----
The directory jobs/ contains files which contain the necessary commands
to simulate (runarma, runll, runlls) or to estimate the different
inflation models (runinfl), or to compute the forecasts (runforecast).

Note that the computations may be quite time consuming, especially the
simulations.

Update
------
On 22/6/2009, these files have been updated to work with Ox 5.10. On
3/4/2015, an update for Ox 7 has been made. On 8/8/2016, the code is
clarified to show that a lower limit for the variances of 1e-5 is
hard-coded, compiled into the ssfsv.oxo file, through MX_VARNEAR0.

Charles Bos, 16/9/2003, 22/6/2009, 3/4/2015, 8/8/2016
