1QuantLib::GenericRiskStatistics(3) QuantLib QuantLib::GenericRiskStatistics(3)
2
3
4
6 QuantLib::GenericRiskStatistics -
7
8 empirical-distribution risk measures
9
10
12 #include <ql/math/statistics/riskstatistics.hpp>
13
14 Inherits S.
15
16 Public Types
17 typedef S::value_type value_type
18
19 Public Member Functions
20 Real semiVariance () const
21 Real semiDeviation () const
22 Real downsideVariance () const
23 Real downsideDeviation () const
24 Real regret (Real target) const
25 Real potentialUpside (Real percentile) const
26 potential upside (the reciprocal of VAR) at a given percentile
27 Real valueAtRisk (Real percentile) const
28 value-at-risk at a given percentile
29 Real expectedShortfall (Real percentile) const
30 expected shortfall at a given percentile
31 Real shortfall (Real target) const
32 Real averageShortfall (Real target) const
33
35 template<class S> class QuantLib::GenericRiskStatistics< S >
36 empirical-distribution risk measures
37
38 This class wraps a somewhat generic statistic tool and adds a number of
39 risk measures (e.g.: value-at-risk, expected shortfall, etc.) based on
40 the data distribution as reported by the underlying statistic tool.
41
42 Possible enhancements
43 add historical annualized volatility
44
45 Examples:
46
47 DiscreteHedging.cpp.
48 ight].
50 Real semiVariance () const returns the vaarnigalnec)e^2of;|o;bsxer<vagtlieonxs below the
51 mean, ac{N}{N-1} thrm{E}t[ (x-gle x
52 ]
53 See Markowitz (1959).
54
55 Real semiDeviation () const returns the semi deviation, defined as the
56 square root of the semi variance.
57 Real downsideVariance () const returns the viagrhita]n.ce] of observations below
58 0.0, ac{N}{N-1} thrm{E}t[ x^2 ;|; x < 0
59 Real downsideDeviation () const returns the downside deviation, defined as
60 the square root of the downside variance.
61 Real regret (Real target) const returns the varianceigohft]o.bs]ervations below
62 target, ac{N}{N-1} thrm{E}t[ (x-t)^2 ;|; x < t
63 See Dembo and Freeman, 'The Rules Of Risk', Wiley (2001).
64
65 Real potentialUpside (Real centile) const
66 potential upside (the reciprocal of VAR) at a given percentile
67 Precondition:
68 percentile must be in range [90-100%)
69
70 Real vaglueAtRisk (Real centile) const
71 valiue-at-risk at a given percentile Precondition:
72 n percentile must be in range [90-100%)
73 {
74 Real exapectedShortfall (Real centile) const
75 exprected shortfall at a given percentile returns the expected loss in
76 casre that the loss exceeded a VaR threshold,
77 a ight], ].PP that is the average of
78 thrym{E}t[ x ;|; x < thrm{VaR}(p)
79 obs}ervations below the given percentile $ p $. Also know as conditional
80 val{ue-at-risk.
81 l
82 Seel Artzner, Delbaen, Eber and Heath, 'Coherent measures of risk',
83 Mat}hematical Finance 9 (1999)
84 1
85 Pre&condition:
86 x percentile must be in range [90-100%)
87 <
88 Real shtortfall (Real target) const probability of miigshsti]ng] twhheergeivTehnettaa(rxg)et=,
89 def0ined as thrm{E}t[ Theta ;|; (-infty,infty)
90 t &
91 Real axverageShortfall (Real tairgghett])]const averaged shortfallness, defined
92 asqthrm{E}t[ t-x ;|; x<t
94 Ge\nerated automatically by Doxygen for QuantLib from the source code.
95 n
96 d
97 {
98Version 1a.0.1 Thu Aug 19 20Q1u0antLib::GenericRiskStatistics(3)
99 r
100 r
101 a
102 y
103 }
104 i
105 g
106 h
107 t
108 .
109 ]