Finance_Using_Python_or_Anaconda

Job ID: 33152640

Budget: €44 – €88 EUR

Imagine that you do not want to use your own money to invest (unlike in
Task 2). As a result, you decide to use a long-short portfolio strategy. If you
each quarter go long the best performing industry portfolio and short the
worst performing industry over the last 3 months with £300 each:
• How much money will you have amassed at the end of your
data period?
• What is your average annual return of the long-short
portfolio?

In this task consider a put option with:
S0 = 100 E = 100 Rf = 4% Sigma = 20% T = 5 m = 200
(Each group should use different data; I will provide new data with the
group formation).
Use the binomial option pricing model to check the sensitivity of the option
price to changes (each change separately from the other changes) in the
parameters. What if:
1. Rf ranges from 0.01 to 0.10 in steps of 0.001
2. Sigma ranges from 0.01 to 0.5 in steps of 0.1
3. m ranges from 5 to 1000 in steps of 10

Define a function called european_put() that prices a put option.
1. Test that it is able to price a put option correctly. With the following
parameters, the price of the put should be 3.44… Here are the
inputs: european_put(S0=15, T=2,m=4,rf=0.05,E=18,sigma=0.3)
2. Graph the convergence of the binomial put option price to the BlackScholes price for the put option with time steps ranging from 2 to
500 for the option above. For completeness I have included the
function for the Black Scholes put option in the assignment.
3. Graph the pricing error (Binomial Price/Black-Scholes Price minus
1) on the y-ax
S0 ranges from 50 to 150 in steps of 1
For each change, graph the option price (y-axis) against the parameter you
are changing (x-axis). What do we learn about option prices from this
analysis? Explain in detail with the underlying economic intuition for these
effects!
The put-call parity is a condition that must hold for arbitrage to be ruled out
in option markets. The underlying idea is that if two different investment
positions have exactly the same payoff, then they must also have the same
price. We can state it as follows:
S + P = PV(K) + C
Where:
P = Price of a European put option (with strike price K)
S = The underlying stock price
PV(K) = Present value of the strike price of the option
(i.e. a bond investment equal to the strike price)
C = Price of a European call option (with strike price K)
We can of course rearrange the terms and compute the price of for
example a call option using the put-call parity as:
C = P + S – PV(K)
The calculated price should be equal to that from using the binomial tree to
compute the call price.
a) Explain graphically and with words how the put-call parity works. Write
maximum 2/3 of a page of text. Also make sure to visualize the
equivalence graphically. (Max 300 words)
b) Write a function that uses the put-call parity to compute the price of a
European call option. Verify that the outcome is identical to pricing the call
option directly with the binomial tree (up to approximately 6 decimals or
so).
• Design, implement, and evaluate Python programming that involve
advanced manipulation of data (reading/writing data from/to files
and databases, transforming and summarising data, extracting
relevant subsets of data, building data visualizations)
• Construct portfolios and price options using Python
• Design and implement predictive models using linear regression on
example datasets
Presentation Requirements:
• In this coursework your task is to solve a number of different
problems. Solve them all in a Jupyter notebook which you are
required to submit. All your code needs to run in the computer lab
(MB477, where we have our lectures).
• Make sure everything is well explained and that the code is
commented nicely.
• Submit only the Jupyter Notebook (the .ipynb file).
• DO NOT HARDCODE numbers in for loops etc. Use variables to
capture these and use the variables.