#Install package and library fOptions
install.packages("fOptions")
library(fOptions)
#
#Now we use the function GBSGreeks to calculate the greeks delta and lambda of a put option
#Example
#
GBSGreeks(Selection = "delta", TypeFlag = "p", S = 20, X = 22,
Time = 9/12, r = 0.1, b = 0.1, sigma = 0.3)
GBSGreeks(Selection = "lambda", TypeFlag = "p", S = 20, X = 22,
Time = 9/12, r = 0.1, b = 0.1, sigma = 0.3)
#
#The function GBSCharacteristics calculates all greeks and the price of the option. Example:
GBSCharacteristics(TypeFlag = "p", S = 20, X = 22,
Time = 9/12, r = 0.1, b = 0.1, sigma = 0.3)