TermStructureModels.jl
TermStructureModels.jl provides the following functions.
To use the above functions, you must first estimate the model. Use posterior_sampler to obtain posterior samples of parameters. These posterior samples are then used for the above functions (statistical inference and forecasting). For details, refer to the corresponding pages.
Some outputs of our package are not simple arrays. They are
Vector{Parameter}: output ofposterior_samplerVector{ReducedForm}: output ofreducedformVector{LatentSpace}: output oflatentspaceVector{YieldCurve}: output offitted_yieldcurveVector{TermPremium}: output ofterm_premiumVector{Forecast}: outputs ofconditional_forecastandconditional_expectation
The above outputs contain information about the posterior distributions of objects of interest. You can use these outputs to extract posterior samples or calculate descriptive statistics of the posterior distributions.
This package is based on our paper. Descriptions of the model and the meanings of each variable can be found in the paper. The Notation section details how notations in the paper correspond to variables in the package. Additionally, the example file used in the paper is available in the repository.
You are encouraged to read the two text boxes below.
Theoretical term structure models typically describe bond yields as decimals per time period. However, yield data is typically presented in percent per annum. Therefore, you need to address this discrepancy using the data_scale option. data_scale represents the scale of the data. Specifically,
`yields_in_data` = `data_scale`*`theoretical_yields_in_the_model`holds. For example, suppose we have monthly yield data in percent per annum. If we use a monthly term structure model, then data_scale=1200. The default value of data_scale is 1200 for all functions.
Functions that have the data_scale option are as follows: