The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

postshock

postshock provides donor-adjusted methods for forecasting conditional means and variances after structural shocks. Historical donor episodes are weighted using information observed before each shock, and their estimated post-shock effects are combined with forecasts from a target-series model.

The package builds on the methodology of Lin and Eck (2021) and extends it with practical tools for donor weighting, conditional mean forecasting, volatility forecasting, structured donor pools, and automatic GARCH-X model selection.


Main Features

Donor balancing weights (dbw())

Estimate donor weights from pre-shock covariates so that weighted donor characteristics resemble those of the target series.

Features include:


Conditional mean forecasting (SynthPrediction())

Generate donor-adjusted forecasts by


Structured donor pools

Support multiple donor pools representing different economic or substantive mechanisms, allowing donor effects to be estimated and combined within predefined groups.


Automatic GARCH-X model selection (auto_garchx())

Automatically search across GARCH-X and GJR-GARCH specifications using information criteria.

Supported features include


Conditional variance forecasting (SynthVolForecast())

Forecast post-shock conditional variances by combining


Covariate construction (build_control_xreg())

Construct control variables and external regressors for use in forecasting workflows.


Installation

Once the package is available on CRAN, install it with

install.packages("postshock")

Getting Started

Load the package

library(postshock)

The package vignette provides a complete workflow covering

Open the vignette with

vignette("postshock-workflow", package = "postshock")

Main Functions

Function Description
dbw() Estimate donor balancing weights
SynthPrediction() Donor-adjusted conditional mean forecasting
SynthPredictionMultiPool() Forecasting with structured donor pools
auto_garchx() Automatic GARCH-X model selection
SynthVolForecast() Donor-adjusted conditional variance forecasting
build_control_xreg() Construct control variables and external regressors

Reference

Lin, Y. and Eck, D. J. (2021).

Post-shock forecasting using synthetic controls.

International Journal of Forecasting.

https://doi.org/10.1016/j.ijforecast.2021.03.010


License

MIT License.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.