Formules Flashcards
Garch volatility estimator
σ_n^2 = γ * VL + αu_{n-1}^2 + βσ_{n-1}^2
With 7 being gamma, VL being long-term volatility, the second term being alpha * return^2 and the third term being beta * var
EWMA volatility estimator
σ_n^2 = λσ_{n-1}^2 + (1 - λ)u_{n-1}^2
Lambda * var+ (1-lamda) * return^2
T-day X% value at risk with
VaR = Pt√TσpN^(-1)(X)
With PT = portfolio value
N^(-1)(X) equalling Z-value of the Xth percentage
Stock price path in the risk-neutral world
S_t+δt = S_t * e^((r - (σ^2)/2)δt + σ√δtZ)
So stock price * exp (return-var/2)*delta t + stdev * sqrt (delta T) * Z
Z being random number of deviations from the mean
Sharpe ratio
Sp = (rp - rf) / σp
Information ratio
αp / σ(εp)
So alpha portfolio / idiosyncratic stdev
Treynor ratio
Tp = (rp - rf) / βp
Gamma and vega hedging
[ option1* ] = [ r1 g1 ]^-1 [ -Γp ]
[ option2* ] [ v0 g2 ] [ -νp ]
So Mmult matrix inverse of option greeks * portfolio values
Then recalculate delta
Hedge delta with -delta stocks
State prices and risk-neutral state prices
State-prices:
qu = (R - D) / (R(U - D))
qd = (U - R) / (R(U - D))
Risk-neutral state prices
πU = (R - D) / (U - D)
πD = (U - R) / (U - D)
With pay-off for risk-neutral needing to be discounted
Opinion-adjusted weights (so for black litterman/envelope portfolio/market portfolio with RF rate)
z = S^(-1)(E(r)^adj - rf)
With S being the var/covar matrix and ^-1 being its inverse
Black-Litterman steps with formulas
- E(R) market= E(r)_market = Sm* + rf -> so not weights * av. return!
- Normalization factor: (m^opinion - rf) / (m^T Sm)
(M^opinon / E(r)) also seems to work!
- Normalized expected returns
E(r)_normalized = Sm^opinion - rf + rf / (m^T Sm* + rf)
Although old return * normalization factor also seems to work
- Adjust returns for N individual stock opinions
μ^adj_i = μ_i + σ_i,1^2 * τ_1 + … + σ_i,j^2 * τ_j + … + σ_i,N^2 * τ_N
Which is basically the old stock price + (varstock/varotherstock) * delta for otherstock
Of course a delta for the stock itself will have varstock/varstock = 1 and thus be fully incorporated
- calculate opinion adjusted weights
z = S^(-1)(E(r)^adj - rf)
With S being var/covar matrix
M* being weights
M^opinion opinion on market returns
Portfolio var
σp^2 = w^T Σw
σp^2 is the variance of the portfolio.
w is the vector of weights of the assets in the portfolio.
w^T is the transpose of the vector of weights.
Σ (Sigma) is the covariance matrix of the asset returns.
Delta
N(D1) for call options
N(-D1) for put option
Which is norm.s.dist function (or perhaps normsdist also works)
Calculation of expected shortfall
Average loss within VaR
So if 5% VaR would be a loss of 6% which equals 60k
The average loss if the loss of 6% is met or exceeded could be 7.5%
Then expected shortfall would be 75k
Stock movement in up state
U = e^(stdevsqrt(delta t)
or exp(stdevsqrt(delta t)
D = exp(stdev*-sqrt(delta t)