Assignment 1 - solution
Question 1. [40 points]
An investor has utility function for .
1.1. Implement this utility function [10 points]
1.2. Define now a function 'u_vec' that receives a numpy array or a list and a real p larger than one and returns an array with the utility function above applied entry-wise [10 points].
1.3 Create a function that calculates the coefficient of absolute risk aversion of this function for a given real 'x' [10 points]
1.4. Comment on the risk behaviour of an investor with this function [10 points]
Depends on the coefficient : If , then the utility function is just linear. If , then the function is risk-averse for positive wealth and risk-seeking for negative wealth. If then is the opposite.
Question 2. [20 points]
Consider a market model in one-period with three assets: a risk free asset with unit return, and two risky assets with log normal returns
where , and the Gaussian random variables are correlated
2.1. Explain if this market is complete [10 points]
The market is incomplete. Note that in one period the set of all attainable claims is only the linear combination of the payoffs of the three assets. But this does not cover integrable wealth profiles (like or )
2.2. Create a function that returns a sample of a given size of (, ). [10 points]
Question 3 [40 points]
3.1. Let be a strategy (in terms of percentages) in a market with three assets (one risk-free and two risky as in Question 2). Let be the components of the strategy on the risky assets. Define a function that returns the expected utility for an investor with a utility function as in Question 1 and initial wealth , after applying the strategy represented by (recall that the investment on the risk-less asset can be deduced from the budget constraint). The function should also receive a sample of . [20 points]
3.2. Write a function that approximates the solution of the optimal investment problem in the market defined in Question 2, for an investor as described in 3.1.. The function should return a couple, the strategy (as a vector of weights for the two risky assets) and the value of the utility for the optimal portfolio. If no solution is found, 'None' should be returned. [20 points]