有没有人知道Python中好的quantlib示例?我似乎找不到任何地方...
在Ubuntu软件包的quantlib-python
中有一些示例:
/usr/share/doc/quantlib-python/examples/american-option.py
/usr/share/doc/quantlib-python/examples/basket-option.py
/usr/share/doc/quantlib-python/examples/bermudan-swaption.py.gz
/usr/share/doc/quantlib-python/examples/european-option.py
/usr/share/doc/quantlib-python/examples/swap.py.gz
/usr/share/doc/quantlib-python/examples/test/QuantLibTestSuite.py
/usr/share/doc/quantlib-python/examples/test/bonds.py.gz
/usr/share/doc/quantlib-python/examples/test/date.py
/usr/share/doc/quantlib-python/examples/test/instruments.py
/usr/share/doc/quantlib-python/examples/test/integrals.py
/usr/share/doc/quantlib-python/examples/test/marketelements.py
/usr/share/doc/quantlib-python/examples/test/ratehelpers.py
/usr/share/doc/quantlib-python/examples/test/solvers1d.py
/usr/share/doc/quantlib-python/examples/test/termstructures.py.gz
如果你不使用Ubuntu/Debian,你的操作系统可能有类似的软件包,或者你也可以通过下载quantlib-swig_0.9.9.orig.tar.gz来获取这些文件。
这些文件在QuantLib-SWIG发行版中(您可能已经从QuantLib网站获取了该软件)。一旦解压缩tarball(或zip归档文件),它们就位于Python\examples文件夹中。
到目前为止,我发现的最好(也是唯一的)QL/Python示例代码是由Tawanda Gwena编写的,位于https://sites.google.com/site/tgwena/engineering-docs/engineering-permissions-list。