Skip to content

Continuous-Time Generator

The continuous-time economic scenario generator simulates the trajectories of (in brackets are the $names of the output dataframes):

(1) Australia zero-coupon bond rates maturing every quarter from 3 months up to 10 years, i.e., 0.25 years ($maturity_1qtrs), 0.5 years ($maturity_2qtrs), 0.75 years ($maturity_3qtrs), ..., 10 years ($maturity_40qtrs),

(2) NSW home value index ($house_index),

(3) S&P/ASX200 price ($stock_price).

The zero-coupon bond term structure is fitted using the arbitrage-free Nelson-Siegel model, while NSW home value index and S&P/ASX200 price are assumed to be Geometric Brownian Motions that are correlated with the zero-coupon bond rates. Further details on model parameter estimation and forecast can be found in note (a) below.

The independent-factor model assumes that the level, slope, and curvature of the risk-free rate are mutually independent, while the correlated-factor model assumes dependence among them. Simulations generated by the correlated-factor models are more volatile since more parameters are involved. Further suggestions on model selection can be found in section "Choosing an Appropriate Model" below.

Denote \(X^1\) the level, \(X^2\) the slope, \(X^3\) the curvature of the risk-free rate, \(X^4\) the logged NSW home value index, \(X^5\) the logged S&P/ASX200 price, and \(W^1, \cdots, W^5\) the standard Brownian Motions. Under the real-world measure, the independent-factor model satisfies the following stochastic differential equations:

while the correlated-factor model satisfies

The interest_rate models return paths generated from the first 3 equations, while the interest_house_stock models return paths generated from all 5 equations. The vector is interpreted as the mean vector, is the mean-reversion matrix, and is the covariance matrix. Estimation of these parameters are in note (a).

The results are still depicted with the same simulation frequency options as the discrete case, but the calculations are based in continuous time.


esg_afns_simulator(num_years = 5, num_paths = 10, frequency = 'month', perc_change = FALSE, type = 'independent', model = 'interest_rate',seed = NULL)

   Paramters:

     num_years : numeric

       integer denoting number of years to forecast from 01-07-2021, default 5 years

     num_paths : numeric

       integer denoting the number of simulation paths, default 10 paths

     frequency : character

       'year', 'quarter' or 'month' denoting the simulation frequency, default 'month'

     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

     type : character

       'independent' or 'correlated' denoting whether the latent factors are independent of each other, default 'independent'

     model : character

       'interest_rate' or 'interest_house_stock' denoting the output variables, default 'interest_rate'

     seed : numeric

       Specify the seed for simulations, no default

   Returns:

     A list of 40 dataframes containing simulated interest rates from 01-07-2021 with maturities from 1 quarter up to 10 years if model is set to be interest_rate, or 42 dataframes containing interest rates, NSW house value index, S&P/ASX200 closing prices if model is set to be interest_house_stock. Rows are the trajectories (e.g., trajectory_1), columns are the time steps (e.g., 2021-07-01). See note (c) for explanations on the negativity of output values.

   Usage:

# simulate 10 years of data 
sim <- esg_afns_simulator(num_years = 10, num_paths = 10, frequency = 'year', type = 'independent', model = 'interest_house_stock', seed = 1)

# suppose we wish to look at the 3-month zero-coupon bond rates
sim$maturity_1qtrs

# suppose we wish to look at the 5-year zero-coupon bond rates
sim$maturity_20qtrs

# NSW house value index 
sim$house_index

# S&P/ASX200 closing price 
sim$stock_price 

   Choosing an Appropriate Model:

  • Choosing between models interest_rate and interest_house_stock:

    The interest_house_stock model assumes dependency between interest rates, stock prices, and house indexes. Therefore, this model takes a more holistic view on the movements of those financial variables.

    However, a drawback is that the simulated interest_house_stock paths will be more volatile than the interest_rate model, and the paths will take longer to revert to mean levels.

    If users' intended area of usage is not influenced by stocks and house prices, the interest_rate model would be a good choice. If, otherwise, comovements among the financial variables are deemed important, the interest_house_stock model is suggested.

  • Choosing between "independent" and "correlated" factor models:

    The correlated-factor model assumes correlation among level, slope, and curvature of the interest rate term structure, while the independent-factor model does not. Note that stock prices and house indexes are always correlated with the interest rate.

    The correlated-factor model takes a more holistic view on the underlying term structure of interest. Meanwhile, "correlated" model generates more volatile simulations, and it takes longer to revert to mean levels.

  • 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.

   Notes:

(a) Procedure for parameter estimation:

  • Under the real-world measure, computed measurement equation and state transition equation.

  • Applied Kalman filtering to estimate the parameters. The maximum likelihood estimators were obtained from the Nelder-Mead algorithm.

Procedure for forecasts: Used the state transition equation:

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 simulated interest rates are allowed since the Arbitrage-Free Nelson Siegel model does not impose non-negativity constraints. On the other hand, the stock prices and home value indexes must be positive, since simulations were done using log transforms, which is an implicit assumption of Geometric Brownian Motions.

   References:

Christensen, J. H., Diebold, F. X. & Rudebusch, G. D. (2011), ‘The affine arbitrage-free class of nelson–siegel term structure models’, Journal of Econometrics 164(1), 4–20.

Christensen, J. H., Lopez, J. A. & Rudebusch, G. D. (2015), ‘Analytical formulas for the second moment in affine models with stochastic volatility’.