morning all, I am trying to do a sensitivity test on option using RQuantLib and below is the code executed:
library(RQuantLib)
type <- "call"
underlying <- seq(10,60,by=5)
strike <- 30
dividendYield <- 0
riskFreeRate <- 0.03
maturity <- 1.0
volatility <- seq(0.1,0.15,by=0.01)
test<-EuropeanOptionArrays(type=type, underlying=underlying,
strike=strike, dividendYield=dividendYield,riskFreeRate=riskFreeRate,
maturity=maturity, volatility=volatility)
The figures above are arbitrary and I would like to ask if there is a better way or cleaner way to create a list instead of setting "underlying <- seq(10,60,by=5)" and "volatility <- seq(0.1,0.15,by=0.01)"?
Many thanks for your help! Greatly appreciated.