2

我有一些历史期权价格,我正在尝试确定隐含增量。

我有:

1) strike
2) call/put
3) stock price
4) dividend
5) interest rate
6) option price

我很难在 R 中找到一个包/函数来做到这一点。

我查看了fOptions包装,但似乎没有任何东西可以用来计算隐含的希腊语。

有什么建议么?

4

1 回答 1

5

您可以使用 RQuantLib 计算隐含波动率,然后计算其他希腊变量。

library(RQuantLib)
value <- 9.15
type  <- "call"
underlying    <- 100
strike        <- 100
dividendYield <- 0
riskFreeRate  <- 0.03
maturity      <- .5

# Compute the implied volatility
volatility <- EuropeanOptionImpliedVolatility(
  type  = type, 
  value = value, 
  underlying = underlying,
  strike     = strike, 
  dividendYield = dividendYield,
  riskFreeRate  = riskFreeRate,
  maturity      = maturity,
  volatility    = .01
)$impliedVol

# Compute all the greeks
EuropeanOption(
  type  = type, 
  underlying = underlying,
  strike     = strike, 
  dividendYield = dividendYield,
  riskFreeRate  = riskFreeRate,
  maturity      = maturity,
  volatility    = volatility
)

# Concise summary of valuation for EuropeanOption 
#   value    delta    gamma     vega    theta      rho   divRho 
#  9.1500   0.5702   0.0185  27.7721  -9.7682  23.9330 -28.5080 
于 2012-04-09T01:09:38.423 回答