程序代写案例-AND 1 RISK
时间:2022-03-05
CAPITAL ASSET PRICING MODEL
(CAPM)
AND
ARBITRAGE PRICING THEORY
(APT)
OPPORTUNITY SET WITH MANY RISKY ASSETS
AND 1 RISK FREE ASSET
The opportunity set with N risky assets and 1 risk-free asset case can
be easily extended from the N risky only assets case:
• Any point on (and inside) the opportunity set can be combined with the
risk free asset
• The combinations will lie on a straight line. Example: for any 1>a>0
invested in Rf and (1-a) in A, the combination will lie on the straight line
ABRf.
• The efficient set now becomes RfMA
• However, a risk-free asset is equivalent to having the ability to borrow
and lend at the rate Rf.
• The efficient set can be extended (through short-selling the Rf asset to
become a linear set with M at a tangent to curve AMBCD
THE CAPITAL MARKET LINE
Similar to Fisher Separation, we get Two-Fund Separation
• All investors will seek a combination of Rf and M to
maximize their utility.
• Recall: Fisher separation – All investors agreed there was
one optimal production point determined by the market
rate of interest, regardless of their personal preferences.
• Personal preferences only determined present vs future
consumption choice, not the production choice.
• Two-Fund Separation – All investors agree that the two relevant assets to be
holding are the risk free asset and the portfolio corresponding to point M.
• Personal preferences determine only the weights assigned to Rf vs M.
The line RfMC is called the Capital Market Line (CML)
THE CAPITAL MARKET LINE
• Once again, we see the introduction of a capital market
(ability to borrow & lend) improves the aggregate welfare
• Utility for some improves, and no one is worse off
(Pareto optimality)
• In equilibrium, M will be the market portfolio (why?)
• All assets must be held at market clearing prices in
equilibrium i.e. excess demand to what is already held
in the market portfolio must be zero
• Slope of the CML will be (E(Rm) – Rf)/σ(Rm)
• The fact that all investors hold a combination of only 2 assets – the risk free asset
and the market portfolio – is a very useful result
• We don’t have to worry about computing the efficient set for the entire combination of
risky assets (the full curve MB). Just the knowledge of the market portfolio will
suffice.
PORTFOLIO DIVERSIFICATION AND INDIVIDUAL
ASSET RISK
• Recall: Portfolio Variance calculation involves N variance terms and N(N-1)
covariance terms
• Assume an equally weighted portfolio i.e. wi = 1/N
• The portfolio variance can be separated into variance and covariance
terms
• = 12∑ σ + =1 12 ∑ ∑ σ=1

=1
• Suppose the largest individual asset variance is L and the average
covariance is σ�
• Then 1
2
∑ σ ≤=1 /N and as N becomes large the limit approaches 0
• 1
2
∑ ∑ σ

=1

=1 = (N-1)/N * σ� which in the limit approaches σ�
PORTFOLIO DIVERSIFICATION AND INDIVIDUAL
ASSET RISK
• As we increase the size of a portfolio (in terms of number of assets, N), the
covariance terms become relatively more important – and in the limit are
the only contributor to portfolio volatility or risk
• Diversification reduces the impact of the variance terms
• Typically, for a portfolio of stocks the first 10-15 stocks have the largest
impact
Contribution of a single asset to portfolio
risk:
• Evaluate the change in portfolio variance
w.r.t change in asset’s weight ∂()∂ = 2wiσi2 + 2∑ σ=1≠
• Again, suppose wi = 1/N
• In the limit, the marginal contribution
of a single asset to portfolio risk is a
function of its average covariance with
the other assets in the portfolio
• The above insight was crucial to the development of the CAPM
• While variance is a good measure of portfolio risk, covariance is the
right measure of risk for an individual security
THE CAPITAL ASSET PRICING MODEL (CAPM)
Based on similar suppositions we have encountered previously..
Main assumptions of the CAPM are:
1. Investors are risk-averse and maximize expected utilty
2. Asset returns have joint normal distributions (and there is agreement amongst
investors i.e. homogenous beliefs)
3. Existence of a risk free asset and capital markets that allows for borrowing and
lending at this rate
• This also implies frictionless markets. In addition no market imperfections such as
taxes, or regulations such as restrictions on short selling are assumed
Note: Above assumptions imply the existence of a Capital Market Line
and a linear efficient set
THE CAPITAL ASSET PRICING MODEL (CAPM)
We will also accept the claim that the Market Portfolio is an efficient
portfolio in equilibrium (i.e. lies on the efficient set)
• Proof of the market portfolio being efficient is quite involved but can be inferred
from other observations
• As long as investors have homogenous beliefs, there will be one efficient set or
frontier
• All individuals will select an efficient portfolio which lies on the efficient set
(anything else will provide a lower return for the same level of risk – or same
return for a higher level of risk)
• Since the market portfolio is the sum of all individual holdings, and the individual
holdings are themselves efficient, the market portfolio must also be efficient.
• The implication of the market portfolio being efficient is that any demand for an
asset in excess of what it already contributes to the market portfolio will be zero.
• Prices of all assets must adjust until they are all held by individuals.
THE CAPITAL ASSET PRICING MODEL (CAPM)
Derivation:
• In equilibrium, weight of each asset in the Market portfolio is:
wi = Market Value (MV) of asset/ MV of all assets
• Suppose a portfolio consisting a%
invested in asset I and (100-a)% in the
market portfolio. (Note: The opportunity set from any
combination of I and M will lie on the curve IMI’).
We will have:
E(�P) = a E(� i) + (1-a) E(�m)
σ(�P) = [a2σi2 + (1-a)2σm2 + 2a(1-a)σim]½
• Compute the marginal return and volatility contribution of asset I to the portfolio:
∂()
∂ = E(

i) - E(�m)
∂σ()
∂ = ½ [a
2σi2 + (1-a)2σm2 + 2a(1-a)σim]-½ * [2aσi2 - 2σm2 + 2aσm2 + 2σim - 4aσim]
• But in equilibrium, the market portfolio already has the value weight wi and excess demand a
must be zero
∂()
∂ |a=0 = E(

i) - E(�m)
∂σ()
∂ |a=0 = ½ [σm
2 ]-½ * [-2σm2 + 2σim] =
σim − σm
2
σm
THE CAPITAL ASSET PRICING MODEL (CAPM)
So the slope of the risk-return trade off (curve IMI’)
evaluated at M is:
∂E(�)/∂
∂σ(�)/∂|a=0 = E(� i) − E(�m)(σim − σm2)/σm
But the slope at point M must also equal the
slope of the Capital Market Line
E(�m) − Rf
σm
= E(� i) − E(�m)(σim − σm2)/σm
Rearranging:
E(� i)= Rf + [E(�m) − Rf]
σim
σm2
The above equation represents the CAPM. The term
σim
σm2
is the Beta risk measure of the asset
• By default, beta of the market portfolio is 1
• The linear plot of beta risk vs return is called the
Security Market Line
PROPERTIES OF THE CAPM
In equilibrium, all assets must be priced such that they lie on the Security
Market Line.
• Even assets that don’t lie on the efficient frontier must still lie on the SML
Total risk of an asset can be decomposed into two components
Total Risk = Systematic Risk + Unsystematic Risk
• Only the Systematic portion of total risk will garner a risk premium (i.e. will
get priced)
• The unsystematic risk can be diversified away (costlessly)
The realized return for asset i can be expressed as:
� i = ai + bi �m + ̃I
• Beta can be estimated (albeit a naïve measure) by regressing asset
returns on market returns - since the regression coefficient, b, is
Cov(Rm,Ri)/Var(Rm)
The beta risk measure is linearly additive i.e. a% investment in asset X and
b% investment in asset Y will have a combined beta of aβx + bβy
• βp=
E{[aX + bY − aE(X) − bE(Y)][Rm − E(Rm)]}
VAR(Rm)
= aβx + bβy
• This is a very useful property – betas of individual assets are sufficient to
compute the portfolio beta.
PROPERTIES OF THE CAPM
Exercise: Which assets below are potentially mispriced?
What is unique about Stock D above?
TESTS OF THE CAPM (EMPIRICAL)
Researchers have tested the model since its
development – and found contradicting or non-
conclusive “evidence”
Main tests have been along the lines of:
• Whether the model is linear
• Whether factors other than beta are needed to
explain returns
Testing the CAPM is not straight forward – various
econometric challenges to overcome
Example:
Distinction between ex-ante and ex-post forms of the
model
Rjt = E(Rjt ) + βjδmt + εjt , where δmt = Rmt - E(Rmt); εjt is a
random error term; βj = COV((Rjt, Rmt)/VAR(Rmt )
Substituting E(Rjt ) from CAPM:
Rjt = Rft + E(Rmt - Rft) βj + βj(Rmt - E(Rmt)) + εjt
= Rft + (Rmt - Rft)βj + εjt , or
Rjt - Rft = (Rmt - Rft)βj + εjt
TESTS OF THE CAPM (EMPIRICAL)
Rjt - Rft = (Rmt - Rft)βj + εjt
Empirical tests are usually based on running regressions using the above
specification. Most studies look for the following:
• The intercept term of the regression should be zero (or not significantly different from
zero)
• Beta should be the only significant factor explaining returns. If other factors (such as
dividend yield, P/E ratios, firm size, or non-linear terms such as beta-squared are
included in the specification, they should turn out insignificant i.e. have no explanatory
power)
• When the estimation is done over a long period of time, the rate of return on the
market portfolio should be greater than the risk-free rate (though this is not directly a
test of CAPM – more of a ‘sanity check’)
Main findings have been:
• The intercept term is found to be different from zero usually
• Most studies find that using other factors improves the model (i.e. they have some
explanatory power) but beta dominates
• Over long periods of time excess market returns are positive
There has been much debate however whether methodological issues are the main
reason for the observed deviations!
• There seems to be some agreement that beta indeed captures some level of risk and
hence the model is useful (and used widely in the industry)
THE ARBITRAGE PRICING THEORY (APT)
APT is similar to CAPM but more general:
• Rate of return on an asset is a linear function of k factors:
� i = E(� i) + bi1 �1+ bi2 �2 + ⋯+ bik �k+ ̃I
• Note: the factors, Fi, are mean zero factors common to all assets
• These factors can be interpreted to be macro economic factors in
some cases (interest rates, inflation, etc) – but not always
• The CAPM can be seen as a special case of APT where
covariance with the market is the only risk factor
ARBITRAGE PRICING THEORY (APT)
Required Conditions for APT:
• Perfectly Competitive and Frictionless Markets
• Homogenous beliefs (i.e. everyone agrees on the factors and the
linear specification)
• Number of assets, n, be much larger than number of factors, m
• Noise term, ݁̃i, be independent of all factors and noise terms for
other assets (idiosyncratic)
General idea behind APT
• All portfolios that can be formed using i) no wealth, and ii) have
no risk, must earn no return on average (Arbitrage portfolios)
• i) How to form a portfolio with no wealth?
;0 
n
iw
1i
ARBITRAGE PRICING THEORY (APT)
• ii) How to form a portfolio with no risk?
 Eliminate systematic and idiosyncratic risk
nnnn
i
n
i
ip RwR
~~~~
~
1
~



• Idiosyncratic risk can be eliminated by keeping wi small i.e. wi ≈1/n
i
i
ikik
i
ii
i
ii
i
i ewFbwFbwREw
11
11
11
...)( 


and n is large
• Systematic risk can be eliminated by choosing wi such that for each
factor k the weighted sum of systematic factor loadings is zero
0)(
~~
 i
n
ip REwR
• (Why = 0?)
1i
ARBITRAGE PRICING THEORY (APT)
• What does all this mean?
• The expected return vector can be represented as a linear combination
of a constant and the coefficient vectors.
• Why?
• Because of the orthogonality conditions
01.
1


n
i
iw 0
1


ik
n
i
ibw 0)(
~
1


i
n
i
i REw
• In other words :
If th i i kl t ith t R   R (Wh ?)
ikkiii bbbRE   ...)( 22110
~
• ere s a r s ess asse , w re urn f 0 = f y
• So the expected return can be represented in excess returns form:
bbbRRE  )(
~
• This is a very intuitive result: Excess return is a function of the factor
loadings (bik) and the factor risk premiums (k)
ikkiifi  ...2211
ARBITRAGE PRICING THEORY (APT)
Arbitrage Pricing Line
• Risk premium, , can be defined as the excess expected return of a
portfolio that has a unit response to the kth factor and zero response
to the other factors.
PRACTICE PROBLEMS FOR THE MID-TERM
PRACTICE PROBLEMS FOR THE MID-TERM
PRACTICE PROBLEMS FOR THE MID-TERM
CODING ASSIGNMENT
Implementing a multifactor Gaussian
Copula Model
(An APT based Approach for Evaluating
Structured Credit Securities)
STRUCTURED CREDIT RISK FACTORS
Primary Risk Drivers
• Default probability
• Performance would be directly affected by quality of underlying asset pool
• Correlation (Dependence)
• Determines the likelihood of joint defaults
• Recovery
• Determines level of loss in instances of defaults
Why does correlation matter?
• Correlation determines the shape of the (collateral) loss distribution
• Shape of the loss distribution determines the risk (hence fair value / price) of
tranches.
• Change in loss distribution ⇔ Change in the probability of
experiencing a given loss level
• Increase / decrease in correlation increases / decreases the likelihood of extreme
events*
* Note: 1) Extreme events can be both positive or negative
2) Correlation does not affect the mean or Expected Loss of the
underlying pool of assets.
• Correlation (along with Recovery / Loss Given Default / Loss Severity) determines
the risk of different tranches
Structured Credit Instruments are thus sometimes called “correlation
products”.
CODING ASSIGNMENT
• Example
• Portfolio of 200 assets
• 5 year horizon
• Asset default probability of 2.3% (BBB level)
• Generate default distribution using different levels of correlations and a
one factor Gaussian copula default time model
• CODING ASSIGNMENT
• Implement a more generic version of the above example where information on N assets
can be read from an Excel File
• Horizon for the analysis should be a user input
• Asset default probabilities could come from the same input Excel file
• Generate and plot a default distribution using correlation information from the input Excel
file (i.e using factor loadings for each asset) and the option to select up to 5 factors (user
input).
IMPACT OF CORRELATION ON THE DEFAULT
DISTRIBUTION
Increase / decrease in correlation increases / decreases the likelihood of extreme
events
• Again, extreme events can be both positive (no or low defaults) or negative (high defaults)
Correlation impacts different tranches differently
• Beneficial for Equity/First Loss tranche
• Detrimental for Senior tranches
Correlation Effect on Default Distribution
0.00%
5.00%
10.00%
15.00%
20.00%
25.00%
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Number of Defaults
Pr
ob
ab
ilit
y
0% Correlation
10% Correlation
20% Correlation
THE DEFAULT TIME MODEL
• With a Default Time Model, the objective is to model the timing of losses
on a collateral portfolio taking into account the primary CDO risk drivers
• Default probability term structure
• Correlations
• Loss Given Default or Recovery
THE GAUSSIAN COPULA DEFAULT TIME MODEL
Define:

where Si and Zi ~ N(0,1)
By construction, correlation between Xi and Xj = ai1.aj1 + ai2.aj2 +…+ain.ajn and Xi ~ N(0,1)
• Transform the correlated Xi’s to correlated uniform variates Ui’s
• Ui = Φ(Xi), where Φ is the standard cumulative normal distribution function
• If Ui > Pi(t) , then firm i does not default by time t
• If Pi(t1) < Ui < Pi(t2) , then firm i defaults between time t1 and t2
Note: It is more efficient to implement the model in terms of returns
rather than default probabilities
• If Xi > Φ−1(Pi(t)) , then firm i does not default by time t
• If Φ−1(Pi(t1)) < Xi < Φ−1(Pi(t2)), then firm i defaults between time t1
and t2
2 2 2
1 1 2 2 1 2. . ... . . 1 ...i i i in n i i i inX a S a S a S Z a a a= + + + + − − − −
FULL IMPLEMENTATION OF THE MODEL
Aggregate Simulation Trials to:
• Calculate Default Likelihood / Expected Losses for each tranche
• One can also compute a ‘fair’ tranche price i.e. the spread level that equates discounted expected
spread earnings to discounted expected losses (if risk-neutral PDs are used)
essay、essay代写