简体   繁体   English

如何在 QuantLib-Python 中为 Cliquet 期权定价?

[英]How do I price a Cliquet Option in QuantLib-Python?

I installed QuantLib-Python 1.18 using pip, and I am able to price various options successfully.我使用 pip 安装了 QuantLib-Python 1.18,我能够成功地为各种选项定价。

However, the Cliquet Option gives me the following error:但是,Cliquet 选项给了我以下错误:

AttributeError: module 'QuantLib' has no attribute 'CliquetOption'

Is this an issue with my installation, or is it the package?这是我的安装问题,还是 package? If it's the latter, is there a way to easily add only the CliquetOption and the AnalyticCliquetEngine into my package?如果是后者,有没有办法轻松地将 CliquetOption 和 AnalyticCliquetEngine 添加到我的 package 中? They both seem to be available in the base QuantLib (non-python) package.它们似乎都在基础 QuantLib(非 python)package 中可用。

Is there another way to price a Cliquet Option without those modules?如果没有这些模块,是否有另一种方法可以为 Cliquet 选项定价?

I don't believe the CliquetOption is implemented in the QuantLib python module.我不相信 CliquetOption 是在 QuantLib python 模块中实现的。

You can: (1) use QuantLib in C++, (2) you can implement the class in the python module yourself and commit it or (3) you can raise the issue on github and maybe someone will pick it up. You can: (1) use QuantLib in C++, (2) you can implement the class in the python module yourself and commit it or (3) you can raise the issue on github and maybe someone will pick it up.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM