GenericRiskStatistics Class Template Reference

#include <riskstatistics.hpp>

List of all members.


Detailed Description

template<class S>
class QuantLib::Math::GenericRiskStatistics< S >

empirical-distribution risk measures

This class wraps a somewhat generic statistic tool and adds a number of risk measures (e.g.: value-at-risk, expected shortfall, etc.) based on the data distribution as reported by the underlying tool.


Public Member Functions

double semiVariance () const
double semiDeviation () const
double downsideVariance () const
double downsideDeviation () const
double regret (double target) const
double potentialUpside (double percentile) const
 potential upside (the reciprocal of VAR) at a given percentile

double valueAtRisk (double percentile) const
 value-at-risk at a given percentile

double expectedShortfall (double percentile) const
 expected shortfall at a given percentile

double shortfall (double target) const
double averageShortfall (double target) const


Member Function Documentation

double semiVariance  )  const
 

returns the variance of observations below the mean,

\[ \frac{N}{N-1} \mathrm{E}\left[ (x-\langle x \rangle)^2 \;|\; x < \langle x \rangle \right]. \]

See Markowitz (1959).

double semiDeviation  )  const
 

returns the semi deviation, defined as the square root of the semi variance.

double downsideVariance  )  const
 

returns the variance of observations below 0.0,

\[ \frac{N}{N-1} \mathrm{E}\left[ x^2 \;|\; x < 0\right]. \]

double downsideDeviation  )  const
 

returns the downside deviation, defined as the square root of the downside variance.

double regret double  target  )  const
 

returns the variance of observations below target,

\[ \frac{N}{N-1} \mathrm{E}\left[ (x-t)^2 \;|\; x < t \right]. \]

See Dembo and Freeman, "The Rules Of Risk", Wiley (2001).

double potentialUpside double  centile  )  const
 

potential upside (the reciprocal of VAR) at a given percentile

Precondition:
percentile must be in range [90%-100%)

double valueAtRisk double  centile  )  const
 

value-at-risk at a given percentile

Precondition:
percentile must be in range [90%-100%)

double expectedShortfall double  percentile  )  const
 

expected shortfall at a given percentile

returns the expected loss in case that the loss exceeded a VaR threshold,

\[ \mathrm{E}\left[ x \;|\; x < \mathrm{VaR}(p) \right], \]

that is the average of observations below the given percentile $ p $. Also know as conditional value-at-risk.

See Artzner, Delbaen, Eber and Heath, "Coherent measures of risk", Mathematical Finance 9 (1999)

double shortfall double  target  )  const
 

probability of missing the given target, defined as

\[ \mathrm{E}\left[ \Theta \;|\; (-\infty,\infty) \right] \]

where

\[ \Theta(x) = \left\{ \begin{array}{ll} 1 & x < t \\ 0 & x \geq t \end{array} \right. \]

double averageShortfall double  target  )  const
 

averaged shortfallness, defined as

\[ \mathrm{E}\left[ t-x \;|\; x<t \right] \]


The documentation for this class was generated from the following file:
  • ql/Math/riskstatistics.hpp

QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen