cvar(qf_series: qf_lib.containers.series.qf_series.QFSeries, percentage: float) → float¶
Calculates Conditional Value at Risk for a given percentage. Percentage equal to 0.05 means 5% CVaR.
qf_series (QFSeries) – Series of returns/prices
percentage (float) – Percentage defining CVaR (what percentage of worst-case scenarios should be considered”
Conditional value at risk as a number from range (-1,1). Simplifying: means how much money can be lost in the worst “percentage” % of all cases.
- Return type