Professional Documents
Culture Documents
Ps 01
Ps 01
Assignment 1.
Rules:
Please work in your team: no free-riding allowed! State student IDs of all team members in the
Collaborators list in the cell below.
Solve the problems step by step (writing formulas in Markdown or in Code) clearly showing how you
derived your answers. You can either use Code cells with comments (recall that to start the line with a
comment just type #), or you can combine explanations in Markdown cells with mathematical
manipulations in Code cells.
Submit one assignment per team in Jupiter Notebook (that is, select a designated team member who will
submit the assignment; this team member will also receive the graded assignment back and will share the
feedback with the team members). If several assignments per team are submitted, we will randomly select
one for grading.
To submit the assignment: 1 - Save , 2 - Validate, and 3 - submit using "Assignment" form in the menu
Due Date
23.11.2018 before 09:00:00 (CET)
Instructor
Prof. Dr. Grigory Vilkov (g.vilkov@fs.de)
Teaching Assistant
Mr. Tural Karimli (t.karimli@fs.de)
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 1/12
11/23/2018 ps_01
Collaborators=[1 ,2, 3, 4, 5]
print(Collaborators)
[1, 2, 3, 4, 5]
Hint: Since Python is sensitive to whitespace, a note about formatting. Although the above template is
indented, your code should start at the beginning of the cell. Hints and tips in these assignments will
hereafter assume that you know the formatting conventions of Python.
Forwards
Problem 1. (1 point)
Stock price of XYZ Inc. is trading at 56 USD, and, and is expected to pay 10 USD of dividend in the next two
years (5 USD at the end of each year). The term structure of interest rates is flat at 3% p.a. (annual
compouding). The given two-year forward price on the stock is 53 USD. Is there an arbitrage? If yes, then what
is the no-arbitrage 2‐year forward price on company XYZ's stock and what strategy you can use to make
riskless profit?
Following no-arbitrage principle (i.e. having the parity between spot and forward prices) for the above problem
we should use the folmula below:
where denotes forward price, is stock price, is risk free interest rates, is time to maturity, define
present value and is dividend to be paid. If price is different from the one we get using the above formula then
it can be said that there is an arbitrage opportunity.
Based on the result below we can tell there is an arbitrage in the market. You can borrow funds, buy the asset
now, and short forward. Because the company pays periodic dividends, you have to make adjustments for it,
and either borrow for three different periods to use dividends to pay back parts of the debt, or borrow right
away one amount until the end of year two and re-invest dividends at riskfree rate.
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 2/12
11/23/2018 ps_01
Problem 2. (1 point)
A one-year long forward contract on a non-dividend-paying stock is entered into when the stock price is 40
USD and the risk-free rate of interest is 10% p.a. with continuous compounding.
Hint: You can call math library using command: import math. Then you can use math.exp() to compute
exponential function.
Part a.
What are the forward price and the initial value of the forward contract? (0.5 points)
where is forward price, is sport price on investment asset, is risk free rate and is time to maturity.
Part b.
Six months later, the price of the stock grows to 45 USD and the risk-free interest rate is still 10%. What are the
forward price and the value of the existing long forward contract you bought six months ago? (0.5 points)
Delivery price in the contract is 44.21 USD. The value of contract, , after six months (time years) can
be calculated using the formula below:
The new forward price is calculated in the same way as in part (a).
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 3/12
11/23/2018 ps_01
In [4]: p6=45
t6=0.5
Value = p6-Ff*math.exp(-rr*t6)
print('Value of contract after six months: '
+str(round(Value, 2)))
Futures
Part a.
Given the above information, what should be the price of one futures contract? (0.5 points)
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 4/12
11/23/2018 ps_01
In [1]: # inputs
d = 5
p0 = 200
r =0.08 #treasury rate
t = 1
# PV(D)
PVd= d/(1+r)
Part b.
An investor buys a futures contract and later on the same day the stock price decreases by 7%; what will be, if
any, the change in the futures price? (0.5 points)
In [2]: der=0.07
F_n=(p0*(1-der) - PVd)*(1+r)**t
print('Futures price will drop to: ' +str(round(F_n,2)) +'.')
Part c.
As a result of the company stock decrease, will an investor that has a long position in one futures contract of
this company incur a gain or a loss? Why? What will be the amount of this gain or loss? (0.25 points)
In [3]: # An investor with a long position in one futures contract agrees to buy
1,000 stocks
# of the company in one year at $211.
# Therefore this investor will benefit only if the futures price increas
es.
# In this case, the futures price has decreased and the investor will th
erefore realize a loss of:
Loss =(F_n-F)*1000
print('Investor will experience an unrealized loss of '
+ str(round(Loss,2)) +'.')
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 5/12
11/23/2018 ps_01
Part d.
What must be the initial balance in the margin account? Following the stock decrease, what will be, if any, the
change in the margin account? Will the investor need to top up the margin account? If yes, by how much and
why? (1.25 point)
MarginInitial = Notional*F*MarginInRate
print('The initial margin: ' + str(round(MarginInitial,4)))
# maintanance margin
MarginMaint = Notional*F_n*MarginMaintRate
print('Maintanance margin at new price level: ' + str(round(MarginMaint,
2)))
# deficit to be covered
Deficit = MarginMaint - MarginAccCurr
print('Deficit to be covered by client: ' + str(round(Deficit,2)))
print('If the client does not pay in the margin the broker will close ou
t \
part of the investor’s long position to meet the \
required maintenance margin.')
Part e.
Given the company stock decrease, what is the percentage return on the investor’s initial investments? Is it
higher, equal or lower than the 7% company stock decrease? Why? (0.25 points)
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 6/12
11/23/2018 ps_01
Return = Loss/MarginInitial
In [7]: -15120/21100
Out[7]: -0.7165876777251184
Part a.
Assuming the interest rates and the current exchange rate given above are correct, what should be the futures
price of 1 GBP in EUR according to the interest rate parity? (0.25 points)
Part b.
You realize that given the above data, you can benefit from an arbitrage opportunity that would allow you to
raise the necessary capital at no cost. Describe the necessary actions (and associated cash flows) you need to
take now and in one year in order earn 8.0 millions EUR in one year at no cost. (2 points)
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 7/12
11/23/2018 ps_01
This is possible by simultaneously lending, borrowing, and buying an underpriced forward. We can come up
with an investment structure that requires an initial outlay of 0 Euros and yet will a benefit of approximately
8,000,000 Euros in the future.
You need to compute the profit in terms of X and then find X that gives you 8 million EUR for free.
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 8/12
11/23/2018 ps_01
X = 1
NetGBP = FwdGBP+LoanGBP
print('Net CF in GBP: ' + str(NetGBP))
NetEUR = FwdEUR+LoanEUR
print('Net CF in EUR: ' + str(NetEUR))
# we see that for notional X = 1 GBP we receive some profit at t=1 for s
ure
# without paying anything at t = 0
# we need to determine how large X should be for this profit to equal to
8 million EUR
Notional = 8000000/NetEUR
print('We need to start with ' + str(round(Notional,2)) + ' notional in
GBP')
Options
Problem 5. (1 point)
Assume that now the price of stock is 200. In the next period price can be either 220 or 180, and you estimate
probability of an upmove as 0.7. Risk-free rate per period is 3%.
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 9/12
11/23/2018 ps_01
Part a.
What is the price of call with strike K=200? Please use the replicating portfolio approach to answer the question
(0.5 points)
Replicating:
In [29]: S0 = 200;
Su = 220;
Sd =180;
K = 200;
R0 = 1;
R1 = 1.03;
delta = (Su-K)/(Su-Sd);
B = ((Su-K)-Su*delta)/R1;
C = delta*S0 + B*R0;
Part b.
You observe on the market that the ATM call is traded at 13. How would you construct an arbitrage strategy
under such conditions? Please be specific on the positions. (0.5 points)
The call on the market is overpriced, so we need to sell it, and replicate a long position by underlying
instruments. Knowing the replicating portfolio composition from the previous question, we will
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 10/12
11/23/2018 ps_01
Problem 6. (2 points)
A stock price is currently 100 USD. Over each of the next two six-month periods it is expected to go up by 10%
or down by 10%, and you estimate probability of an up-move as 0.7 for each period. The risk-free interest rate
is 8% p.a. with continuous compounding. Use risk-neutral valuation approach.
Part a.
What is the value of a one-year European call option with a strike price of 100 USD? (1 point)
# payoffs are computed from stock prices in final states and the strike
S0 = 100
K = 100
Suu = 100*up**2
Sud = 100*up*dn # the tree is recombing so that up-down and down-up resu
lt in the same state
Sdd = 100*dn**2
Cuu = max(0,Suu-K)
Cud = max(0,Sud-K)
Cdd = max(0,Sdd-K)
# payoffs by states
print('Payoffs by states: ' + str(round(Cuu,4)), str(round(Cud,4)), str(
round(Cdd,4)))
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 11/12
11/23/2018 ps_01
Part b.
What is the value of a one-year European put option with a strike price of 100 USD? Verify that the European
call and European put prices satisfy put–call parity. (1 point)
# payoffs by states
print('Payoffs by states: ' + str(round(Puu,4)) + str(round(Pud,4)) + st
r(round(Pdd,4)))
http://localhost:8888/nbconvert/html/Dropbox%20(main)/SEMINARS/Courses/zFS/MoF-FinProductsModelling/zTA/2018-FPM/Assignments/ps1/ps_01.ipynb?do… 12/12