2FSV Model¶
In this subpackage (ajdmom.mdl_2fsv), we consider the following
SV model in which volatility is
a superposition of two SRD processes,
where \(w_1(t)\), \(w_2(t)\) are two independent Wiener processes, which are also independent of \(w(t)\).
Notations¶
We define
Return of the nth interval \(y_n\) can be expressed as \(y_n = \mu h - \frac{1}{2}IV_n + I_n^*\). We have
where \(\tilde{h}_i \triangleq (1-e^{-k_ih})/k_i, i=1,2\).
Central Moments¶
Similarly, we define \(\overline{y}_n \triangleq y_n - E[y_n]\) and we have
According to above expansion, central moment \(\overline{y}_n\) with order \(l\) reduces to
where \(\boldsymbol{m} = (m_1,\cdots,m_8), \sum_{i=1}^8m_i = l\),
where
Function
moment_IEI_IEII(m_4,m_5,m_6,m_7,m_8) returns a poly with attribute
keyfor = ('(n_1m*k1+n_2m*k2)^{-i_m},...,(n_11*k1+n_21*k2)^{-i_1}',
'e^{(m_4*k1+m_6*k2)(n-1)h}','e^{(j_1*k1+j_2*k2)[t-(n-1)h]}','[t-(n-1)h]',
'v_{1,n-1}','theta1','sigma_v1', 'v_{2,n-1}','theta2','sigma_v2').
In summary, I defined
Moments¶
We have \(y_n = \overline{y}_n + E[y_n]\) and \(E[y_n] = \mu h - \frac{1}{2}(\theta_1 + \theta_2)h\), thus
Similarly,
where
where
In summary, I defined
One alternative way,
Covariances¶
Co-Moments¶
where I used
Note that
where \(t0 = ((n_{1m},n_{2m},i_{m}),...,(n_{11},n_{21},i_{1}))\) and \(t=(n+1)h\).
Function vvee_IEI_IEII_vnvn()
is defined to
accomplish above computation and expand \(v_{1,n}\) and
\(v_{2,n}\)
which returns a poly with attribute
keyfor = ('e^{-k1*nh}IE_{1,n}','e^{-k2*nh}IE_{2,n}',
'(n_1m*k1+n_2m*k2)^{-i_m},...,(n_11*k1+n_21*k2)^{-i_1}',
'e^{-(n1*k1+n2*k2)h}','h',
'v_{1,n-1}','theta1','sigma_v1', 'v_{2,n-1}','theta2','sigma_v2'), i.e.,
Expansion of \(v_{1,n}\) is done through
(taking \(v_{1,n}^m\) as an example), where \(\boldsymbol{m} = (m_1,m_2,m_3)\), \(m_1+m_2+m_3 = m\), and
Expansion of \(v_{2,n}\) is done similarly.
In summary, I defined
API¶
Central Moments for Two-Factor SV model |
|
Moments for Two-Factor SV |
|
Covariances for Two-Factor SV |
|
Module for generating a trajectory of samples from mdl_2fsv by Euler approximation |