Discrete-Time Generator
The discrete-time economic scenario generator simulates the trajectories of 11 Australian economic and financial variables (in brackets are the $names
of the output dataframes):
(1) 3-month zero-coupon bond yields ($zcp3m_yield
),
(2) 10-year zero-coupon bond spread ($zcp10y_spread
),
(3) NSW home value index ($home_index
),
(4) NSW home rental yields ($rental_yield
),
(5) Australia GDP ($GDP
),
(6) Australia CPI ($CPI
),
(7) S&P/ASX200 closing price ($ASX200
),
(8) Australian dollar trade-weighted index ($AUD
),
(9) Australia mortgage rate ($mortgage_rate
),
(10) NSW unemployment rate ($unemployment_rate
),
(11) Stochastic discount factors ($discount_factors
).
Factors (1)-(8) (in rates) were fitted using a Vector Autoregressive model (VAR), factors (9)-(10) were respectively expressed as a fixed margin over factors (1)-(2) due to strong correlations, while factor (11) is derived from the fitted VAR model with arbitrage-free assumptions. Further details on model parameter estimation and forecasts can be found in note (a) below.
Vector Autoregression (VAR) is a regression of a time series where the ouput depends linearly on the past values of itself, and the past values of other variables, up to some specfied order:
where
-
is the vector of economic variables,
-
is the vector of intercepts,
-
are coefficient matrices of size \(n \times n\) with \(n\) being the number of economic variables and \(p\) the lags.
-
is a vector of white noises.
The stochastic discount factor is defined as:
where and respectively denote the 3-month zero-coupon bond rates and white noises from the fitted VAR model, and is the market price of risk process which is assumed to be affine over factors (1)-(8).
esg_var_simulator(num_years = 5, num_paths = 10, frequency = 'quarter', perc_change = FALSE, return_sdf = TRUE, seed = NULL)
Parameters:
num_years : numeric
integer denoting number of years to forecast from 01-01-2021, default 5 years
num_paths : numeric
integer denoting number of simulations to make for each variable, default 10 paths
frequency : character
'year', 'quarter' or 'month' denoting the simulation frequency, default 'quarter'. The base simulation time step is one quarter, Linear interpolation will be used if the required frequency is higher, whereas arithmetic average will be used if the frequency is lower.
perc_change : logical
set TRUE for outputs to be expressed as period-by-period percent change, default FALSE. The reference level, i.e., the original values in the first output period, will be appended above the percentage changes for each variable and each trajectory. See note (b) below.
return_sdf : logical
set TRUE to return the stochastic discount factors, default TRUE
seed : numeric
Specify the seed for simulations, no default
Returns:
A list of 10 dataframes containing simulated trajectories from 01-01-2021 of the 10 variables, or a list of 11 dataframes including the simulated stochastic discount factors if return_sdf
is set TRUE. Rows are the trajectories (e.g., trajectory_1
), columns are the time steps (e.g., 2021-01-01
). See note (c) for explanations on the negativity of output values.
Usage:
# simulate 10 years of data
sim <- esg_var_simulator(num_years = 10, num_paths = 10, frequency = 'year')
# suppose we wish to look at the 3 months zero coupon bonds
sim$zcp3m_yield
# if we wanted a specific trajectory, say 3
sim$zcp3m_yield[3,]
Notes:
(a) Procedure for parameter estimation:
-
Transformed factors (3),(5)-(8) to continuously compounded growth rates, tested for correlation, causality, and stationarity.
-
Found the optimal lag order for Vector Autoregression using AIC, SIC, HQC.
-
Fitted the VAR model using ordinary least squares. This was followed by evaluation.
-
Associated the stochastic discount factors with VAR factors and nominal bond prices, estimated the market price of risk parameters by minimising the sum of squared error.
Procedure for forecasts: Generated factors (1)-(8) using Vector Autoregression formula. From the generated paths and noises, derived stochastic discount factors.
Detailed R codes for parameter estimation can be found in the economic tutorial/economic.
(b) Large values of percentage change can appear if the original forecasts are near-zero, or if the Gaussian noise is large, though with low probabilities. This happens especially for interest rates in the first few periods due to historical-low rates in 2021.
(c) Negative values for rate factors i.e., factors (1)(2)(4)(9)(10), are theoretically allowed as Vector Autoregression models assume that the noise follow a Gaussian distribution. Index factors, i.e., factors (3)(5)-(8), on the other hand, are all positive.
(d) Choosing between discrete- and continuous-time models:
-
The outputs are different for the two simulators, users should choose the model based on their objectives.
-
The base time step for discrete-time model is one quarter, whereas there is no such as a base for continuous-time. For time steps smaller than one quarter, discrete-time model will interpolate the quarterly statistics, whereas the continuous-time model simply generates random noises for each specific time step. Consequently, for large time steps, the executing time for continuous-time models are shorter than the dicrete-time model.
References:
Daniel H Alai, Hua Chen, Daniel Cho, Katja Hanewald, and Michael Sherris. Developing equity release markets: Risk analysis for reverse mortgages and home reversions. North American Actuarial Journal, 18(1):217–241, 2014.
Andrew Ang and Monika Piazzesi. A no-arbitrage vector autoregression of term structure dynamics with macroeconomic and latent variables. Journal of Monetary economics, 50(4):745–787, 2003.
Andrew Ang, Monika Piazzesi, and Min Wei. What does the yield curve tell us about gdp growth? Journal of econometrics, 131(1-2):359–403, 2006.