Portfolio Conditional Value at Risk (CVaR)
quantlib-portfolio
Portfolio Conditional Value at Risk (CVaR)
Calculates portfolio Conditional Value at Risk (CVaR), also known as Expected Shortfall (ES). CVaR measures the expected loss given that the loss exceeds the VaR threshold.
Use Cases:
- Tail risk assessment
- Risk management for extreme events
- Coherent risk measure (superior to VaR)
- Optimization objective for conservative portfolios
Advantages over VaR:
- Captures tail risk beyond the VaR threshold
- Coherent risk measure (sub-additive)
- Better for portfolio optimization
Interpretation: CVaR of 75,000.
Credits: 5 per request [Tier: PRO, Credits: 5]
POST
Portfolio Conditional Value at Risk (CVaR)
Authorizations
API key for authentication. Get your key at https://api.fincept.in/auth/register
Body
application/json
Portfolio weights (should sum to 1.0)
Example:
[0.3, 0.25, 0.25, 0.2]
Asset covariance matrix (annualized)
Example:
[
[0.04, 0.006, 0.008, 0.01],
[0.006, 0.09, 0.012, 0.015],
[0.008, 0.012, 0.0625, 0.018],
[0.01, 0.015, 0.018, 0.16]
]
Confidence level (e.g., 0.95 for 95% CVaR)
Required range:
0.5 <= x <= 0.999Example:
0.95
Time horizon in years
Required range:
0.001 <= x <= 10Example:
0.00396825
Current portfolio value in currency units
Required range:
x >= 0Example:
1000000
