SequenceStatistics Class Template Reference

#include <ql/Math/sequencestatistics.hpp>

List of all members.


Detailed Description

template<class StatisticsType = Statistics>
class QuantLib::SequenceStatistics< StatisticsType >

Statistics analysis of N-dimensional (sequence) data.

It provides 1-dimensional statistics as discrepancy plus N-dimensional (sequence) statistics (e.g. mean, variance, skewness, kurtosis, etc.) with one component for each dimension of the sample space.

For most of the statistics this class relies on the StatisticsType underlying class to provide 1-D methods that will be iterated for all the components of the N-D data. These lifted methods are the union of all the methods that might be requested to the 1-D underlying StatisticsType class, with the usual compile-time checks provided by the template approach.


Public Types

typedef StatisticsType statistics_type

Public Member Functions

 SequenceStatistics (Size dimension)
inspectors
Size size () const
covariance and correlation
Disposable< Matrixcovariance () const
 returns the covariance Matrix

Disposable< Matrixcorrelation () const
 returns the correlation Matrix

1-D inspectors lifted from underlying statistics class
Size samples () const
double weightSum () const
N-D inspectors lifted from underlying statistics class
std::vector< double > mean () const
std::vector< double > variance () const
std::vector< double > standardDeviation () const
std::vector< double > downsideVariance () const
std::vector< double > downsideDeviation () const
std::vector< double > semiVariance () const
std::vector< double > semiDeviation () const
std::vector< double > errorEstimate () const
std::vector< double > skewness () const
std::vector< double > kurtosis () const
std::vector< double > min () const
std::vector< double > max () const
std::vector< double > gaussianPercentile (double y) const
std::vector< double > percentile (double y) const
std::vector< double > gaussianPotentialUpside (double percentile) const
std::vector< double > potentialUpside (double percentile) const
std::vector< double > gaussianValueAtRisk (double percentile) const
std::vector< double > valueAtRisk (double percentile) const
std::vector< double > gaussianExpectedShortfall (double percentile) const
std::vector< double > expectedShortfall (double percentile) const
std::vector< double > regret (double target) const
std::vector< double > gaussianShortfall (double target) const
std::vector< double > shortfall (double target) const
std::vector< double > gaussianAverageShortfall (double target) const
std::vector< double > averageShortfall (double target) const
Modifiers
void reset (Size dimension=0)
template<class Sequence> void add (const Sequence &sample, double weight=1.0)
template<class Iterator> void add (Iterator begin, Iterator end, double weight=1.0)

Protected Attributes

Size dimension_
std::vector< statistics_type > stats_
std::vector< double > results_
Matrix quadraticSum_


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