frm-cheat-sheet
frm-cheat-sheet
Linear Regression Formulas Statistical test Volatiltiy and Value at Risk Important info
√
β= Cov[x,y]
= ρ σσxy White Test: It is a test of eteroschedicity. The null Condition for T rule Condition to apply the rule
var[X]
hypothesis is the linear regression of all the explana- for volatility:
βBiased = β1 + β2 ρ σσ12
tory variable and cross products of them against the
p
S.E.(β) = √nσ s σt = t/T σT
x errors ϵi must contains only parameters not significa- is that risk factor timeseries be iid. Otherwise, if ti-
double tail p value = 2(1 − ϕ(T )) tivley different from zero:
R2 1 par = ESS RSS meseries is correlated, we need to apply: σrt,t+2 =
T SS = 1 − T SS ϵi = γ0 + γ1 X1 + γ12 X1X2 + γ2 2X 2 + γ2 X2 σrt,t+1 + σrt+1,t+2 + 2Cov[rt,t+1 , rt+1,t+2 ]
R2 k par, adjusted = 1 − RSS/(n−k−1) F-test on γs insignificant.
T SS/(n−1) that is a greater value.
F-Test Test for the linear regression of multiple ex- Ghosting Effect is the effect that is created for ins-
planatory variables. The idea is to get the R2 of a tace by MA. When a past observation disappear from
TimeSeries analysis Formulas unrestricted model (all explanatory variables) and res- window you are estimaating volatiltiy on, there can
AR(1) : tricted model (model without the variables you want be a great change in today volatility justified only by
rt = δ + ϕrt−1 + ϵt to test the explanatory power). The test statistic is a a past obeservation disappearing.
ϵt = (1 − ϕL)rt F-statistic2 with
2
value: Approaches The approches for estimating volatiltiy
(R −RR )/q
M A(1) : F = (1−R2U )/(n−k u −1 can be Parametric and Non-Parametric. Under pa-
U
rt = δ + ϵt + θϵt−1 VIF : test for multicollinearity between explanatory rametric apprach we have: GARCH, EWMA. Under
rt = (1 + θL)ϵt variables. You regress a variable on all the others and non parametric we have Historical Simulation, Multi-
ARM A(1, 1) : then compute the R2 . Vif is given as: variate density estimation.
1
rt = δ + ϕrt−1 + θϵt−1 + ϵt V IF = 1−R 2 Var properties Var is not a coherent function, like
If VIF is greater than 10 then variable is multicolli- volatiliy, expected shortfall or other. A measure to be
near. choerent must be:
Measuring Volatility and Value at Risk formulas Cook’s distance it test the presence of outliers. You
need to create models without point you want to test 1. Subadditivity: V AR[A, B] ≤ V AR[A] +
GARCH(1, 1) :
as outlier and the model with all point. The distance V AR[B] where A and B are two portfolios (or
σt2 = ω + αrt−1
2 2
+ βσt−1
ω between thisPtwoj models is defined as : single assets). VAR doesn t decrease always on
LongRunAverage = 1−α−β
CooksD =
(Ŷi −Ŷi ) diversification.
σn+t = LongRunAverage + (α + β)t (σn − ks2
LongRunAverage) where k is the number of explanatory variable and s 2. Monotonicity: If expected value of A is greater
EW M A : is the variance (from MSE). If ¿ 1 possible outlier than B, than risk of A is less than B. So we
σt2 = ασt−1
2 2
+ (1 − α)rt−1 α = 0.97 Liung Box Q: Test for autocovariance of a timese- shoud expect V AR[A] ≤ V AR[B]
∆t
q
∆t
ries.
V ARp/i = −µp T + T σp zα
Pm
QLB = T (T + 2) τ ρ2 (τ )( T −τ 1
) where τ is lag, ρ is 3. Translation Invariance: If you add cash reduce
pdfα σ
ESα = 1−α
autocorrelation function, T the sample size risk: V AR[A + Cash] < V AR[A]
Box Pierce Q: Test for autocovariance of a timese-
ries. 4. Positive Homogeneity: greater size of portiolio
TimeSeries analysis Important info Pm
QBP = T τ ρ2 (τ ) means greater risk: V AR(λA) = λV AR(A)
Stationarity conditions: for AR The root of the
where ρ is autocorrelation function, T the sample size. VAR lack subadditivity.
characteristic polynomials of a AR must be outside
BoxPierce and Liung Box have a χ21−α,m statistic,
unit circle (other wise there is a unit root).
where m is the number √ of lag you are testing, α is
For MA, they are always stationary. But they can be Distributions
treshold p-value. m ≃ T
not invertible if the prevoius condition is not realized. 2
σBinomial = nP (1 − P )
Dickey Fuller/ Augmented Dickey Fuller: Test
for unit root. σχ2 = 2ν
Probability σP2 oisson = λ
2
Bayes: P (A|B) = P (B|A)P (A)
. Or: P (A ∪ B) = σstudent = ν/(ν − 2)
P (B)
P (B) + P (A) − P (A ∩ B). And: P (A ∩ B) =
P (B)P (A) = P (B|A)P (B).
Valuation and Risk Models
Binomial trees Trading Strategies Exotic Options
ert −d Covered Call: S − C Gap there is a trigger level K2 and a strike K1. when
risk neutral probabiltiy: p = u−d
if you know σ: u = eσt ; d = e −σt Protective Put: P + S pricing you need to use k2 in computing d1 and d2 of
(r−d)t Principle Protected Note: P V (K) + BS.
stock with dividend: p = e u−d−d
C(atT heM oney) Forward start Today is T, option start at T1.p =
e(rdomestic −rf oreign )t −d
foreign exchange option: p = u−d Bull Spread : K2 > k1 ce−qT 1 q dividend yield.
1−d
Futures options: p = u−d Buy lower strike, sell greater Cliquet Forward start options in which strike is de-
1−d Bear Spread : K2 > k1 cided in future.
Futures options: p = u−d
−fd
∆ = fuu−d Buy greater strike, sell lower Compund Option on Option.
Box Spread : Bull + Bear Chooser at maturity, you can choose the type of op-
it worth K2-K1, and price PV(K2-K1) tion (put or call).
Black-Scholes Model Butterfly: k1 < k3 < k2, K3 in the middle Binary They can be cash or nothing (PV(Q)N(d2))
Non dividend pay stock: Buy K1, Buy K3, sell 2 K2 or asset or nothing (PV(S)N(d1)) . Sum of cash or
C = SN (d1) − P V (K)N (d2) Straddle: Call and put on Same strike. nothing and asset or nothing european call.
2
ln( S
k )+(r+
σ
2 )T Write Straddle when you sell both, purchase straddle Barrier The payoff depend whether the strike touch
d1 = √
σ T
σ2
when you buy both. or not the barries during life. There are knock in and
ln( S
k )+(r− 2 )T
d2 = √
σ T
strip on the same K, (Purchase) you are long on 1 Knock out. there is the rule that a knock out plus the
call and long on 2 put associate knock in is a european option.
dividend pay stock: strap on the same K, (Purchase) you are long on 2 Parisian It is a barrier but the option must be above
C = Se−dT N (d1) − P V (K)N (d2) call and long on 1 put the barrier for a certain period.
2
ln( S
k )+(r−d+
σ
2 )T strangle Same as straddle but with different K. So Lookback The payoff depend on the history of the
d1 = √
σ T
σ2
K1 < K2, buy put on K1 and call on k2 stock: floting call: S-Smin; floating put: Smax-S; fi-
ln( S
k )+(r−d− 2 )T
d2 = √
σ T
xed call Smax-K; fixed put: K-Smin
Vanilla Options Asian The payoff depend on average of the price his-
FX option: tory. it can be: Average price: Saverage- K; Average
Put - Call (european) Parity: P + S = C +
C = Se−rf oreign T N (d1) − P V (K)N (d2) strike; S-Saverage. usefull for fx exposure.
σ2
P V (K)
ln( S
k )+(r−r√
f oreign + 2)T Volatility Swap There is a swap between the expec-
d1 = σ T
Put - Call (American) Parity: S − K ≤ C − P ≤
ted volatility and realized volatility on index/stock.
ln( S
k )+(r−rf
2
− σ )T S − P V (K)
d2 = √oreign 2
σ T bound (european) call S ≥ C ≥ S − P V (K)
bound (european) Put P V (k) ≥ P ≥ P V (K) − S Credit Risk Formulas
Futures (Black-62): bound (American) call S ≥ C ≥ S − P V (K) EL = P D ∗ p
LGD = P D ∗ EAD ∗ (1 − RR)
C = F N (d1) − P V (K)N (d2) bound (American) Put k ≥ P ≥ K − S 2
U L = EAD P D ∗ σLGD + LGD2 ∗ σP2 D
2
ln( F
k )+(
σ
)T 2
d1 = √ 2 In case of dividend pay stock you need to subtract Remember σP D = P D(1 − P D)P
σ T U Li ( U Lj ρj )
ln( F σ2 D (present value of Dividend) in the lower bound Risk Contribution U LCi = alll oansa lsoi
k )+(− )T
d2 = √ 2
σ T
U Lp
Risk weighted asset ECi = U LCi CMi √
American Call option should be exercised only on σ 1+(n−1)ρ
Dividend pay stock when D = K-PV(K). Standard deviation of credit losses α = √nEAD
Greeks p √
An American Put can be often be exercised early. one factor model Ui = ai F + 1.a2i Zi with ρ = a2
∆ = N (d1) √
N −1 (P D)+ ρN −1 (x)
′ Vasicek W CDR(X) = N ( √ )
Γ= N (d1)
√ 1−ρ
Sσ T √
V ega = Sσ T N ′ (d1)
Black-scholes-merton PDE can be seen as
Θ + rs∆ + 12 σ 2 S 2 Γ = RΠP
Portfolio Delta: ∆p = wi ∆i
Credit Risk info Interest Rate Risk Pricing and conventions
Risk Capital: The idea is that a bank need to Macaulay Duration Average time to maturity Annuity: Y 1/k [1 − (1+y/k)1
kt ]
structure its capital and the risk capital can be seen Modified Duration M acaulayDuration m payment
1+y/m Treasury Bill: QUoted Price = 360 n (100 −
as all its capital at risk , that it take from sharehol- frequency
P −P CashP rice), n is remaining life. This means that the
ders, creditors, depositors. If equity fall down the Effective Duration y−ϵP0 2ϵy+ϵ quoted price is a rate, but it is not the real yield that
liabiltiies, the critical treshold for a bank to be still
Py−ϵ +Py+ϵ −2P0 is:
considered as still ”going concern”is the limit between Effective Convexity 100Q
P0 (2ϵ=2 yield = Cash
junior debt and senior debt. If this is exceed, this can
DM odif ied ×P rice Bonds in America are 30/360, corporate bond are of-
lead a downgrade or a ”gone concern”. The economic Dollar Value 01 DV 01 = =
10000 ten Act/act.
capital is the buffer banks put aside to avoid this . Dollarduration
10000 Treasury Bond Future: A treasury bond future
Economic Capital: It is generally defined as:
allow the seller to deliver the chepest to delivery bond
EC = U L − EL Duration × ∆Y = P ercentageChangeInP rice (CTD). To get it you need to minimize the difference
under IRB, this must be estimated as : DV 01 × ∆YBP S = P ercentageChangeInP rice between cash received by seller (that depend on con-
(W CDR − P D)LGD ∗ EAD Properties: tract feature) and cash prices of bonds:
Capital Multiplier Under the standardized appro-
CostOfDelivery = QUotedPrice + AccuredInterest
ach of Basel II the idea is to attach a multiplier to the 1. Increasing Coupon, Duration decrease
CashReceived = SettlmenentPrice X ConversionFac-
risk contribution of an instrument in order to get its
2. Increase coupon, DV01 increase ( Pull to Par in tor + AccruedInterest
capital requirement (regulatory capital):
reverse) The CTD is the bond for witch Cost - Cash is mini-
ECi = U LCi ∗ CMi
mum
capital multiplier represent a percentile. 3. Fixing coupon and maturity, increasing yield, For the pricing of a Future you need to account:
duration increase F utureP riceOf Bond = (S − I)erT − AI, where S is
Mortgage/Mortgage Back Securities the cash price today, I is the PV of cash flow that will
4. Becasue Portfolio duration is the weighted sum
AmountBorrowed P = be received from now to maturiy, AI is the accreud
12T 1 of instruments duration you can create portfo-
M onthlyP ayment i=0 (1+y/12)n interest in time to delivery. When you have this:
lios with a certain duration with two strategies:
AmountBorrowed = M onthlyP ayment 1
[1 − (1+y/12)12T ] F utures = FConversionF
utureP riceOf Bond
actor
y/12
1) Barbell: Long duration and low duration to
In the calculator you can simply compute this amount get a median portfolio duration. NB, must be
Modern Portfolio Theory, APT and performance
creating a bond with 0 FV and PV equal to the computed weighted on PRICE not Fave Value
Capital Market Line CM L : E[Rp ] = r +
amount borrowed. Moving then on Bond computati- 2) Bullet: all bond with the desired durations. E[Rm ]−r
ons you can find also outstanding and principal pay- σm σp
ments. 5. Notice that effect of convexity ( that is positive Sharpe Index SP I = E[Ri ]−r
σi
Mortgage Backed securities are pool of bonds, prin- in Bond) is that a loss computed from dura- E[Ri ]−r
Treynor T P I = .
Should be equal to
cipal and interest cash flow of it are sell back to in- tion will be greater in reality and gain computed βi
from duration will be lower in reality. E[Rm ] − r at equilibtium.
vestors thanks to an SPV and a mortgage guarantors Jensen’s alpha It is the alpha of a CAPM like
that pay the principal in case of default of a bond in regression:Ri − r = α̂ + β̂i (Rm − R). Should be 0
the pool. So the main risk the investors are exposed Appendix
at equilibrium
is the prepayment risk. Euler’s theorem: Given F homogeneous risk mea- Sortino ratio More general focus on the down-
Fro MBS we have: sure P
(as VAR) we can decompose it as : side risk. Given a benchmark return r: SR =
WAC: weighted average Coupon F = i Qi √P Rp −r
∆F 2
min(0,Rpt −T )
WAM: weighted average maturity Where Q1 = ∆X i
i.e. the risk measure computed only history