jumpDiffusionODEs | R Documentation |
Return the solution of the ODE describing the conditional Laplace transform of the affine states (log stock + volatility factors). Calculations performed under the pricing measure Q, i.e. with value of Laplace transform constrained to 1 for u = c(1,rep(0,N.factors))
, where N.factors
is the number of stochastic volatility factors, or under the statistical measure P, with Q parameters required to set risk premia and dynamics.
jumpDiffusionODEs( u, params, mkt, jumpTransform = getPointerToJumpTransform("expNormJumpTransform")$TF, rtol = 1e-12, atol = 1e-30, mf = 22, N.factors = 3, mod.type = "standard" ) jumpDiffusionODEsP( u, params.P, params.Q, mkt, jumpTransform = getPointerToJumpTransform("expNormJumpTransform")$TF, rtol = 1e-13, atol = 1e-30, mf = 22, N.factors = 3, mod.type = "standard" ) odeExtSolveWrap( u, params.Q, params.P = NULL, mkt, rtol = 1e-12, atol = 1e-30, mf = 12, N.factors = 3, jumpTransform = getPointerToJumpTransform("expNormJumpTransform"), mod.type = "standard", ... )
u |
|
params |
A list, containing the structures defining the stochastic volatitilites and jumps. See Details. |
mkt |
data.frame describing the market structure (times to maturity, interest rate, dividend yield, current stock price). See Details. |
jumpTransform |
string indicating which jump transform to contain in the specification. Available values: |
rtol |
relative tolerance for the ODE solver functions, |
atol |
absolute tolerance for the ODE solver functions, |
mf |
Integration method to use in the ODE solver functions, |
N.factors |
The number of volatility factors, of which the first one can co-jump with the stock. |
mod.type |
string indicating whether the |
params.P |
P (statistical measure) parameters, see Details. |
params.Q |
Q (pricing measure) parameters, see Details. |
jumpDiffusionODEs
solves the Riccati equations associated with a jump-diffusion model under the restrictions of the pricing measure: the stock price process is a martingale.
jumpDiffusionODEsP
uses params.Q
and params.P
to construct a model with well-defined risk premia and solves the Riccati equation under the statistical measure; this construction is required because the parameters of the stock equation under the statistical measure depend, in some specifications, on the parameters of the stock and volatility equations under the pricing measure.
params
, params.P
and params.Q
are list
s with N.factors+1
fields.
The fields must be named '1'
through 'N.factors'
and 'jmp'
. The numbered fields correspond to volatility factor specifications with parameters: kpp
(mean reversion speed), lmb
(volatility-of-volatility), rho
(correlation with log-asset price, leverage effect), eta
(long-run mean), and phi
: volatility scaling in the log-asset price equation. kpp
, lmb
greater than 0, phi
greater than or equal to 0. If phi = 0
, the volatility factor does not drive the log-asset price, but can potentially drive the jump intensity; either eta
or phi
should be normalised to 1
. The parameter params.P$[["1"]]$erp
sets how the risk premium is driven by the total level of volatility.
The list $jmp
has fields: lvec
(double): jump intensity, constant part, lprop
jump intensity loadings on volatility factors, length(lprop) = N.factors
, muSc
(positive, mean vol jump for 'expNormJumpTransform' or one over mean vol jump for 'kouExpJumpTransform'), rhoc
(jump leverage), muYc
(jump distribution location parameter), sigmaYc
(jump distribution scale parameter).
mkt
data.frame describing maturities and corresponding interest rates, dividend yields. Fields: p
: initial stock price, normalized to 1 without loss of generality, q
dividend yield per annum, r
interest rate, per annum, t
maturity for which the ODE solutions are to be calculated.
From jumpDiffusionODEs
and jumpDiffusionODEsP
: An array of size UxTx(N.factors + 1)
where U = nrow(u)
, T = length(mkt$t)
(number of maturities), codeN.factors+1 is the number of coefficients in the exponentially affine characteristic function.
From odeEstSolveWrap
: an array of UxTx(4x(N.factors+1)): affine coefficients and their derivatives with respect to u[,1]
. This allows to for highly accurate evaluation of the derivatives of the characteristic function of the log-asset price.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.