Description Objects from the Class Slots Examples
The Heston process is give by
\begin{array}{ll} dS_t = (r_t-q_t)S_tdt + √{ν_t}S_tdW_t^S \\ dν_t = κ(θ-ν_t)dt+σ√{ν_t}dW_t^ν \\ ρ dt = dW_t^S dW_t^ν \end{array}
An object represents the paramter of a Heston process.
Objects can be created by calls of the form new("HestonProcess", ...)
or
HestonProcess(r, q, spot, v0, kappa, theta, sigma, rho)
.
r
:domestic interest rate as a function of time (continuous compounding, Actual365Fixed)
q
:divident rate or foreign interest rate as a function of time (continuous compounding, Actual365Fixed)
spot
:current price of the underlying stock or fx rate
v0
:spot variance ν_{t=0}
kappa
:rate at which ν_t reverts to θ
theta
:mean reversion level of the variance ν_t
sigma
:volatility of volatility
rho
:correlation between spot and variance increments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | > process <- HestonProcess(function(t) { 0.02 },
function(t) { 0.01 },
100, 0.09, 2.0, 0.06, 0.4, -0.75)
> process
HestonProcess
r(t=0): 0.02
q(t=0): 0.01
spot : 100
v0 : 0.09
kappa : 2
theta : 0.06
sigma : 0.4
rho : -0.75
> process["rho"]
[1] -0.75
> process["sigma"] <- 0.2
> process["sigma"]
[1] 0.2
> process["sigma"] <- -0.2
Error in validObject(x) :
invalid class "HestonProcess" object: negative sigma was given.
> process["rho"] <- 2
Error in validObject(x) :
invalid class "HestonProcess" object: correlation rho must stay between [-1,1].
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.