1. Compare the market and model price of a stock.
Chose two stocks from s&p500 (excluding Apple, Google Microsoft, Facebook), check on yahoo-finance the price of a call with an expiration between 30 and 60 days, and a strike between 5% and 20% above the current stock market price.
Take a screenshot, making sure that the price, name of the stock, and expiration are clearly visible.
Using the material of lesson seven, write a new python code following these steps:
[20 points]
● Price the option that you have just selected using a Montecarlo simulation with the control variates method
● Make sure that the standard error of the simulation is lower than 0.1. hint: you need to simulate a high number of paths
● Include the screenshot you took before in the Jupiter notebook by creating an empty Markdown cell, and drag-and-drop the image file into the empty Markdown cell.
● Using a print statement, show the difference between your price and the market price ( example: print(f"the market price of {stock} is {price} and the Montecarlo simulation price is {montecarloprice}")
● Remember to include in the notebook only the code that is strictly necessary in order to price the option.
● The model’s interest rate is equal to zero.
● Add comments above every cell of code, to describe accurately what your code does.
● A difference between the Montecarlo model and market price is normal. but if it is too big, you have probably used the wrong parameters. For example, if your price is 10$ while the market price is 50$, you should check your model again.
●
2. Build an investment strategy to invest in a stock for no more than four months a year.
Write the appropriate python code with the following characteristics: [20 points]
● One single holding period per year is possible, therefore, we are in position only in consecutive months.
● You cannot choose apple, Microsoft, Google or Facebook.
● try to build a profitable investment strategy taking advantage of a possible stock seasonality.
● You are free to modify the code we have used in the lectures, for example, you can add charts, to better show your results and analysis.
● The code has to include only what is strictly necessary to answer the question, and every cell of the code must be commented.
● If the stock you have selected does not show any seasonality, pick a different one.
● If two strategy looks similar, prioritize that one with the equity that looks steeper and smoother.
● The backtest has to be at least 10 years long, the last 3 of which, are more important, because being more recent, are more likely to be similar to the nearest future..
● The profitability of the strategy will influence the final mark of the question.
●
● Comment the results (just a few lines, no more than 100 words, in a markdown cell)
3. File workspace.txt contains some trading rules that you will use in the following questions.
Modify it according to it to the following points :
[5 points]
● Initialize objects to represent the three advanced moving averages Alma, Kama and Frama.
● Add the piece of code that allows you to trade each time exactly 10000 USD of a given security.
4. Using any of the rules contained in the attached file workspace.txt, build and test two profitable trading strategies.
The strategy must have all characteristics below:
[25 points].
● The backtest has to be at least 10 years long, the last 3 of which, are more important, because being more recent, are more likely to be similar to the nearest future..
● The strategy can trade long, short, or both long and short.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of