portvrisk

Portfolio value at risk (VaR)

Description

example

ValueAtRisk= portvrisk(PortReturn,PortRisk)returns the maximum potential loss in the value of a portfolio over one period of time (that is, monthly, quarterly, yearly, and so on) given the loss probability level.portvriskcalculatesValueAtRiskusing a normal distribution.

example

ValueAtRisk= portvrisk(___,RiskThreshold,PortValue)adds optional arguments forRiskThresholdandPortValue.

Examples

collapse all

This example shows how to return the maximum potential loss in the value of a portfolio over one period of time, whereValueAtRiskis computed on a per-unit basis.

PortReturn = 0.29/100; PortRisk = 3.08/100; RiskThreshold = [0.01;0.05;0.10]; PortValue = 1; ValueAtRisk = portvrisk(PortReturn,PortRisk,...RiskThreshold,PortValue)
ValueAtRisk =3×10.0688 0.0478 0.0366

This example shows how to return the maximum potential loss in the value of a portfolio over one period of time, whereValueAtRiskis computed with actual values.

PortReturn = [0.29/100;0.30/100]; PortRisk = [3.08/100;3.15/100]; RiskThreshold = 0.10; PortValue = [1000000000;500000000]; ValueAtRisk = portvrisk(PortReturn,PortRisk,...RiskThreshold,PortValue)
ValueAtRisk =2×1107× 3.6572 1.8684

Input Arguments

collapse all

Expected return of each portfolio over the period, specified as a scalar numeric or anNPORTS-by-1vector.

Data Types:double

Standard deviation of each portfolio over period, specified as a scalar numeric orNPORTS-by-1vector.

Data Types:double

(Optional) Loss probability, specified as a scalar decimal or anNPORTS-by-1vector.

Data Types:double

(Optional) Total value of asset portfolio, specified as a scalar numeric or anNPORTS-by-1vector.

Note

IfPortReturnandPortRiskare in dollar units, thenPortValue应该是1. IfPortReturnandPortRiskare on a percentage basis, thenPortValue应该是the total value of the portfolio.

Data Types:double

Output Arguments

collapse all

Estimated maximum loss in the portfolio, returned as anNPORTS-by-1vector.ValueAtRiskis predicted with a confidence probability of1RiskThreshold.

Note

IfPortValueis not given,ValueAtRiskis presented on a per-unit basis. A value of0indicates no losses.

Introduced before R2006a