Candidate  Session 
ID : 56 Mail : hh820731@gmail.com Phone : Degree : Msc Quantitative Finance School/University : Imperial college Experience : 1 Your comment : Candidate comment: . 
ID session : c4kg Started : 20170502 21:42:09 Finished : 20170502 22:28:41 
John Lewis

Global score 13 / 16 
1. Quantitative Finance
11. Details MCQ
Question  Candidate answer  Correct answer  Marks 

Question 1 "Consider 3 Call options of the same maturity T and with different strikes K1=10, K2=20 and K3=30.If we buy today one call with strike K3 and one with strike K1 and sell two call options with the strike K2, should this cost us money or should we paid for that ? ":  Yes, this must cost us money.  Yes, this must cost us money.  1 
Question 2 "Compute where W is a Brownian motion and ? is the volatility. Select the from the following: ":  c  c  1 
Question 3 "Compute the following covariance for 0 <s <t, select the right answer from the following: ":  b  a  0 
Question 4 "Compute the following covariance for 0 < s < t: Select the right answer from the following: ":  c  c  1 
Question 5 "Compute the following integral for a given x : Select the right answer from the following: ":  a  c  0 
Question 6 "Suppose X is a random variable with : What is the constant C that minimizes: Select the right answer from the following: ":  d  a  0 
2. [C++] VAR ,Expected shortfall
21. Subject coding VaR computation test

22. Unit test cases
Main File: Risk.h // Histirical VAR #include <iostream> #include <iomanip> #include <vector> #include <math.h> #include <stdlib.h> #include <time.h> #include <algorithm> using namespace std; //VAR compute the historical VAR for one day for the portfolio with Pnl as daily pnl vector // pnl is the daily pnl vector // threshold is the var thresold ex 0.95 double var(vector<double> pnl,double threshold) { std::sort(pnl.begin(),pnl.end()); size_t SizeSample = pnl.size(); double rank_min = floor((1threshold)*SizeSample); return pnl.at(rank_min); return 0 ; } 
3. [C++] Implied volatility
31. Subject coding Black Scholes Implied vol [C++]

32. Unit test cases
Main File: Volatility.h // Implied volatility BlackScholes #include <iostream> #include <iomanip> #include <vector> #include <math.h> #include <stdlib.h> #include <time.h> #include <algorithm> #include "NormalFunctions.h" using namespace std; //BSImpliedVol compute the implied volatility of an european option using Black Scholes model // S Spot Price // optPrice market option Price // v Volatility // T Maturity in Years // rf Interest Rate // q Dividend yeild // PutCall 'P' for put and 'C' for call // Nsims Number of simulations double BSImpliedVol(double S,double K,double optPrice,double T,double rf,double q,char PutCall) { size_t N = 40; size_t i(0); double x = 0.; double y = 1.; double z = 0.; double sigma = 0.; if(PutCall == 'C') { for(; i < N; ++i) { z = 0.5*(x+y); double temp_v = z/(1z); if(optPrice > BS(S,K,temp_v,T,rf,q,'C')) { x = z; } else { y = z; } } z = 0.5*(x+y); sigma = z/(1z); } else if(PutCall == 'P') { for(; i < N; ++i) { z = 0.5*(x+y); double temp_v = z/(1z); if(optPrice > BS(S,K,temp_v,T,rf,q,'P')) { x = z; } else { y = z; } } z = 0.5*(x+y); sigma = z/(1z); } return sigma; } 