QuantLib_GenericGaussianStatistics man page

GenericGaussianStatistics< Stat > — Statistics tool for gaussian-assumption risk measures.

Synopsis

#include <ql/math/statistics/gaussianstatistics.hpp>

Inherits Stat.

Public Types

typedef Stat::value_type value_type

Public Member Functions

GenericGaussianStatistics (const Stat &s)

Gaussian risk measures

Real gaussianDownsideVariance () const

Real gaussianDownsideDeviation () const

Real gaussianRegret (Real target) const

Real gaussianPercentile (Real percentile) const

Real gaussianTopPercentile (Real percentile) const

Real gaussianPotentialUpside (Real percentile) const
gaussian-assumption Potential-Upside at a given percentile
Real gaussianValueAtRisk (Real percentile) const
gaussian-assumption Value-At-Risk at a given percentile
Real gaussianExpectedShortfall (Real percentile) const
gaussian-assumption Expected Shortfall at a given percentile
Real gaussianShortfall (Real target) const
gaussian-assumption Shortfall (observations below target)
Real gaussianAverageShortfall (Real target) const
gaussian-assumption Average Shortfall (averaged shortfallness)

Detailed Description

template<class Stat>

class QuantLib::GenericGaussianStatistics< Stat >" Statistics tool for gaussian-assumption risk measures.

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

Member Function Documentation

Real gaussianDownsideVariance () const

returns the downside variance, defined as [ ac{N}{N-1} imes ac{ sum_{i=1}^{N} heta imes x_i^{2}}{ sum_{i=1}^{N} w_i} ], where $ heta $ = 0 if x > 0 and $ heta $ =1 if x <0

Real gaussianDownsideDeviation () const

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

Real gaussianRegret (Real target) const

returns the variance of observations below target [ ac{sum w_i (min(0, x_i-target))^2 }{sum w_i}. ]

See Dembo, Freeman 'The Rules Of Risk', Wiley (2001)

Real gaussianPercentile (Real percentile) const

gaussian-assumption y-th percentile, defined as the value x such that [ y = ac{1}{sqrt{2 pi}} int_{-infty}^{x} \xp (-u^2/2) du ]

Precondition:

percentile must be in range (0%-100%) extremes excluded

Real gaussianTopPercentile (Real percentile) const

Precondition:

percentile must be in range (0%-100%) extremes excluded

Real gaussianPotentialUpside (Real percentile) const

gaussian-assumption Potential-Upside at a given percentile

Precondition:

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

Real gaussianValueAtRisk (Real percentile) const

gaussian-assumption Value-At-Risk at a given percentile

Precondition:

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

Real gaussianExpectedShortfall (Real percentile) const

gaussian-assumption Expected Shortfall at a given percentile Assuming a gaussian distribution it returns the expected loss in case that the loss exceeded a VaR threshold,

[ mathrm{E}left[ x ;|; x < mathrm{VaR}(p) right], ].PP 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)

Precondition:

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

Author

Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

gaussianAverageShortfall(3), gaussianDownsideDeviation(3), gaussianDownsideVariance(3), gaussianExpectedShortfall(3), gaussianPercentile(3), gaussianPotentialUpside(3), gaussianRegret(3), gaussianShortfall(3), gaussianTopPercentile(3), gaussianValueAtRisk(3) and GenericGaussianStatistics(3) are aliases of QuantLib_GenericGaussianStatistics(3).

Fri Sep 23 2016 Version 1.8.1 QuantLib