联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2024-03-13 11:43

CQF Exam One

January 2024 Cohort

Instructions

All questions must be attempted. Requested mathematical and full computational workings must be provided to obtain maximum credit. Books, lecture notes, CQF material may be referred to. Help from others is not permitted. Exam One computation in Excel is acceptable but we strongly recommend to implement in Python.

1. Your upload must be two files: E1 YOURNAME REPORT.pdf and E1 YOURNAME CODE.zip (to include code, any other files). YOURNAME as registered on CQF Portal. The signed declara-tion can be included inside ZIP, or page inserted at the start of PDF.

2. You must prepare PDF REPORT that integrates workings, numerical answers and plots in the or-der of questions. Python notebook can be edited into a report, but ‘Python code+output only’ will receive marks deduction.

3. Where tasks explicitly ask to organise results into a table or for the specific plot – that must be provided and explained.

Python notebook – remove unnecessary output, draft code and draft comments; save Python notebook to HTML first, and then print as PDF. Excel with handwritten inserts has to be printed as PDF report.

Implementing exam questions is part of the task, that includes making operational sense of the question. Please make a good use of lecture material, tutorials and exercise solutions. Where formula not given, it is up to your quant judgement to identify which formula to use. Tutor is unable to discuss your numerical answers or provide hints beyond ones given on the exam paper.

Exam submissions and file names which do not follow these instructions might take extra processing time.

Marking Scheme: Q1.1 10% Q1.2 16% Q2 10% Q3 20% Q4.1 14% Q4.2 10% Q5 20%.

Total is 100%.

Optimal Portfolio Allocation

An investment universe of the following risky assets with a dependence structure (correlation) applies to all questions below as relevant:

Question 1.1. Consider the min variance portfolio with a target return m.

? Formulate the Lagrangian and give its partial derivatives.

? Write down the analytical solution for w? optimal allocations – no derivation required.

? Compute allocations w? and portfolio risk , for m = 4.5%.

Question 1.2. Instead of computing other optimal allocations by formula, let’s conduct an experiment.

? Generate above 700 random allocation sets: 4 × 1 vectors. Each set has to satisfy the constraint w′1 = 1. In fact, once you generate three random numbers w1, w2, w3, the 4th can be computed.

? Weights will not be optimal and can be negative.

? Compute μΠ = w′μ and  for each set.

? Plot points with coordinates μΠ on the vertical axis and σΠ on the horistonal axis.

Identify the shape and explain this plot.

Question 2. VaR and ES sensitivities are computed with regard to each asset i, individually. For the given allocated portfolio below, provide a summary table with computed  and .

Confidence c = 99%, and Φ?1 (1 ? c) Factor is computed with Normal icdf. Signs in formulae are as intended and will not be discussed.

Hint: this is a task on reading the formulae in order to compute. Bold notation means vector computation and ()i refers to i-th element, no further hints given.

Products and Market Risk

Question 3. Implement the multi-step binomial method as described in Binomial Method lecture with the following variables and parameters: stock S = 100, interest rate r = 0.05 (continuously compounded) for a call option with strike E = 100, and maturity T = 1. European payoff.

? Use any suitable parametrisation for up and down moves uS, vS.

? Plot 1: compute option value for a range of volatilities [0.05, . . . , 0.80] and plot the result (volatility at axe X, and option value axe Y). Trees to have a minimum four time steps.

? Plot 2: now, set σimp = 0.2 and compute and plot the value of one option, as you increase the number of time steps NT S = 4, 5, . . . , 50.

Hint: This is a computational problem best coded in Python. You can visualise 1-2 trees (optional) but especially in case of Excel computation, do not provide multiple pages of individual pricing trees.

Question 4.1. Answer this question with step-by-step mathematical derivation and make no omitted transformations, variable changes: each next line must mathematically follow from the previous line.

Begin with the definition of Expected Shortfall as a conditional expectation (which implies integration) and obtain ES computation formula for the Normal Distribution

ESc(X) = E[ X | X ≤ VaRc(X)]

where VaR(X) = μ + Φ?1 (1 ? c) × σ.

Handwritten working must not be a rough work: use ample and clear spacing between lines, no cross-ings/corrections. Submitting copied in formulae will score less than 25% of marks. If not using Markdown LaTeX, insdert a scan/photo of workings (pdf) into Python notebook or final PDF report.

Question 4.2. Compute the standardised value of Expected Shortfall for the range of percentiles [99.95; 99.75; 99.5; 99.25; 99; 98.5; 98; 97.5]. Organise results into a table.


Hints: Normal pdf is indifferent to the input sign, so the results are the same for upper or lower percentiles.

Example: ?(Φ?1 (1 ? c)) and ?(Φ?1 (c)) give ?(?2.33) and ?(2.33). 1 ? c refers to 1 ? 0.9995 and so on.








版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp