Modelling regime switching index price movements with markov chains.
-
Forecast horizons: for quarterly GDP growth try a nowcast (h=0, all indicators of that quarter are known) and forecast horizons h=1 to 4 quarters. For the year-on-year inflation rate, try forecast horizons h=1 to h=12 months.
-
Use a recursive out-of-sample forecast experiment. For each horizon h, use such an experiment to generate forecasts of the first quarter/month of 2000 to the last quarter/month of 2021. This will make your forecasts comparable to each other. In addition, think about sensibly defined subsamples.
-
Use at least the following three loss functions:
- mean forecast error
- mean absolute forecast error
- root mean squared forecast error.
[We want to evaluate density forecasts, so we will use loss functions such as CRPS aswell.]
-
Use oxford realized values to evaluate volatility forecasts.
-
Use code from ATSA to get the best static fat-tailed distribution to describe vola.
-
Use PCA and extract dynamic factor, then research if the dynamic factor can be forecasted usefully, then try to use that factor in a markov switching model (parameter).
-
Can we use something like gibbs sampling or the like (MCMC) together with such a dynamic factor (exogeneous var)?
Use MS over MS-DFM ?
(+) Can be used to construct direct density forecasts. However in the MS-DFM the estimated factor and transition probabilities can be used in a subsequent model, like an ADL to construct forecasts.
(+) Simpler. MS doesn't require a Kalman-Filter or the like to estimate probabilities.
(+) Avoids multivariate distr. modelling/normality assumption
(-) Can't use external information, i.e. dynamic factor (except if we use two-dimensional target vector) to estimate the regime.
(?) Can we use a custom loss function, where only the density of one indicator (S&P) is considered?
- Download the data specified in Data Sources to some folder.
- Copy the sample config file to
config.py
and set value appropriately.
- S&P data set by Robert Shiller: Website, Download. The stock price data are monthly averages of daily closing prices.
All FRED data sources were downloaded in .csv
format.
-
Industrial Production Total Index: Website, downloaded as
.csv
. -
Producer Price Index by Commodity: All Commodities (PPIACO)
-
Moody's Seasoned Baa Corporate Bond Yield (BAA) Website
-
Moody's Seasoned Aaa Corporate Bond Yield (AAA) Website
activate markov-switching conda install
conda list -e > requirements.txt