6.11.3. statsmodels.sandbox.tsa.diffusion2¶
Diffusion 2: jump diffusion, stochastic volatility, stochastic time
Created on Tue Dec 08 15:03:49 2009
Author: josef-pktd following Meucci License: BSD
contains:
CIRSubordinatedBrownian Heston IG JumpDiffusionKou JumpDiffusionMerton NIG VG
6.11.3.1. References¶
Attilio Meucci, Review of Discrete and Continuous Processes in Finance: Theory and Applications Bloomberg Portfolio Research Paper No. 2009-02-CLASSROOM July 1, 2009 http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1373102
this is currently mostly a translation from matlab of http://www.mathworks.com/matlabcentral/fileexchange/23554-review-of-discrete-and-continuous-processes-in-finance license BSD:
Copyright (c) 2008, Attilio Meucci All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
TODO:
- vectorize where possible
- which processes are exactly simulated by finite differences ?
- include or exclude (now) the initial observation ?
- convert to and merge with diffusion.py (part 1 of diffusions)
- which processes can be easily estimated ? loglike or characteristic function ?
- tests ? check for possible index errors (random indices), graphs look ok
- adjust notation, variable names, more consistent, more pythonic
- delete a few unused lines, cleanup
- docstrings
- random bug (showed up only once, need fuzz-testing to replicate)
- File ”...diffusion2.py”, line 375, in <module>
- x = jd.simulate(mu,sigma,lambd,a,D,ts,nrepl)
- File ”...diffusion2.py”, line 129, in simulate
- jumps_ts[n] = CumS[Events]
IndexError: index out of bounds
CumS is empty array, Events == -1
6.11.3.2. Functions¶
schout2contank (a, b, d) |
6.11.3.3. Classes¶
CIRSubordinatedBrownian () |
CIR subordinated Brownian Motion |
Heston () |
Heston Stochastic Volatility |
IG () |
inverse-Gaussian ??? used by NIG |
JumpDiffusionKou () |
|
JumpDiffusionMerton () |
|
NIG () |
normal-inverse-Gaussian |
VG () |
variance gamma process |