Question
3. A call option pays off if the price of the underlying asset at maturity, , is greater than the option's strike price, . Otherwise,
3. A call option pays off if the price of the underlying asset at maturity, , is greater than the option's strike price, . Otherwise, the payoff is zero.
Define a function called get_call_payoff that accepts a stock price at maturity and a strike price as input, and that calculates the call payoff as output. Using a strike price of =35, calculate the payoff for stock prices at maturity from 25 to 45 (in increments of one). Plot the stock price at maturity on the x-axis of a plot and the corresponding call payoff on the y-axis. Note: Make sure to label your axes appropriately and include an appropriate title on your plot
Write code to do this without a for loop, and without defining a function, in one line of code, and just print out your payoff vector you calculate this way (no need for another plot here).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started