org.jquantlib.math.statistics
Class GenericRiskStatistics
- java.lang.Object
-
- org.jquantlib.math.statistics.GeneralStatistics
-
- org.jquantlib.math.statistics.GenericGaussianStatistics
-
- org.jquantlib.math.statistics.GaussianStatistics
-
- org.jquantlib.math.statistics.GenericRiskStatistics
-
- Direct Known Subclasses:
- IncrementalStatistics, RiskStatistics
public class GenericRiskStatistics extends GaussianStatistics
empirical-distribution risk measuresThis 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 statistic tool.
-
-
Constructor Summary
Constructors Constructor and Description GenericRiskStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleaverageShortfall(double target)averaged shortfallness, defined asdoubledownsideDeviation()returns the downside deviation, defined as the square root of the downside variance.doubledownsideVariance()returns the variance of observations below 0.0, \frac{N}{N-1} \mathrm{E}\left[ x^2 \;|\; x < 0\right].doubleexpectedShortfall(double centile)expected shortfall at a given percentiledoublepotentialUpside(double centile)potential upside (the reciprocal of VaR) at a given percentiledoubleregret(double target)returns the variance of observations below target, \frac{N}{N-1} \mathrm{E}\left[ (x-t)^2 \;|\; x < t \right].doublesemiDeviation()returns the semi deviation, defined as the square root of the semi variance.doublesemiVariance()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].doubleshortfall(double target)probability of missing the given target, defined as where \Theta(x) = \left\{ \begin{array}{ll} 1 & x < t \\ 0 & x \geq t \end{array} \right.doublevalueAtRisk(double centile)value-at-risk at a given percentile-
Methods inherited from class org.jquantlib.math.statistics.GenericGaussianStatistics
gaussianAverageShortfall, gaussianDownsideDeviation, gaussianDownsideVariance, gaussianExpectedShortfall, gaussianPercentile, gaussianPotentialUpside, gaussianRegret, gaussianShortfall, gaussianTopPercentile, gaussianValueAtRisk
-
Methods inherited from class org.jquantlib.math.statistics.GeneralStatistics
add, add, addSequence, addSequence, addSequence, addSequence, data, errorEstimate, expectationValue, kurtosis, max, mean, min, percentile, reset, samples, skewness, sort, standardDeviation, topPercentile, variance, weightSum
-
-
-
-
Method Detail
-
semiVariance
public double semiVariance()
returns the variance of observations below the mean,- See Also:
(1959).
-
semiDeviation
public double semiDeviation()
returns the semi deviation, defined as the square root of the semi variance.
-
downsideVariance
public double downsideVariance()
returns the variance of observations below 0.0,
-
downsideDeviation
public double downsideDeviation()
returns the downside deviation, defined as the square root of the downside variance.
-
regret
public double regret(double target)
returns the variance of observations below target,- See Also:
and Freeman, "The Rules Of Risk", Wiley (2001).
-
potentialUpside
public double potentialUpside(double centile)
potential upside (the reciprocal of VaR) at a given percentile
-
valueAtRisk
public double valueAtRisk(double centile)
value-at-risk at a given percentile
-
expectedShortfall
public double expectedShortfall(double centile)
expected shortfall at a given percentilereturns the expected loss in case that the loss exceeded a VaR threshold,
that is the average of observations below the given percentile \f$ p \f$. Also know as conditional value-at-risk.
- See Also:
Artzner, Delbaen, Eber and Heath, "Coherent measures of risk", Mathematical Finance 9 (1999)
-
shortfall
public double shortfall(double target)
probability of missing the given target, defined as where \Theta(x) = \left\{ \begin{array}{ll} 1 & x < t \\ 0 & x \geq t \end{array} \right. }
-
averageShortfall
public double averageShortfall(double target)
averaged shortfallness, defined as
-
-
DataMelt 3.0 © DataMelt by jWork.ORG