我有一些历史期权价格,我正试图确定一个隐含的delta。
我有:
1) strike
2) call/put
3) stock price
4) dividend
5) interest rate
6) option price
我很难在R中找到一个包/函数来做到这一点。
我查看过fOptions
套餐,但似乎没有什么可以解释暗示的希腊人。
有什么建议吗?
答案 0 :(得分: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