R:RQuantLib不计算希腊文 [英] R : RQuantLib not calculating greeks

查看:107
本文介绍了R:RQuantLib不计算希腊文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用RQuantLib包来计算某些选项的希腊汇率,但对于除价格以外的所有输出值都得到NAs.

I'm trying to use the RQuantLib package to calculate greeks for some options but getting NAs for all the output values except price.

从包装用户手册中复制示例时,我得到的结果是相同的:

I'm getting the same results when I copy the examples from the package user manual:

> AmericanOption("put", strike=100, volatility=0.4, 100, 0.02, 0.03, 0.5)
Concise summary of valuation for AmericanOption 
  value   delta   gamma    vega   theta     rho  divRho 
10.9174      NA      NA      NA      NA      NA      NA 
> AmericanOption("call", 100, 100, 0.02, 0.03, 0.5, 0.4)
Concise summary of valuation for AmericanOption 
  value   delta   gamma    vega   theta     rho  divRho 
11.3648      NA      NA      NA      NA      NA      NA 

有什么建议吗?

推荐答案

例如在r-sig-finance邮件列表上的该线程中:存根之所以存在,是因为QL曾经为美国期权提供(数字)希腊语,但是很多年前就停止这样做了.

That has been discussed before e.g. in this thread on the r-sig-finance mailing list: the stubs are there because QL used to provided (numerical) greeks for American options, but stopped doing so many years ago.

因此,您必须通过移动输入在数字上近似它们;有关详细信息,请参见上面引用的帖子.还考虑订阅r-sig-finance.

So you have to approximate them numerically by shifting inputs; see the post referenced above for details. Consider subscribing to r-sig-finance as well.

这篇关于R:RQuantLib不计算希腊文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆