VaR extensions

Nhập môn Quản trị Rủi ro Danh mục bằng Python

Dakota Wixom

Quantitative Analyst | QuantCourse.com

VaR quantiles

Nhập môn Quản trị Rủi ro Danh mục bằng 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

Nhập môn Quản trị Rủi ro Danh mục bằng 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
Nhập môn Quản trị Rủi ro Danh mục bằng Python

Scaling risk

Nhập môn Quản trị Rủi ro Danh mục bằng 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
Nhập môn Quản trị Rủi ro Danh mục bằng Python

Let's practice!

Nhập môn Quản trị Rủi ro Danh mục bằng Python

Preparing Video For Download...