CS计算机代考程序代写 finance algorithm AI STAD70 Assignment 1 Solutions

STAD70 Assignment 1 Solutions
1. The following plots present snapshots of the 10-level order book (10 best bid/ask prices and their associated volumes) for Amazon stock at 5minute intervals throughout the trading day on June 21 2012.
2. A stock has an expected annual log-return of 8% and an annual volatility (i.e. st. deviation of annual log-return) of 20%. You want to model the daily log-return using a Normal Random Walk model. What should be the mean and variance of the Normal distribution of the daily log-returns, so that your model matches the above annual parameters? Assume that a calendar year has 252 trading days over which we have daily returns.
Denote the mean and variance of the daily log-returns  &  2 , respectively. We have:
r 2528% .08 0.00031746=.031746%
r  r   year1  day1
day252
r  r  r   2522 (20%)2   0.01259882=1.259882%
252
.2
by iid
 year1  day1 day252 252
  2  (.2)2  0.01587302% 252

3.
Assume that the daily log returns on a stock with current price S0 100 are i.i.d. with a Normal distribution with mean 0.0003 and standard deviation 0.01.
a. Calculate the probability that the price will be above $120 after 50 days.
b. Calculate the probability that the price will increase in 30 or more of the next 50 days.
(Note: You will have to use R functions (e.g. pnorm / pbinom) or statistical tables to find the numerical values of these probabilities.)
c. Create 5 price paths over 50 days from this model and plot them together.
Download the last 10 years (Jan 1 2006 – Dec 31 2015) of daily closing prices for Apple, using the command get.hist.quote() from the tseries package in R.
a. Plot the “closing price” and the “adjusted closing” price of APPLE
We have S  S expR , where R ~ N .0003t, (.01)2t. Thus t0tt
S50 1201 S0 exp(R50)120 R50 log(120 100)
1 Z  log(120 100).00035012.3662840.008983824
  .0150 
The probability the price will increase on any given day is St  St 1   St St 1  1 
 log(S S )  0 .0003.01Z  01 0.0003  0.5119665. The probability
t t1    .01 
that the price will increase in at least 30 out of 50 days is equal to X  30, where X ~ Binomial(n  50, p  0.5119665) . Using R we find
X 301 X 290.1346917
4.

The big drop in the closing price in 2014 was due to a 7-to-1 split on June 9, 2014. The adjusted closing price has smoothed out this event.
b. Calculate and plot the returns based on the “adjusted closing” price.
c. Consider a simple momentum strategy, where
 you buy & hold APPLE stock for 5 days, if the price has increased by more than
10% in the last 20 days, and

 you (short-) sell APPLE stock over 5 days when the price has decreased by more than 10% over the last 20 days
Calculate and plot the daily and cumulative returns of this strategy.
d. Find the maximum drawdown of the strategy, i.e. the biggest drop in cumulative returns from their highest point; see https://en.wikipedia.org/wiki/Drawdown_(economics). You can use the maxdrawdown() function from the tseries package.
The red line represents the maximum drawdown.

STAD70 Assignment 2
This assignment covers the following chapters from the textbook: §5: sections 5.1-5.5, 5.14
§7 : sections 7.1-7.8
1. Prove that the maximum likelihood estimator (MLE) of the tail index of the Pareto ax(a1) n x
distribution f(x)  , xxmin isgivenbyˆn i1ln i ,wherex1,…,xnisan xmin xmin
i.i.d. sample & the parameter xmin is known.
2. Consider the random variable Z  X / Y , defined as the ratio of two independent exponential random variables X,Y ~ Exp( 1) with rate  1. Show that Z follows a heavy-tail distribution and find its tail index.
(Note: it is quite common for products of RV’s to lead to heavy tail distributions. For example, this is the case with representation of the Student-t distribution as a mixture)
The log-likelihood is
(a)logn f(xi;a)n logf(xi;a) i1 i1
n ax(a1)  n
 log i  log(a)(a1)log(x)alog(x )
i1 xa i1  min 
i min
 nlog(a)  a log(xmin ) (a 1)n log(xi ) i1
Differentiating w.r.t. a and setting equal to 0, we get:
(aˆ)0n1log(x )n log(x)01log(x )1n log(x) aˆ mini1 i aˆ min ni1 i 
 aˆ 
1n
  aˆ  1n nx
  i   i1xmin
n i1log(x)log(x ) i min
log
If X,Y ~ Exp( 1) then f (x)  ex & F (x)   eudu  ex and similarly for Y . We have
XX
FZ(z) Zz X/Yz X/Yz|YydF(y)
x
y0 Y
 Xyzf (y)dy eyzeydy ey(z1)dy y0 Y y0 y0
FX (yz)
 ey(z1) 1 1
 z1 z1z1  y0
Since F (z)z11  f (z) d F (z)z12 Z ZdzZ
heavy tailed with   1 .
z(1)
, the distribution of Z is

3.
Download from YAHOO! Finance the daily adjusted closing prices, from Jan-1-2006 to Dec-31-2015, for the following 5 stocks:
i. Goldcorp Inc (G.TO)
ii. Toronto-Dominion Bank (TD.TO)
iii. Husky Energy Inc (HSE.TO)
iv. Bank of Montreal (BMO.TO)
v. Westjet Airlines Ltd (WJA.TO)
a. Calculate the daily net return, and plot their time-series plot & their Normal QQ plot.
Which of the stylized return facts can you see?
The returns exhibit volatility clustering and heavy tails.
b. Find the sample mean & the sample variance-covariance matrix of the returns.
$MU
$SIGMA
G.TO TD.TO HSE.TO BMO.TO WJA.TO
2.761330e-04 4.667229e-04 2.831559e-05 3.626043e-04 4.303548e-04
G.TO 9.010714e-04
TD.TO 2.439491e-05
HSE.TO 1.538317e-04
BMO.TO 1.226203e-05
G.TO
TD.TO
2.439491e-05
2.115419e-04
1.080607e-04
1.699787e-04
HSE.TO
1.538317e-04
1.080607e-04
3.413493e-04
1.004636e-04
BMO.TO
1.226203e-05
1.699787e-04
1.004636e-04
2.254886e-04
WJA.TO
2.211874e-05
8.732763e-05
5.939075e-05
8.016028e-05
WJA.TO 2.211874e-05 8.732763e-05 5.939075e-05 8.016028e-05 3.965160e-04
c. Fit a univariate t-distribution for each stock’s returns separately, and report the resulting values (use the fitdistr function from the MASS library).
mu sigma df
G.TO -2.335393e-04 0.020440326 3.584556
TD.TO 5.415130e-04 0.007996638 2.519825
HSE.TO -6.204803e-05 0.012676159 3.619431
BMO.TO 5.813425e-04 0.007300026 2.124167
WJA.TO 1.704497e-04 0.013675077 3.475946

d. Fit a multivariate t-distribution to the all 5 stocks’ returns, and report the resulting values (use profile likelihood with the mvt function from the mnormt library).
$MU
G.TO TD.TO HSE.TO BMO.TO WJA.TO
8.826287e-05 5.299548e-04 2.871874e-04 5.381549e-04 2.972221e-04
$SIGMA
G.TO
TD.TO
1.540940e-05
8.525521e-05
4.546056e-05
6.487097e-05
3.306121e-05
HSE.TO
7.625450e-05
4.546056e-05
1.811069e-04
4.350895e-05
2.589674e-05
BMO.TO
1.373749e-05
6.487097e-05
4.350895e-05
8.514742e-05
2.981132e-05
WJA.TO
1.710504e-05
3.306121e-05
2.589674e-05
2.981132e-05
2.185427e-04
G.TO 4.779668e-04
TD.TO 1.540940e-05
HSE.TO 7.625450e-05
BMO.TO 1.373749e-05
WJA.TO 1.710504e-05
$df
[1] 3.23
4.
We will now compare the different return distribution approaches in a practical investment setting.
a. Assume you invest all your wealth in G.TO for a year (252 days). Simulate 5,000
realizations of daily returns from each of the following models:
 Returns are i.i.d. Normal with parameters as in 1.b
 Returns are i.i.d. t with parameters as in 1.c
 Returns follow GARCH(1,1) model (use the garchFit function to fit the model & the
garchSim function to simulate from it; both in the fgarch library)
Calculate the maximum drawdown of each realization, and create a histograms of the simulated maximum drawdowns from each model (3 histograms total).

The GARCH model is the only one that takes the time-dependence of returns (i.e. volatility clustering) into account; both Normal & t distributions assume i.i.d. returns. As a result, the GARCH model puts more weight to small MDD, but also a longer tail for large MDD (since small/large absolute returns tends to cluster).
b. Assume you distribute your wealth evenly among the 5 stocks for a year (252 days). Simulate 5,000 realizations of the equally weighted portfolio’s daily returns from each of the following models:
 Returns are i.i.d. multivariate Normal with parameters as in 1.b
 Returns are i.i.d. multivariate t with parameters as in 1.d
Calculate the maximum drawdown of each realization, and create histograms of the simulated maximum drawdowns from each model (2 histograms total).

The maximum drawdown for the equally weighted portfolios is smaller compared to that for the single asset. That is reasonable, since diversification typically decreases risk. The multivariate t-distribution has heavier right tail (i.e. the possibility of larger MDD) than the multivariate Normal (probably because of the tail dependence of the t-distribution, which makes extreme gains/losses across all assets more likely)

STAD70 Assignment 3
This assignment covers the following chapters from the textbook: §11 : sections 11.1-11.6,
§16 : sections 16.1-16.6.
§17 : sections 17.1-17.6.
1. Assume a market of #N assets with returns following Ri  RM i, i 1, ,N
R ~ N( , 2 ) &  ~i.i.d. N(0, 2 ) . In other words, the model assumes all assets have
, where the same beta (i.e. systematic risk) & idiosyncratic risks with the same variance.
MMMi
a. Find the weights of the minimum-variance portfolio
R 
 1  R  1  R1R ε, whereE[ε]0&Var[ε]diag[2]2Ι
MM  R 
N N
E[R]E[1RM ε]1E[RM ]E[ε]M10M1
Var[R]Var[1R ε]211TVar[R ]Var[ε]22 11T 2I MMM
1 1 1 0 22 2 Var[R]Σ22  2  M 
22  M 
M  1 1 0 1  22 22 2
M M The minimum-variance (mv) portfolio has weights given by w  Σ11 .
1T Σ11
It should be obvious that the weights are all equal, i.e. w  N1 1 , since changing the
ordering of the assets in the vector R does not change their covariance matrix. (Alternatively, you can easily verify that for any N -dimensional matrix of the form
a a b 0 Σa11T bI  
witha,b0,theinverseisgivenbythe ccd0 1a 1

a a 0 b 
matrixΣ1c11TdI  wherec andd .    bNab b
c c 0 d 
Thus, the sums of the rows of Σ1 , i.e. the elements of the vector Σ11 , are all equal).
b. Show that the minimum variance can never be smaller than  2 2 , no matter how M
many assets we have (i.e. no matter what the value of N is).
For the minimum-variance portfolio ( Rmv ) we have:
E[R ]E[wTR]wTE[R] 11T  1 1T1 (since1T1N) mv NM MNM

Var[R ]Var[wTR]wTVar[R]w 1 1T(22 11T 2I)1 mv N2 M 
22 2 2
 M (1T1)(1T1)  (1T1)22   22 ,N1
N2 N2 MNM
Thus, the minimum variance portfolio will always have variance at least  2 2 . M
2.
Download monthly returns for the following stocks (use the option compression=’m’ in the get.hist.quote function of package tseries).
i. Goldcorp Inc (G.TO)
ii. Toronto-Dominion Bank (TD.TO)
iii. Husky Energy Inc (HSE.TO)
iv. Bank of Montreal (BMO.TO)
v. Westjet Airlines Ltd (WJA.TO)
Moreover, assume a monthly interest rate of 0.20% throughout.
a. Consider only the stocks G.TO and TD.TO Use the sample estimates of their means &
variances, but consider different values for their correlation: ρ= −1, −.5, 0, .5, 1. Plot the mean-variance profile of portfolios with weight w(−1, 2) on the same graph.
b. Consider all 5 stocks and estimate the mean and covariance matrix of the returns. Plot the efficient frontier line and report the tangency portfolio weights.

Tangency portfolio weights:
G.TO TD.TO HSE.TO BMO.TO WJA.TO 0.1367403 1.296631 -0.702089 -0.07807362 0.3467909
c. Repeat part b. (i.e. plot the efficient frontier and report the tangency portfolio weights) with the restriction that all wi  0 and wi  .5 . (Hint: you can modify the code from Ex.
11.7 on p. 298 of text)
Tangency portfolio weights:
G.TO TD.TO HSE.TO BMO.TO WJA.TO 0.08263676 0.5 -1.619264e-18 0.1662414 0.2511218

3.
(Note: In general, optimal portfolio weights in mean-variance analysis are quite sensitive to changes in the covariance matrix, especially when considering many assets→ high dimensional problems. A common way to address this is to impose restrictions on the weights, e.g. no short-selling or no single weight above some value. These restrictions typically stabilize the optimal portfolio w.r.t. the input.)
For this question we will test whether an actively selected portfolio outperforms a passive investment strategy based on a broad index. The passive strategy is to invest all wealth on the SPDR® S&P 500 ETF (which tracks the S&P500 index). The active strategy is to distribute your wealth between 9 sector-specific ETFs, with the allocation updated every year. The index tracking & sector-specific ETFs are given in the table below.
ETF NAME
TICKER
CATEGORY
SPDR® S&P 500 ETF
SPY
Large Blend
Financial Select Sector SPDR® ETF
XLF
Financial
Health Care Select Sector SPDR® ETF
XLV
Health
Technology Select Sector SPDR® ETF
XLK
Technology
Energy Select Sector SPDR® ETF
XLE
Equity Energy
Consumer Discret Sel Sect SPDR® ETF
XLY
Consumer Cyclical
Consumer Staples Select Sector SPDR® ETF
XLP
Consumer Defensive
Industrial Select Sector SPDR® ETF
XLI
Industrials
Utilities Select Sector SPDR® ETF
XLU
Utilities
Materials Select Sector SPDR® ETF
XLB
Natural Resources
a. Use the started code provided to download daily prices for the above ETFs and the risk- free interest rate, from Jan 2006 to Dec 2015. Plot the SPY returns from 2007 to 2015.

b. Calculate the active investing allocation on a rolling annual window as follows: For each year 2006, 2007,…, 2014 estimate the mean & variance-covariance matrix of the 9 ETFs and the mean risk-free rate. Then use mean-variance analysis to find the tangency portfolio weights for each year, imposing the restriction that 0  wi  .5, i  1, , 9
no short-selling and no asset with more than half the wealth).
c. Apply the allocation you found for each year from b. to the next year’s return, i.e. apply the weights from 2006 to the returns from 2007, the weights from 2007 to the returns from 2008, and so on. This should give you 9 years of active investing returns (from 2007 to 2015). Plot the resulting returns.
(i.e.

d. Regressyouractiveinvestingreturnstothepassiveinvestingreturns.Provideascatter- plot and report the fitted alpha & beta. Is there evidence that active investment outperforms the market?
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.834e-05 1.181e-04 0.663 0.507
R.SPY 8.158e-01 8.709e-03 93.677 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.00562 on 2264 degrees of freedom Multiple R-squared: 0.7949, Adjusted R-squared: 0.7948 F-statistic: 8775 on 1 and 2264 DF, p-value: < 2.2e-16 The alpha of the active portfolio is positive but very close to 0; it is actually not significantly different from 0 (p-value=.507). The beta is 0.815 and highly significant (as we would expect). This suggests that the active strategy offers slightly less volatile (β<1) returns compared to the passive/market strategy, but does not consistently outperform it (α=0). STAD70 Assignment 4 Solutions 1. Consider the following 2-factor model with 3 assets: R2   1 1  1   2  , where    F2   CovF2 0223 002  Find the minimum variance portfolio weights for this model. R β 2 0 0 Τε 0 2Ι , Covε 0 2 0 2Ι ,Covε,F0. R 1 0  1 F1 R 0 1  3 F3 The model’s covariance matrix is Σ  CovR Cov βΤF  ε  βΤ CovFβ  Covε R 1 0 200220200  1 1  2 0  1 1 0   0  2 0    2 2 2  2    0  2 0    0 20 1 1       0 1   0 0 2 0 2 2 0 0 2  222 0210 521  Σ2 32 22131Σ1112 4 2 RR28 02 22 012 125  Σ11 The minimum variance portfolio weights are w   1/2  w   0  , so we split our portfolio equally between the first and third assets.  1/2  5 2 12 5  1   2 4 2 1   1 1 12 4 21   11 1T Σ11   5 2 11  1 2 51   2. Here you will use regression to identify the investment mix of various mutual funds. a. Download the last 2 years of adjusted closing prices for the 5 mutual funds below: (use the get.hist.quote() function in the tseries package, with the corresponding ticker). Note that each of these funds has at least 90% of their weight in the US stocks market. You can actually check the composition of the investment over different stock sectors Fidelity Contrafund FCNTX Pioneer A PIODX American Funds Invmt Co of Amer A AIVSX Parnassus Core Equity Investor PRBLX Vanguard 500 Index Admiral VFIAX from Yahoo Finance, under the fund’s holdings tab; e.g. https://finance.yahoo.com/quote/FCNTX/holdings b. Assume you do not have any information about the investment strategy of the funds. Download the daily prices and calculate returns of the following EFTs, which track different sectors of the economy: Here are the returns of the first fund: The composition of the fund is shown below: Basic Materials XLB Consumer Cyclical XLY Financial Services XLF Realestate VNQ Consumer Defensive XLP Healthcare XLV Utilities XLU Communication Services XTL Energy XLE Industrials XLI Technology XLK Regress each of the mutual fund returns on the above ETF returns, and create barplots of the resulting beta coefficients. Do these correctly reflect the allocation over the different sectors (as described in Yahoo Finance)? c. Compare the performance of the mutual funds to that of a portfolio of ETFs: report the value of Jensen’s alpha (based on the regressions from part b.) and test whether it is significantly different from zero. The beta coefficients for the first mutual fund are presented below, and they are fairly close to the asset allocations described in Yahoo Finance. Below are the estimated alphas and corresponding p-value. None of the mutual funds has significantly superior performance (at 5% level) over the corresponding portfolio of ETFs. In fact, 4/5 mutual funds slightly underperform their ETF portfolios, probably due to their associated fees which are higher than those of ETFs. Jensen alpha p-value -0.031805 0.077494 -0.019800 0.793905 0.005571 0.647618 -0.001527 0.926625 -0.003094 0.421495 3. a. Load the yield rate data (w/ 8 maturities, from 1yr to30yr) from the “yields.csv” file. Plot time series of yields for each maturity and create a 3D plot term structure evolution over time (use the persp() function in R) b. Calculate the daily differences of the yield rates for each maturity. Plot the 8×8 correlation matrix of the differences; what do you observe? The interest rate movements are all positively correlated. Rates with closer maturities are more strongly correlated (e.g. the closer you are to the diagonal, the higher the correlation) The earlier rates are less strongly correlated than the later rates (e.g. cor(X1yr,X2yr) < cor(X20yr, X30yr) ) c. Fit a factor model to the difference data (use the factanal() function in R and its hypothesis test for deciding the number of factors). Plot the correlation matrix given by the model and compare it to the one from part b. The table below contains p-values for the hypothesis test that #n factors suffice, for different values of n: It seems that 3 factors are sufficient (p-value=.18332<.05). The correlation matrix from the model is: This looks very close to the original correlation matrix. n P-value [1,] 1 0.00000 [2,] 2 0.00000 [3,] 3 0.18332 [4,] 4 0.50945 d. Use your factor model to simulate the evolution of the term structure of interest rates over the next month in the following way: start with the latest term-structure in the data, and simulate 21 daily differences (~1 month worth of trading days). Accumulate the differences over time to get the term structure at the end of the month (i.e. yield rates behave like random walks with correlated increments given by the factor model). Repeat the simulation 1,000 times, and calculate the corresponding prices for the 1yr & 3yr zero-coupon-bonds (ZCB). Finally, create a scatter-plot of the simulated ZCB prices for 1yr & 3yr. STAD70 Assignment 5 1. Consider the arithmetic Brownian motion X  t W , where W is standard Brownian motion. ttt Xt  a. tn 1 (a.k.a. the multivariate Brownian bridge). Write the parameters of the distribution in terms of (x,,,t1, ,tn) 1 Find the conditional distribution of  |X1 x,where 0t1  X  t n  . Xt1 t1 t1 t1 t1   The (unconditional) joint distribution is  ~N ,2  X t t tt  tn  n 1 n n X 1 t1 tn 1 1  Using the Normal conditional distribution formula, Z1  μ1  Σ11 Σ12   ~N , Z |Z z~N μ Σ Σ1zμ , Σ Σ Σ1Σ Z μΣ Σ 1 2 2 221 22 Xt1 weget  t 12 22 n n 1   t1  t1(1t1) t1(1t2)  t t(1t) t(1t) 1 t1 2 t1 t1 11 12 22 21  X  1         t  t  t t  t  n n n     t1 t1 |X x~N  x,2  t    1  t Xt1   n  t1(1tn) t(1t) X   t2|Xx~Nx2,21 2 2 2 2 n  1  X t t(1t)t(1t) t(1t) t n1n2n nn    n b. ConsiderthegeometricBrownianmotion St 50exp.03t.2Wt,fix n20 and lettii(n1),i0, ,n n1 . Write an R script that simulates a paths of the process S sampled at times tii0 using the result from part a. That is, first generate T | S using Cholesky decomposition of the tn11 tt1 S Sandthengenerate S S  conditional covariance matrix.  1n  Write S 50exp.03t.2W50expX , where X .03t.2W , and use the result ttttt from part a. as follows:  Generate X1 ~ N .03,.2  Generate (Xt1, ,Xtn )|X1 asinthepreviouspart  Set(St1, ,Stn,S1)50exp(Xt1, ,Xtn,X1)  2. A European lookback option is a path-dependent option whose payoff at maturity depends on the maximum/minimum price of the underlying asset before maturity. There are two types of lookback options, namely fixed strike & floating strike, with payoff functions given by: ,whereMT maxSt&mT minSt 0t T 0t T a. Perform Monte Carlo simulation in R for estimating the price of a floating strike European lookback call option. Assume the underlying asset price follows Geometric BM with S0  90, T  1, r  2%,   20% , and use unbiased estimation (i.e. simulate from the exact distribution of the minimum). Use n  100, 000 samples and create a 95% confidence interval. Compare you result with the exact price of the option, given by the R function FloatingStrikeLookbackOption in the package fExoticOptions. b. Perform Monte Carlo simulation in R for estimating the price of a fixed strike European lookback call option. Assume the underlying asset price follows Geometric BM with S0  90, K  100, T  1, r  2%,   20% , and use unbiased estimation (i.e. simulate from the exact distribution of the maximum). Use n  100, 000 samples and create a 95% confidence interval. Compare you result with the exact price of the option, given by the R function FixedStrikeLookbackOption in the package fExoticOptions. c. Repeat part b., but assuming the risk-neutral asset price dynamics: (see attached .R code) (payoff at maturity) Call Put Fixed strike MT K KmT  Floating strike ST mT  MT ST  MC estimate 95% C.I. Exact price 14.27339 14.24871 → 14.29806 14.26674 MC estimate 95% C.I. Exact price 8.304169 8.281272 → 8.327067 8.295269 dS(t,S)dt(t,S)dWrSdtcos(et) S dW ttttt t t  Use Euler discretization with m  50 steps and simulate n  10, 000 paths. In order to approximate the maximum of each path, simulate the maximum of each step using the result for the extrema of an arithmetic BM: S  S2 2t2(t ,S )log(U) M |S ,S S  ti ti i1 ti1 , ti ti1 ti ti1 where M ti  max {St }, Sti  Sti  Sti 1 , t  ti  ti 1 & U ~ Uniform(0,1) . The ti1tti maximum of the entire path will be the maximum over all steps in the path, i.e. MT max{St} max{Mt }.Includea95%confidenceintervalinyouranswer. 0tT i0, ,m i 2 MC estimate 95% C.I. 2.209548 2.195220 → 2.223876 3. (Note: changed the strike from K  100 to K  90 , to get positive price) A rainbow option is a derivative exposed to two or more underlying assets. Consider a European rainbow option with payoff given by max{S(i)} S(i) , i.e. the payoff 1d  i1, ,d i1  Td T is the maximum final price minus the average final price of all d assets (note that the maximum/average is over assets, not over time). Estimate the price of this option using Monte Carlo simulation with n  10, 000 d-dimensional paths, and provide a 95% confidence interval with your answer. Assume that d  5 , K  100 , T  1 , r  .03 , S(i)(0)100,i1, ,5 withσ.1 .2 .3 .4 .5andCorWi(1),Wj(1).3,ij. , and: a. The assets follow multivariate Geometric BM dS(t)  r S(t)dt σ S(t) dW(t) , MC estimate 95% C.I. 36.45105 35.89322→ 37.00889 b. The assets follow the SDE dS(t)  r S(t)dt σ S(t) dW(t) , with σ.1 .2 .3 .4 .5, CorWi(1),Wj(1).3, i j and S(t)  S(5) (t) S(1) (t)T is the reverse of S(t). This process is not a  multivariate Geometric BM, so use Euler discretization with m  25 steps to approximate the final prices of the assets. MC estimate 95% C.I. 33.69687 33.34725→ 34.04649 1. STAD70 Assignment 6 Solutions Antithetic variables are closely related to stratification with only 2 strata, i.e. with positive & negative values for Z . Their only difference is that for antithetic variables you have the same absolute values for positive and negative variables, whereas with stratification you can have different absolute values for positive and negative variables. a. For what type of function f does the use of antithetic variables completely eliminate the variability of the Monte-Carlo estimator, i.e. Var Y   1 Var Y  Y   0  AV   i i  whereYf(Z),Yf(Z)andZ~iid N(0,1) iiiii For the type of function you identified in part a., show that the variance of the simpleMonteCarloestimatorisnotnecessarily0,i.e.Var[Y] 1VarYi0. 2n , n2 SOL: The variability of the estimator will be 0 when the function f is odd, i.e. when f (x)   f (x) . In this case the expectation we try to estimate is 0, i.e. E[ f (Z)]  0, and the antithetic variable estimator does a perfect job for any sample size n, i.e. YAV 1n Yi Yi 1n f(Zi)f(Zi)1n f(Zi)f(Zi)0, n ni12ni1 2 ni1 2 b. c. For the type of function you identified in part a., show that the variance of the stratified estimator (with 2 equiprobable strata of size n each) is also not 0 and that it is smaller than that from part b., i.e. 0  Var[YStr ]  Var[Y ] . SOL:ThesimpleMCestimatorY 12nY hasvarianceVar[Y] 1VarYwhere ii 2n i1 2n Var[Y]Varf(Z)Ef2(Z)Ef(Z)2 Ef2(Z)0,unless f(x)0,x. i 0 SOL: We have shown in class that the variance of the stratified estimator with m=2  2  12 equiprobable strata, is given by Var[Y ]  E  f 2 (Z)  j , where Str   2n  j12   Ef(Z)|ZA,where{A} arethetwostrata.Forourspecificcase,we j  j jj1,2 have A {Z  0}& A {Z  0}, and since the function is odd and Z is Normal, we 12 have      Var[Y ]  E  f 2 (Z)  2 . Comparing this to the result 1 1 2 Str 2n   from part b., it is obvious that the stratified estimator has smaller variance than the simple MC estimator, and its performance is better the greater  is. 2. A European gap option has a strike price K1 and a trigger price K2 . The trigger price determines whether or not the gap option is exercised, while the strike price determines the amount of the payoff. For example, the European gap call option has payoff given by: ST  K1, if ST  K2 , presented in the following plots:  0,ifSTK2 Obviously, if the strike price is equal to the trigger price then the gap option is an ordinary option. Note that gap options can result in negative payoff at expiration (so they should not really be called “options”). Moreover, gap options are different from barrier options, in that for barrier options the barrier can be reached prior to expiration, whereas for gap options only the final stock price is compared to the trigger. a. Estimate the price of a European gap call option with S0  55, K1  50, K2  60, T  1yr, r  2%,   20% and assuming the price follows GBM. Use n  100, 000 paths and calculate the standard error of your result. Compare that to the exact price given by the R function GapOption in the package fExoticOptions. SOL: (R code attached) b. Repeat part a. using antithetic variables, and report the new price estimate and standard error. SOL: c. Repeat part a. using stratification with m  5,10, & 20 equiprobable strata, and report the new price estimate and standard error. SOL: d. Would you expect the variance reduction methods in part b. and c. to work better for in-the-money, at-the-money, or out-of-the-money options? Justify your answer. SOL: Both methods will work better for in-the-money options. For Antithetic Variables, we want the payoffs for the antithetic (opposite) values of Z to be negatively correlated, which will be the case it the option is in the money. For Stratification, we want the MC estimate Std. error Exact price 6.120135 0.03077973 6.129964 MC estimate Std. error Exact price 6.123481 0.01687359 6.129964 # strata MC estimate Std. error Exact price 5 6.109260 0.013101468 6.129964 10 6.127207 0.008453591 20 6.125531 0.005893443 3. expected payoff within each stratum to be as different as possible, which again implies we prefer deep in-the-money options. A forward start option is an option that starts at a specified future date with an expiration date set even further in the future. For example, consider a forward start call option with start date in 1yr and expiration date in 2yrs: at t  0 you pay the option premium, and at t  1 you receive a European call option with expiration date t  2 and strike price K  S1 (this is called an at-the-money forward start call, because the strike price is equal to the asset price at t  1, which is unknown at t  0 ). a. Estimate the price of an at-the-money forward start European call option with S 70,T 1, T 2yr,r2%,20%andassumingthepricefollowsGBM. 0 start exp Use n  10, 000 paths and calculate the standard error of your result. You should use the Black-Scholes formula to explicitly calculate the value of the option at Tstart , i.e. you should generate STStart and then calculate its “payoff” as the Black-Scholes price of a European at-the-money call option with 1 year to maturity (use BSprice function provided in Lecture 8’s R code). Compare that to the exact price given by the R function ForwardStartOption in the package fExoticOptions. b. Repeat part a. using antithetic variables, and report the new price estimate and standard error. c. Repeat part a. using stratification with m  10 & n  1, 000 equiprobable strata, and report the new price estimate and standard error. d. Show that the price of the at-the-money forward call option is actually a simple linear function of S0 (Hint: use risk-neutral pricing and write the payoff of the option at Tstart as the Black-Scholes price of an at-the-money call with maturity at Texp ) MC estimate Std. error Exact price 6.240082 0.01256598 6.241225 MC estimate Std. error 6.238641 0.002474718 MC estimate Std. error 6.238967 0.002808802 TheBlack-ScholespriceforaEuropeancallis CS0(d1)erTK(d2),where lnS K(r12)T d  0 2 ; d  d  T . For an at-the-money ( K  S ) call, in 1T210 particular, we get  (r12)T CS(d)erT(d)S  2 (r12)T 2 . erT       T  By risk-neutral pricing, the price of the at-the-money forward call option becomes 0  1 2  0    T  (tower  rT  law)   rT  CFWD  e exp payoff   e exp (at the money Euro call at Tstart ) | STstart     erTstartCKST ,TTexp Tstart    start   (r12)(T T ) (r12)(T T )  erT S  2 exp start er(Texp Tstart ) 2 exp start    start Tstart    T T    T T  expstart expstart      erTstartSTstart S0 where in the last line we used the fact that the discounted asset price is a martingale under the risk-neutral measure. 4. An α-quantile option is an option whose payoff is determined by the αth quantile of the underlying price from time 0 until expiration. For example, the median call option (i.e. is the α=50%) with strike K has payoff TT median S   K , where median S   t median asset price over [0,T]. Assume that the underlying asset follows GBM with S0  60, r  5%,   25% , and use simulation to estimate the price of median call with K 70&T 1. a. Perform simple Monte Carlo using path discretization with t j  j T , j  0, , m m t t0  t0 and m50 inordertoapproximatethecontinuous medianStt0 bythediscrete b. m medianS(tj )j0 . Use n 10,000paths and report the standard error of the estimate. Repeat part a. using the Black-Scholes price of the European call as a control variate, and report the new price estimate and standard error. average asset price over (0,T). There are two types of averaging: 1T arithmeticaverage:A(0,T)T 0 S(t)dt T MC estimate Std. error 1.070417 0.03518883 MC estimate Std. error 1.055038 0.02461898 5. An Asian option is an option whose payoff is determined by the average underlying price over some pre-set period of time, typically the time till expiration. For example, theAsiancalloptionwithstrike K haspayoff A(0,T)K ,where A(0,t) isthe 1T geometricaverage:A(0,T)exp  lnS(t)dt T 0 If the underlying asset follows GBM, then the price of an Asian option with geometric averaging can be calculated explicitly. For Asian options with arithmetic averaging, however, we rely exclusively on numerical methods for pricing. Assume that the underlying asset follows GBM with S0  70, r  5%,   25% , and use simulation to estimate the price of an arithmetic Asian call with K  80 & T  1 . a. Perform simple Monte Carlo using path discretization with m  50 in order to approximate A(0,T)  1 T S(t)dt by A(0,T)  1 m S(ti ) . Use n 10,000 paths T0 m j1 and report the standard error of the estimate. SOL: (R code attached) b. Repeat part a. using the price of the geometric Asian call as a control variate, and report the new price estimate and standard error. For implementing the control variate, you can get the exact price of the geometric Asian option using the R functionGeometricAverageRateOption inthepackagefExoticOptions. SOL: c. Repeat part a. using importance sampling. Change the probability measure so that E[ST ]  K , and experiment with at least two more measure changes of your choice. Report the new price estimates and standard errors. Notice that the estimate is diverging from that of part b. whereas the standard error decreases! Ideally, we would expect the estimates from b. & c. to be the close. The reason why this happens is that, for arithmetic Asian options, our MC estimator is biased (remember that for path-dependent options, like the Asian, we can have biased MC estimators). Specifically, it has discretization bias from approximating the continuous integral with a discrete sum. So, even though the importance sampling technique reduces variance, it seems to increase bias. The best results, in terms of accuracy, for this Asian option problem are from part b. MC estimate Std. error 1.410088 0.03921968 MC estimate Std. error 1.408552 0.002142865 change of measure s.t. MC estimate Std. error E[ST ]  80 1.433851 0.02886434 E[ST ]  90 1.447550 0.02077841 E[ST ]100 1.449901 0.01835852 STAD70 Assignment 7 Solutions 1. [Kelly for different win/loss amounts] Consider a sequence of independent bets, where the probability of a win is p and that of a loss is q 1 p . Suppose a fraction f (0,1) of the capital is bet each turn. Rather than even payoff (i.e. a win/lose 1 unit per unit bet), we consider the more general scenario where a units are won and b units are lost per unit bet. a. Find an expression for the total wealth after the n th bet Vn , as a function of a, b, f , n, the initial wealth V0 and Wn ={total # of wins in n bets). Forasinglebetofafraction f ofwealthVt1,ifyouwinyourwealthbecomes V V (1 fa) , and if you lose your wealth becomes V V (1 fb) . Using the t t1 t t1 indicatorfunctionI 1ifyouwin,i.e.withprobpforthebetoutcome,theresulting t 0 if you lose, i.e. with prob q wealth can be succinctly written as: Vt Vt1(1 fa)It (1 fb)1It . After a sequence of n t t t1 t1 bets, we have that V V n (1 fa)I (1 fb)1I V (1 fa)n It (1 fb)n (1It )  n 0 t1 0 Vn V0(1 fa)Wn (1 fb)nWn . b. Show that the Kelly criterion optimal bet fraction is given by f *  ap  bq . ab TheKelly-optimalbetfraction f* maximizestheexpectedlog-wealth,i.e. f *  arg max E log(V ) . The expected log-wealth is: n f Elog(Vn)ElogV0(1fa)Wn(1fb)nWn    Elog(V0)Wn log(1 fa)(nWn)log(1 fb) log(V0)log(1 fa)EWnlog(1 fb)nEWn  log(V0 )  log(1 fa)np  log(1 fb)nq To maximize E log(V ) , set the derivative w.r.t. f equal to 0, and solve for f * : n d Elog(Vn)0 d log(V0)log(1 fa)nplog(1 fb)nq0 df df  a 1 f*a np b nq0ap(1 f*b)bq(1 f*a) 1 f*b apbqf*ab(pq)f* apbq 1 ab 2. [Kelly for simultaneous betting] When you have sequences of gambles, using Kelly’s criterion amounts to maximizing the expected log-return of each individual bet. For this question we consider a different set-up, where we have a set of m  2 simultaneous gambles and we wish to find the optimal way to distribute our wealth amongst them. This setup occurs naturally in sports betting, where you have multiple parallel matches on a game day. Assume we can bet on two events with (fractional) odds given by ai for . This means that for each $1 we bet, we get back $(1 ai ) if we win and i1, .m nothingifwelose(i.e.bi 1,inthetermsofquestion1.). a. Let m  2 and assume the two events have the following probabilities Bet 2 Win Loss Bet 1 Win pWW pWL Loss pLW pLL What condition on the odds and the probabilities unsure a favorable bet for each event individually? b. Assume you bet fractions f1, f2  0 (where f1  f2 1) of your wealth V0 on both events simultaneously. Find an expression for your wealth V1 after the outcomes of the bets become known. Define the marginal probability of winning the ith bet as pi , where in our case p  p  p and p  p  p . We want each bet to result in an expected 1 WW WL 2 WW LW increase in wealth. Assuming a $1 bet in the ith bet, we have [ith betgain/loss]ap(1p)0p 1 ,i iiii 1ai 1, win ith bet Let Ii  0, o/w be the indicator variable of the ith bet’s outcome. We have V0 (1 f1a1  f2a2 ), win both bets  st nd V   V0 (1 f1a1  f2 ), win 1 & lose 2 bet 1 stnd  V0 (1 f1  f2a2 ), lose 1 & win 2 bet  V (1 f  f ), lose both bets 012 V1f(a)I1 f(a)I2 01122 The main point here is that parallel bet gains/losses do not compound. c. Find a closed expression for the expected log-wealth G( f , f )  [log(V )], in terms 121 of the odds, the probabilities and the fractions. d. Derive 1st order conditions for the optimal fractions f * , f * . 12 G(f,f) [log(V)]logVlog1fafap log1fafp  1 2 1 0 1 1 2 2 WW 1 1 2 WL log1 f1  f2a2 pLW log1 f1  f2 pLL  G(f1,f2)0 a1 pWW  a1 pWL  f1  G(f1,f2)0 a2  a2 pLW  1 f1  f2a2 1 f1a1  f2a2 1 f1a1  f2  1 pLW 1 pLW0 f2 1 f1  f2a2 1 f1a1  f2a2 1 f1  f2 pWW  1 pWL  1 f1a1  f2 1 pLW 0 1 f1  f2 3. (Hint: Differentiate G( f1, f2 ) w.r.t. f1, f2 to get a set of simultaneous equations. Note that for general m these might not be explicitly solvable, but they can be solved numerically, as in the provided reference “Algorithms for optimal allocation of bets on many simultaneous events”.) [Kelly for predictable returns] The “Efficient Markets Hypothesis” in finance presumes that returns are “unpredictable”. Nevertheless, for this question assume that returns are predictable and they actually follow an AR(1) process (R  )  (R  )   , t t1 t where  ~iid N(0,2). The model dictates that the conditional mean of the next return t is a linear function of the current return, i.e. Rt   | Rt1(Rt1  ). Based on this observation, one can modify the Kelly criterion for investing that we saw in class to allow for dynamically changing fractions, based on the conditional mean & variance of returns at each point. Remember that the Kelly-optimal fraction for iid returns with mean  , variance  2 and constant risk-free rate r is f *  (1 r )   rf . In the f f 22 dynamic setting, substitute  and  2 with the conditional mean and variance of the return,i.e.f* (1r) [Rt|Rt1]rf . t1 f [Rt |Rt1] [Rt |Rt1]2 a. Simulate n=1,000 paths of m=2520 daily returns each, from an AR(1) model with: R0 0,.25,.05/252, .2/ 252,rf .02/252. (see R code) Simulated cumulative return 0 500 1000 1500 2000 2500 Index b. Apply the simple Kelly criterion based on the stationary mean [Rt ]   and 2 variance [R ]   of the AR(1) process, and calculate the resulting wealth t (12) process. Simulated static Kelly cumulative return V.s[, 1] (cumprod(R[, 1] + 1)) 5 10 15 2 4 6 8 10 12 0 500 1000 1500 2000 2500 Index c. Apply the dynamic Kelly criterion and calculate the resulting wealth process. Compare the histograms of the simulated final wealth under both approaches. Simulated dynamic Kelly cumulative return The dynamic Kelly criterion gives humongous returns (with huge variability). It generally leads to orders of magnitude more final wealth, but it can also lead to negative wealth / ruin (especially if we do not restrict the values of f ), with estimated probability of ~30%. Below is the histogram of the log(final wealth>0) for the two approaches.
eg])
Histogram of log(V.d[m, ])Histogram of log(V.d[m, !is.n
40 60 80 100 40 60 80 100 log(V.d[m, ]) log(V.d[m, !is.neg])
0 500 1000 1500 2000 2500 Index
d. [Optional]ExtendthedynamicKellycriteriontoanAR(1)processwithARCH(1) errors,i.e.(R)(R )andvzwherez~iidN(0,1)and
t t1 t ttt t
v2 2 .(Notethatthestationaryerrorvariancebecomes [ ]  ).
t t1 t Repeat the dynamic Kelly wealth caclulation for this model with
1
  .02 / 252 &   .5 , and compare your results to the simple stationary approach.
See R code
Frequency
V.d[, 1] 1.0e+31
0 20406080
0.0e+00
Frequency
0 20406080 120

STAD70 Assignment 8 Solutions 1. Suppose you are trading the pair of stocks (P, S) .
a. Assume the prices of the stocks have a stationary linear relationship P  S . Further tt
assume that you open a trade when P  S  0 , and you close it when P  S  0 . oo cc
What quantities of each stock do you have to buy/sell at the start of the trade in order to get a profit? Find the resulting profit amount.
SincePS 0&PS 0: oocc
 Open position by selling 1 share of stock P and buying  shares of stock S , for a net initial cashflow of P  S  0
oo
 Close position by buying back 1 share of stock P and selling back  shares of stock S ,
for a net final cashflow of P  S  0 cc
The total net profit (disregarding interest, since these are typically short-term trades) is (P  S )  (P  S )  0 . When the actual prices are cointegrated, the pairs trading
oocc
strategy involves amounts proportional to the cointegrating coefficients (1, ) .
Note that if P  S  0 & P  S  0 , we would reverse our position to make a profit,
oocc
i.e. we would buy 1 share of stock P and sell  shares of stock S .
b. Assume the log-prices have a stationary linear relationship log(P )   log(S ) . Further tt
assume that you open a trade when log(P )   log(S )  0 , and you close it when oo
log(P )   log(S )  0 . Show that if you sell 1/ P units of P & buy  / S units of S at ccoo
the start of the trade, you will make an approximate profit of log(P )   log(S ) . oo
cto (Hint: Use the log/net-return approximate relationship: log  P   P  P )
PP o 0
 Open position by selling 1/ Po shares of stock P and buying  / So shares of stock S , oo
for a net initial cashflow of P   S PS
oo
 Close position by buying back 1/ Po shares of stock P and selling back  / So shares of cc
stock S,foranetfinalcashflowof P S PS
oo
o oc c
The total net profit (disregarding interest) is  P  S  P  S  
PSPS o oo o

cococc PPSS logPlogS
PSPS oooo
log(P)log(S )log(P)log(S )log(P)log(S )0 ooccoo
0
Note that if log(P )   log(S )  0 & log(P )   log(S )  0 , we would reverse our
oocc
position, i.e. we would buy 1/ Po share of stock P and sell  / So shares of stock S , to
make an approximate profit of log(P)log(S )0. oo
2. Consider two stocks whose prices follow correlated geometric Brownian motions, i.e.
dlog(P) dt dW
 t P P t , where{Wt},{Vt} are correlated standard Brownian motions  d log(St )  S dt   S dVt
with correlation |  | 1 . Determine whether the log-prices are cointegrated or not.
The individual log-prices are not stationary since they follow arithmetic Brownian motion (this should be obvious by the fact that the variance Var log(P )   2t is non-constant).
Consider any linear combination of the log-prices, X  a log(P )  b log(S ) , for arbitrary ttt
weights a,b. We know that a linear combination of correlated arithmetic Brownian motions also follows an arithmetic Brownian motion with drift aP  bS and volatility
tP
 . But since |  | 1 , the volatility of the linear combination will always be strictly positive, for any a,b. To see this, note that
(a b )2 0a22 b22 2ab  0 PSPsPS
a22 b22 2|a||b|  2|a||b|  || (for||1) PsPSPS
a22 b22 2ab  0, a,b PsPS
Thus, the variance of the linear combination Xt will never be constantso Xt will never be stationarythe log-prices cannot be cointegrated.
a2 2  b2 2  2ab  PsPS
3. Implement a pairs trading strategy of your own, using daily stock data from Yahoo Finance. In particular, find two ETF’s that are highly correlated (e.g. both tracking the same index or industry) and download 10 years of historical data. Use the first 5 years to select the parameters of your strategy, and the last 5 years to test it.
We are trading “SPY” against “IVV”, both large ETFs tracking the S&P500 index. The plot of the log-ratio of their prices is shown below:

Note that the log-ratio exhibits highly mean reverting behavior in the training period (left half), especially around the Fall 2008 financial crisis. In the testing period (right half), there are less intense fluctuations, and an adjustment (jump) at the beginning of 2016.
The pairs trading strategy employed involves opening a position at 2 standard deviations, closing a position at the mean, and bailing-out a position at 4 standard deviations (where the standard deviation is calculated based on the first half of data). The resulting strategy and cumulative gain (per $1 position in either stock) are shown below:

STAD70 Assignment 9 Solutions
1. Find a closed form expression for the VaR at level  of the following loss distributions: 1x  x
a. Gumbeldistribution f(x)e  expe  ,x, ,0 
x 1 u  u    u x
GumbelCDF: FX (x)  e  expe  duexpe        

u
expex  ee expex   
 
VaR suchthatP(XVaR)1FX(VaR)  VaR   VaR 
1expe   e  ln1 
VaRlnln1VaR lnln1 
b. Fréchetdistribution f(x)  exp 1 ,xm , 0 (xm)1  (xm) 

x   1    1 x FréchetCDF: FX (x) (um)1 exp(um) duexp(um)  
m   e x p   1   e  10  e x p   1 
um
 (xm)   (xm)  
VaR suchthatP(XVaR)1FX(VaR)
 1  exp   1      1  ln 1    
 (VaR m)  (VaR m) 
1 1 1 1

VaR m
ln1 VaR m m 
 ln1
c. Paretodistributionf(x) x(1),x ,0
.

x    x   ParetoCDF:FX(x)  u(1)duu  1x
 
 u
VaR suchthatP(XVaR)1FX(VaR)
    11VaR  VaR  
 
VaR  1 
2. (Exercise 2 from § 19.13 of textbook) Assume that the loss distribution has a polynomial tail with tail index   3.1. If VaR(0.05)=$252, what is VaR(0.005)? (Hint: Read section 19.6)
For loss distributions with polynomial tail α, the complementary cdf is given by

s(1) s  x .

x sx
F(x)P(X x)
Thus,PXVaRppVaRp pVaRp p1/ ,whichimpliesthat
VaRp  q 1/ VaR  .05 1/ VaR 1/3.1
 1
 .005  .00510  p VaR.05 .005 252
VaRq VaR
.005
252101/3.1 529.6405
3. (Exercise 5 from § 19.13 of textbook) Suppose the risk measure is VaR for some  . Let P & P be two portfolios whose returns have a joint normal distribution with means
12
1 & 2 , standard deviations 1 &  2 , and correlation  . Suppose the initial investments
are S & S . Show that VaR (P  P )  VaR (P )  VaR (P ),   1 , i.e. that VaR is 1212122
sub-additive for   12 .
Since P ~ N ,2 with initial investment amounts S for i 1,2, we have that iiii
VaR(P)S(z)SSz,i1,2,withz issuchthat iiiiiiii 
P(Z  z )  (z )   where () is the standard Normal CDF. Thus, VaR (P)VaR (P)S S S S z
1211221122
Looking at the combined portfolio, with weights wi  Si for i  1, 2 , proportional
S1 S2 to the investment amounts in each stock, we have that:
w P  w P ~ N w   w  , w2 2  w2 2  2w w    . The resulting VaR is 1122112211221212
VaR (PP)S S w w  w22 w22 2ww z 
SS S22S222SSz 112211221212
1212
112211221212

But for any |  |1, we have:
S22 S22 2SS S22 S22 2SS S S 2 
11221212112212121122  S22S222SSSS(for.5z0)
112212121122   S22 S22 2SS z S S z 
11221212 1122 SSz  S22S222SSz 
112211221212 S S z S S z
VaR (P P)VaR (P)VaR (P) 12 1 2
11221122

STAD70H3 W20 – Quiz 1 Solution
1. (2 points) Let the random variable X ∼ Exp(λ) follow exponential distribution with parameter λ, i.e. its CDF is FX (x) = 1 − e−λx , x > 0. Show that the inverse exponential random variable Y =1/X hasCDFisFY(y)=e−λ/y, y>0.
Solution:
FY(y)=P(Y ≤y)=P(1/X≤y) (wherey>0) =P(X ≥1/y)=1−P(X ≤1/y)=1−FX(1/y) = 1 − (1 − e−λ/y) = e−λ/y
2. (3 points) Find the tail index α of the inverse exponential distribution. (Hint: Find the PDF from the CDF.)
Solution:
fY(y)= dFY(y)= de−λ/y =e−λ/y d(−λ/y)=λe−λ/y dy dy dy y2
⇒fY(y)∼ 1, asy→∞⇒ thetailindexisα=1 y2
3. (5 points) Consider two assets RA, RB with expected annual returns μA = 5%, μB = 10%, volatilities σA = 20%, σB = 25%, and return correlation Cov(RA,RB) = 50%. Find the expected annual return of their minimum variance portfolio.
Solution: We have:
􏰉.05􏰊 􏰉 .202 .2 · .25 · .5􏰊 μ= .10 ,Σ= .2·.25·.5 .252
The minimum variance weights are given by
􏰉 .04 .025 􏰊 = .025 .0625
􏰉 .04 .025 􏰊−1 􏰉1􏰊 Σ−1 1 .025 .0625 1
􏰉0.7142857􏰊 1Σ1􏰇11􏰈􏰉.04.025􏰊􏰉1􏰊 0.2857143
w=⊤−1= −1 = .025 .0625 1

and the corresponding expected return is
⊤ 􏰇 􏰈􏰉.05􏰊
w μ = 0.7142857 0.2857143 .10 = 0.06428571
Page 2

STAD70H3 W20 – Quiz 2
Consider two arithmetic Brownian motions dY =λdt+τdV , where Wt,Vt are correlated
tt
Brownian motions with correlation coefficient ρ. Define Zt = Xt + Yt to be the sum of the two
processes.
1. (4 points) What is the covariance of Xs with YT , for s < t? 2. (3 points) What is the distribution of Zt? 􏰑dXt = μdt + σdWt Solution: Cov(X ,Y)=Cov[X ,Y +(Y −Y )]=Cov(X ,Y )+Cov[X ,$(Y −Y )] st ssts ss $sts $ $ $ = Cov[μs+σWs,λs+τVs] = στ Cov(Xs,Ys) = στρs $ $ $ $X 0 $ Solution: Normal, with moments: E[Zt]=E[Xt +Yt]=μt+λt=t(μ+λ) V[Zt] = V[Xt + Yt] = V[Xt] + V[Yt] + 2 Cov[Xt, Yt] =σ2t+τ2t+2στρt=t(σ2 +τ2 +2στρ) 3. (3 points) Find the covariance of Zt − Zs with Xt, for s < t. Solution: Cov((Zt −Zs),Xt)=Cov((Zt −Zs),Xs +(Xt −Xs)) X$ 0 $ $ $ =Cov((Z$−Z ),X )+Cov((Z −Z ),(X −X ))= $t$s s t s t s $ $ $ =Cov[(Xt −Xs)+(Yt −Ys),(Xt −Xs)] = V[(Xt − Xs)] + Cov[(Xt − Xs), (Yt − Ys)] = σ2(t − s) + στρ(t − s) = (t − s)σ(σ + τρ) $