7QQMO117 Computational Finance, Kings Business School -

Post New Homework

Computational Finance

Question 1

Briefly introduce the theoretical framework and the computational approach. You have a budget of £ 100,000 to invest. By investing on the following:

i) Standard & Poor 500
ii) Nikkei 225
iii) NASDAQ Composite Index
iv) NASDAQ 100 index
v) Down Jones Industrial Average
vi) Coinbase Ethereum
vii) Coinbase Bitcoin

find the asset allocation for the optimal portfolio, i.e. efficient and maximizing the Sharpe Ratio, within the mean-variance Markowitz approach.
Use daily data on prices on a time window starting the 2nd of February 2021 and ending the 27th March 2023.
Find also the risk and gross return (without transaction costs) for the optimal portfolio. Finally, compute 15 efficient portfolios and plot the efficient frontier to be compared with the profile of the Sharpe ratios.
Find the budget allocation for all the efficient portfolios and the number of shares for the optimal portfolio.
Automate the entire algorithm by using a commented Matlab Live file and automate the procedure to produce a figure comparing the efficient frontier and the corresponding Sharpe ratio profile.
Comment each step of the procedure as well as the results. Add also short comments regarding each Matlab command used for coding.
Propose, and possibly implement, possible improvements to the in-class approach.

Hint (on coding):
• Download daily prices from the database FRED for the given indices (use a cycle to download the time series all at once) in the given time window.
• Convert the prices into returns.
• Create a Portfolio object in which the tickers for the different indices are collected.
• Compute the proxies for risk and return using the mean-variance Markowitz approach.
• Set the constraint for a long, fully-invested portfolio
• Compute the portfolio maximizing the Sharpe ratio
• Extrapolate risk and return of the efficient portfolio maximizing the Sharpe ratio (optimal portfolio)
• Plot the efficient frontier by optimizing 15 portfolios together with the optimal portfolio
• Recover the weights for the efficient portfolios and multiply by the budget.
• Recover the weights for the optimal portfolio, multiply by the budget and divide by the current prices of the securities.
• Create a function to compare the efficient frontier and the profile for the Sharpe ratio and call this function into the code to create the figure that compares the two profile (add markers for the portfolios, the title for each of the two subplot and x-labels.

Question 2

Briefly introduce the theoretical framework and the computational approach.

Use the Monte Carlo simulation technique to evaluate the 30 days 5% VaR and the 30 days 5% CvaR (or Expected Shortfall) for S&P500 and the Coinbase Bitcoin by using the data of the last 2 years up to today (use 10000 simulations).
Show the simulated prices and returns.
Comments each step of the procedure as well as the results. Add also short comments regarding each Matlab command used for coding.
Propose, and possibly implement, improvements to the in-class approach.

Hint (on coding):
• Download daily prices from the database FRED.
• Set the number of replications and the number of simulated days.
• Evaluate continuously compounded returns, mean and standard deviation.
• Code the Geometric Brownian Motion, trying to lower the computational costs.
• Evaluate the 5% VaR.

• Plot the histogram of returns by showing also the VaR
• Use the distribution Fitter App to fit a normal distribution of the frequency of returns.
• Generate the code that is fitting the normal distribution on the data.
• Save the fitted normal distribution.
• Invert the cumulative of the fitted normal distribution to compute the CvaR
• Comment on possible improvements

Post New Homework
Captcha

Looking tutor’s service for getting help in UK studies or college assignments? Order Now