The dsc()
function generates
dynamic forecast combinations from a set of
candidate density forecasts. For each period,
it selects and combines a subset of predictive densities
with the highest ranks regarding local predictive accuracy.
The identities of the candidate forecasting models and
the subset sizes used for building the aggregate predictive density
may vary over time based on the data.
If only one candidate forecast is picked,
the approach temporarily collapses to pure model selection.
dsc(
y,
point_forecasts,
variance_forecasts,
gamma_grid,
psi_grid,
delta,
burn_in,
burn_in_dsc,
metric,
equal_weight,
incl,
portfolio_params = NULL
)
A list containing:
A list containing:
A vector with the actual values of the target variable.
A vector with the first moments of the aggregate predictive densities of the DSC model.
A vector with the second moments of the aggregate predictive densities of the DSC model.
A list containing:
A vector containing the selected values for the tuning parameter gamma.
A vector containing the selected values for the tuning parameter psi.
A matrix containing the selected candidate forecasting models.
A list containing:
The grid of gamma values used in the model.
The grid of psi values used in the model.
The delta value used in the model.
The burn-in period used in the model.
The burn-in period used in the model.
The ranking metric used in the model.
A boolean indicating if equal weighting was used.
Additional included parameters.
A matrix of dimension T * 1
or numeric vector of length T
containing the observations of the target variable.
A matrix with T
rows containing
the first moments of (conditionally) normal distributed
predictive densities in each column.
A matrix with T
rows containing
the second moments of (conditionally) normal distributed
predictive densities in each column.
A numeric vector containing potential discount factors between 0 and 1 to exponentially down-weight the past predictive performance of the candidate forecasting models. The values of this tuning parameter are chosen in a procedure that amounts to leave-one-out cross-validation, taking into account the time series structure of the data. For details, see Adaemmer et al. (2023).
An integer vector that controls the (possible) sizes of the subsets. The values of this tuning parameter are chosen in a procedure that amounts to leave-one-out cross-validation, taking taking into account the time series structure of the data. For details, see Adaemmer et al. (2023).
A numeric value between 0 and 1 denoting the discount factor applied to down-weight the past predictive performance of the aggregate predictive densities.
An integer value >= 1
that denotes the number of
observations used to 'initialize' the rankings.
After 'burn_in' observations, the rankings for both,
the candidate forecasting models and aggregate predictive densities
are reset. burn_in = 1
means no burn-in period is applied.
An integer value >= 1
that denotes the number of
observations used to 'initialize' the rankings.
After 'burn_in_dsc' observations, only the ranking of the
aggregate predictive densities is reset.
burn_in_dsc = 1
means no burn-in period is applied.
An integer from the set 1, 2, 3, 4, 5
representing
the metric used to rank the candidate forecasting models (TV-C models)
and subset combinations based on their predictive performance.
The default value is metric = 5
which ranks them according to the
sum of (discounted) Continuous-Ranked-Probability-Scores (CRPS).
metric = 1
uses discounted Predictive Log-Likelihoods,
metric = 2
uses discounted Squared-Errors,
metric = 3
uses discounted Absolute-Errors,
metric = 4
uses discounted Compounded-Returns
(in this case the target variable y has to be a time series of
financial returns).
A boolean that denotes whether equal weights are used to
combine the candidate forecasts within a subset. If FALSE
, the weights are
calculated applying the softmax function on the ranking scores of
the candidate forecasting models. The method proposed in
Adaemmer et al. (2023) uses equal weights to combine the
candidate forecasting models.
An optional integer vector that denotes signals that
must be included in the subset combinations. For example, incl = c(1, 3)
includes all candidate forecasting models generated by
the first and third signals. If NULL
, no signal is forced to be included.
A numeric vector of length 3 containing the following elements:
A non-negative double representing the investor's risk aversion. Higher values indicate more risk-averse behavior.
A double specifying the minimum weight allocated to the market. A non-negative lower bound effectively rules out short sales.
A double specifying the maximum weight allocated to the market. For example, a value of 2 allows for a maximum leverage ratio of two.
This parameter is only required if metric = 4
.
Philipp Adämmer, Sven Lehmann, Rainer Schüssler
Beckmann, J., Koop, G., Korobilis, D., and Schüssler, R. A. (2020) "Exchange rate predictability and dynamic bayesian learning." Journal of Applied Econometrics, 35 (4): 410–421.
Dangl, T. and Halling, M. (2012) "Predictive regressions with time-varying coefficients." Journal of Financial Economics, 106 (1): 157–181.
Del Negro, M., Hasegawa, R. B., and Schorfheide, F. (2016) "Dynamic prediction pools: An investigation of financial frictions and forecasting performance." Journal of Econometrics, 192 (2): 391–405.
Koop, G. and Korobilis, D. (2012) "Forecasting inflation using dynamic model averaging." International Economic Review, 53 (3): 867–886.
Koop, G. and Korobilis, D. (2023) "Bayesian dynamic variable selection in high dimensions." International Economic Review.
Raftery, A. E., Kárn`y, M., and Ettler, P. (2010) "Online prediction under model uncertainty via dynamic model averaging: Application to a cold rolling mill." Technometrics, 52 (1): 52–66.
West, M. and Harrison, J. (1997) "Bayesian forecasting and dynamic models" Springer, 2nd edn.
# \donttest{
# See example for tvc().
# }
Run the code above in your browser using DataLab