Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following program is designed to calculate the present value of a specific type of options according to Black-Scholes-Merton model. The arguments are as follows:

image text in transcribed

The following program is designed to calculate the present value of a specific type of options according to Black-Scholes-Merton model. The arguments are as follows: 50: stock price, K: strike price, T: time to expiry, r: risk-free interest rate, sigma: standard deviation of stock returns. Line # >>> def bsm_option_price(80, K, T, I, sigma, option = 'call): 1 d1 = (np.log(S0 / K) + ( + 0.5 * sigma ** 2) * T) / (sigma * math.sqrt (T) 2 d2 - (np.log(50 / K) + (r - 0.5.sigma ** 2) T) / (sigma * math.sqrt(T)) if option 'call': - (50*stats.norm.cdf (d1, 0.0, 1.0)) -K*np.exp(-r*T)*stats.norm.cdf (d2, 0.0, 1.0) 5 else: 6 v = K*np.exp(-r*T)*stats.norm.cdf(-1*d2, 0.0, 1.0) - (50*stats.norm.cdf (-1*d1, 0.0, 1.0)) 7 >>> return v 8 If we'd like this program to be capable of calculating and outputting the present value of European put options, then we should A. Replace "so" with "ST" at line 1. B. Replace "return v" with "return option" in line 8. C. In addition to replacing "option = 'call'" with "option = 'put'" at line 1 and at line 4, line 5 should be replaced with: K-np.exp(-r*T)*stats.norm.cdf (d2, 0.0, 1.0)-(S0*stats.norm.cdf (di, 0.0, 1.0)) D."di" in line 2 should be replaced with "d2", and "d2" in line 3 should be replaced with "di". E. No change is needed, if argument for option is entered as 'put' next time the function is called, it will calculate the European put price

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_2

Step: 3

blur-text-image_3

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

Personal Finance

Authors: Jack Kapoor

13th Edition

1260799735, 9781260799736

More Books

Students also viewed these Finance questions

Question

Show that f (x, y) = 1/x, 0 Answered: 1 week ago

Answered: 1 week ago

Question

1. Background knowledge of the subject and

Answered: 1 week ago

Question

2. The purpose of the acquisition of the information.

Answered: 1 week ago