| Library: | finance |
| See also: | bitree IBTdk BlackScholes american asset bs1 european mcmillan optstart |
| Quantlet: | IBTcrr | |
| Description: | calculates the call or put option price, using CRR binomial tree method |
| Usage: | c = IBTcrr(S, K, r, sigma, level, deltat, task) | |
| Input: | ||
| S | scalar: the current value of the index | |
| K | scalar: exercise price | |
| r | scalar: riskless interest rate | |
| sigma | scalar: Black Scholes implied volatility of a European call | |
| level | scalar: number of time intervals | |
| deltat | scalar: length of time interval | |
| task | scalar: if task=1, calculate the call option price; if task=0, calculate the put option price | |
| Output: | ||
| c | scalar: the call option price or put option price | |
library("finance")
S=100
r=0.03
K=100
level=1
sigma=0.1
deltat=1
task=1
C=IBTcrr(S, K, r, sigma, level, deltat,task)
C
Output is one year's call option price : Contents of C [1,] 6.4026