2FSVJ Model¶
In this subpackage (ajdmom.mdl_2fsvj), we consider the following
SV model:
\[\begin{split}d\log s(t) &= (\mu- v(t)/2) dt + \sqrt{v(t)}dw(t) + dz(t),\\
v(t) &= v_1(t) + v_2(t),\\
dv_1(t) &= k_1(\theta_1 - v_1(t))dt + \sigma_{1v} \sqrt{v_1(t)}dw_1(t),\\
dv_2(t) &= k_2(\theta_2 - v_2(t))dt + \sigma_{2v} \sqrt{v_2(t)}dw_2(t),\end{split}\]
where \(z(t)\) is a CPP as that in the 1FSVJ Model page, all others are set as these in the 2FSV Model page.
We have \(y_n = y_{o,n} + J_n\) where
\[\begin{split}y_{o,n} &\triangleq \mu h - \frac{1}{2}IV_n + I_n^{*},\\
J_n &\triangleq z(nh) - z((n-1)h) = \sum_{i=N((n-1)h)+1}^{N(nh)}j_i.\end{split}\]
Central Moments¶
Similarly, I define \(\overline{y}_n \triangleq y_n - E[y_n]\) and we have
\[E[\overline{y}_n^l]
= \sum_{i=0}^l C_l^i E[\overline{y}_{o,n}^i] E[\overline{J}_n^{l-i}],\]
where \(E[\overline{y}_{o,n}]= y_{o,n} - E[y_{o,n}]\) and \(E[\overline{J}_n]= J_n - E[J_n]\)
In summary, I defined
Moments¶
\[E[y_n^l]
= \sum_{i=0}^l C_l^i E[y_{o,n}^i] E[J_n^{l-i}].\]
I defined
Covariances¶
\[cov(y_n^{l_1}, y_{n+1}^{l_2})
= E[y_n^{l_1}y_{n+1}^{l_2}] - E[y_n^{l_1}]E[y_{n+1}^{l_2}].\]
\[\begin{split}E[y_n^{l_1}y_{n+1}^{l_2}]
&= E[(y_{o,n}+J_n)^{l_1}(y_{o,n+1}+J_{n+1})^{l_2}]\\
&= \sum_{i=0}^{l_1}C_{l_1}^i \sum_{j=0}^{l_2}C_{l_2}^j
E[y_{o,n}^i J_n^{l_1-i}y_{o,n+1}^j J_{n+1}^{l_2-j}]\\
&= \sum_{i=0}^{l_1}\sum_{j=0}^{l_2}C_{l_1}^i C_{l_2}^j
E[y_{o,n}^iy_{o,n+1}^j]E[J_n^{l_1-i}] E[J_{n+1}^{l_2-j}]\end{split}\]
In summary, I defined
API¶
Module for Central Moments for Two-Factor SV with jumps |
|
Module for Moments for Two-Factor SV with jumps |
|
Covariance for the Two-Factor SV with jumps |
|
Module for generating a trajectory of samples from mdl_2fsvj by Euler approximation |