Market risk and portfolio theory - MATH0094
In class assesment
November 23 - 2020
Time: 2h 15 minutes. Marks for each question of each part are indicated in square brackets.
Instructions
The exam has to be completely done in the corresponding CoCalc folder. Apart from this you only require pen and paper.
You can use all the material in the course as well as the Python documentation available from the Help menu in CoCalc.
Everything you submit must be your own work. In particular, you must not post questions on online forums, contact your peers, or receive any other form of direct external help.
You must keep your Zoom video connection at all times
You can only ask to clarify something on the paper. No request for help is accepted unless an unexpected technical problem arises.
If you have questions, only ask them by private message in Zoom or through the chat button on the top-right corner of this notebook.
For every function you code, make sure to write error management routines to respond to errors when the parameters are not of the expected type or value.
You can add as many cells as needed. Bear in mind that some of the cells you start with are 'read only': you cannot modify these cells
I have provided some tests to help you. You can run them by clicking on the 'validate' button (no errors, means you pass the pre-delivered tests). You are encouraged to complement with your own tests (the provided tests are only to help and not exhaustive).
Explain your code using both comments and Markdown cells as needed.
Important: You must accept to solve this assessment in accordance to the above instructions and UCL's code of honour. Please type the following sentence in the next cell: "I will answer this paper in accordance with the given instructions and UCL's code of honour".
I will answer this paper in accordance with the given instructions and UCL's code of honour
Question 1 [60 marks]
Consider a market with two assets: a risk-free asset with constant return for all , and an asset with i.i.d. binomial returns such that
Assume further that .
1.1. Explain if this market is complete and/or arbitrage-free.
[10 marks]
The market is not complete, because there are only two assets in the market, other assets which gross return has other distributions can not be replicated by these two assets. This market is arbitrage-free since we can not construct an arbitrage portfolio with these two assets.
1.2. Let be a measurable function. Write a function that, given and the model parameters calculates
[10 marks]
1.3. Write a function that, given the value of a random variable (expressed as a two-dimensional array) returns a one-period strategy that replicates it (or a value error if it cannot be replicated). The strategy must be given in terms of the amount invested on each asset.
[15 marks]
1.4. Assume that |a|<r for this market model. Write a function that, given a time and the initial value of the asset returns two vectors: one with the possible values that can attain, and a second with their corresponding probabilities.
Hint: Recall that it might help to use this expression and use the binomial distribution (st.binom)
[15 marks]
1.5. Explain whether the process is a martingale. Justify your answer either mathematically or with a Python code.
[10 marks]
It is a martingale
Question 2. [40 marks]
A butterfly option centred at and width is a contingent claim that pays at a given date a payoff where
2.1. Implement the butterfly payoff. Then, plot it for the case when d=0.1, x0=1 for values of between 0.8 and 1.2. [10 marks]
Write the code for the plot below:
2.2. We want to obtain the arbitrage-free price of a contingent claim having as payoff a butterfly option centred at and width for the market model on Question 1 with .
To simplify, the function receives the discrete distribution of expressed as two vectors (as in the solution of Q.1.4.).
[15 marks]
2.3. Assume we are still working under the market model of Question 1. The following cell contains the definition of a function 'mystery'. Explain what the function does, what are its outputs, and their financial interpretation.
[15 points]
YOUR ANSWER HERE