Question: Write a Python program that returns (by printing to the screen) the price, delta and vega of European and American options using a binomial tree.

 Write a Python program that returns (by printing to the screen)

Write a Python program that returns (by printing to the screen) the price, delta and vega of European and American options using a binomial tree. Specifically, the program should contain three functions: CRRPrice(.), CRRDelta(.) and CRRVega(.). These functions should, naturally, return the price, delta and vega of an option, respectively. The program should allow for the underlying asset to pay a continuous proportional dividend yield, but not discrete dividends. The necessary inputs should be requested by the program and returned by the user Specifically, the program should request the following parameters: stock price strike price continuously compounded risk free rate of interest volatility (sigma) continuously compounded proportional dividend yield time to expiration (in years) an indicator for the type of option (1= Call, 2=Put) an indicator for whether the option is European or American (1=European, 2= American) the number of steps in the binomial tree As with our Black-Scholes program, please do not have any input or output from within your price, delta, or vega functions, simply pass the parameters to the function, and then return the answer. This will allow us the opportunity to re-use these functions in future programs. Running the program should return the price, delta and vega from the binomial tree, AND the price, delta and vega using Black Scholes (in the output, specify that the Black-Scholes values are for European options, and explicitly write a small disclaimer if the binomial tree is giving the value of an American option). The vega should be computed using a numerical derivative, as discussed in class. A reasonable volatility "bump" is .005, please use that value for delta-sigma. Write a Python program that returns (by printing to the screen) the price, delta and vega of European and American options using a binomial tree. Specifically, the program should contain three functions: CRRPrice(.), CRRDelta(.) and CRRVega(.). These functions should, naturally, return the price, delta and vega of an option, respectively. The program should allow for the underlying asset to pay a continuous proportional dividend yield, but not discrete dividends. The necessary inputs should be requested by the program and returned by the user Specifically, the program should request the following parameters: stock price strike price continuously compounded risk free rate of interest volatility (sigma) continuously compounded proportional dividend yield time to expiration (in years) an indicator for the type of option (1= Call, 2=Put) an indicator for whether the option is European or American (1=European, 2= American) the number of steps in the binomial tree As with our Black-Scholes program, please do not have any input or output from within your price, delta, or vega functions, simply pass the parameters to the function, and then return the answer. This will allow us the opportunity to re-use these functions in future programs. Running the program should return the price, delta and vega from the binomial tree, AND the price, delta and vega using Black Scholes (in the output, specify that the Black-Scholes values are for European options, and explicitly write a small disclaimer if the binomial tree is giving the value of an American option). The vega should be computed using a numerical derivative, as discussed in class. A reasonable volatility "bump" is .005, please use that value for delta-sigma

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!