VaR extensions

Introduction to Portfolio Risk Management in Python

Dakota Wixom

Quantitative Analyst | QuantCourse.com

VaR quantiles

Introduction to Portfolio Risk Management in Python

Empirical assumptions

Empirical historical values are those that have actually occurred.

How do you simulate the probability of a value that has never occurred historically before?

Sample from a probability distribution

Introduction to Portfolio Risk Management in Python

Parametric VaR in Python

Assuming you have an object StockReturns which is a time series of stock returns.

To calculate parametric VaR(95):

mu = np.mean(StockReturns)
std = np.std(StockReturns)
confidence_level = 0.05
VaR = norm.ppf(confidence_level, mu, std)
VaR
-0.0235
Introduction to Portfolio Risk Management in Python

Scaling risk

Introduction to Portfolio Risk Management in Python

Scaling risk in Python

Assuming you have a one-day estimate of VaR(95) var_95.

To estimate 5-day VaR(95):

forecast_days = 5
forecast_var95_5day = var_95*np.sqrt(forecast_days)
forecast_var95_5day
-0.0525
Introduction to Portfolio Risk Management in Python

Let's practice!

Introduction to Portfolio Risk Management in Python

Preparing Video For Download...