Question
Part F: Comparing Two Stocks In this section, we will use Monte Carlo simulation to estimate probabilities relating to the performance of two stocks with
Part F: Comparing Two Stocks
In this section, we will use Monte Carlo simulation to estimate probabilities relating to the performance of two stocks with different parameters.
Create a markdown cell that displays a level 2 header that reads: "Part F: Comparing Two Stocks". Also add some text briefly describing the purpose of your code in this part.
Set a seed of 1, and then run Monte Carlo simulations for two stocks (Stock A and Stock B), each with 10,000 runs lasting over a period of 252 days. Both stocks being simulated have a current price of 120. Stock A has an expected annual yield of 8% and a volatility of 0.2. Stock B has an expected annual yield of 5% and a volatility of 0.5.
Calculate the following:
-
The proportion of the simulated runs in which Stock A has a higher final price than Stock B.
-
The proportion of the simulated runs in which Stock A has a final price greater than 150.
-
The proportion of the simulated runs in which Stock B has a final price greater than 150.
-
The proportion of the simulated runs in which Stock A has a final price less than 100.
-
The proportion of the simulated runs in which Stock B has a final price less than 100.
Round all values to four decimal places, and display your results in the following format:
Proportions of runs in which... ------------------------------- A ends above B: xxxx
A ends above 150: xxxx B ends above 150: xxxx
A ends below 100: xxxx B ends below 100: xxxx
Part G: Expected Call Payoff
We will conclude this project by exploring an application of Monte Carlo simulation. A call option is a particular type of investment whose final value (or payoff) is based on the price of a stock. When you purchase a call based on a stock, it will have a specified expiration date, as well as a strike price that we will denote by . Let denote the price of the stock when the call expires. If > , then you will receive a payoff of dollars from your call. If , then your payoff would be $0.
For example, assume that you pay $10 for a call on a stock. Suppose that the call expires in one year and has a strike price of $120. If the price of the stock one year later is $150, then you will receive a payoff $30 from the call. If, on the other hand, the price of the stock after one year was $110, then you would not get any money back from the call (your payoff would be $0).
In a sense, you can think of a call option as a "bet" that the price of the stock will be greater than the strike price when the call expires.
We will use Monte Carlo to estimate the expected payoff of a call on a particular stock. The stock will have a current price of 200, an expected annual yield of 11%, and a volatility of 0.4. The call will have a strike price of 225 and will expire in 150 days.
Create a markdown cell that displays a level 2 header that reads: "Part G: Expected Call Payoff". Also add some text briefly describing the purpose of your code in this part.
Run a Monte Carlo simulation for a stock with a current price of 200, an expected annual yield of 11%, and a volatility of 0.4. Use 10,000 runs in the simulation.
Consider a call with a strike price of 225. Calculate the payoff of this call for each of the 10,000 simulated runs of the stock. You can do this by first subtracting 225 from each of the final stock prices, and then setting any negative values to zero. To set the negative values to zero, you can use Boolean masking or np.where.
Print the average call payoff over the 10,000 runs. Set a seed of 1 at the beginning of this cell.
This section should not contain any loops.
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