Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managing Currency Options In Financial Institutions

Authors: Yat-Fai Lam, Kin-Keung Lai

1st Edition

1138778052, 978-1138778054

More Books

Students also viewed these Finance questions

Question

derivative of f ( x ) = cot ( x ^ 2 + 2 x )

Answered: 1 week ago