QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Statistics analysis of N-dimensional (sequence) data. More...
#include <sequencestatistics.hpp>
Public Types | |
typedef StatisticsType | statistics_type |
typedef std::vector< typename StatisticsType::value_type > | value_type |
Public Member Functions | |
GenericSequenceStatistics (Size dimension=0) | |
inspectors | |
Size | size () const |
covariance and correlation | |
Matrix | covariance () const |
returns the covariance Matrix More... | |
Matrix | correlation () const |
returns the correlation Matrix More... | |
1-D inspectors lifted from underlying statistics class | |
Size | samples () const |
Real | weightSum () const |
N-D inspectors lifted from underlying statistics class | |
std::vector< Real > | mean () const |
std::vector< Real > | variance () const |
std::vector< Real > | standardDeviation () const |
std::vector< Real > | downsideVariance () const |
std::vector< Real > | downsideDeviation () const |
std::vector< Real > | semiVariance () const |
std::vector< Real > | semiDeviation () const |
std::vector< Real > | errorEstimate () const |
std::vector< Real > | skewness () const |
std::vector< Real > | kurtosis () const |
std::vector< Real > | min () const |
std::vector< Real > | max () const |
std::vector< Real > | gaussianPercentile (Real y) const |
std::vector< Real > | percentile (Real y) const |
std::vector< Real > | gaussianPotentialUpside (Real percentile) const |
std::vector< Real > | potentialUpside (Real percentile) const |
std::vector< Real > | gaussianValueAtRisk (Real percentile) const |
std::vector< Real > | valueAtRisk (Real percentile) const |
std::vector< Real > | gaussianExpectedShortfall (Real percentile) const |
std::vector< Real > | expectedShortfall (Real percentile) const |
std::vector< Real > | regret (Real target) const |
std::vector< Real > | gaussianShortfall (Real target) const |
std::vector< Real > | shortfall (Real target) const |
std::vector< Real > | gaussianAverageShortfall (Real target) const |
std::vector< Real > | averageShortfall (Real target) const |
Modifiers | |
Size | dimension_ = 0 |
std::vector< statistics_type > | stats_ |
std::vector< Real > | results_ |
Matrix | quadraticSum_ |
void | reset (Size dimension=0) |
template<class Sequence > | |
void | add (const Sequence &sample, Real weight=1.0) |
template<class Iterator > | |
void | add (Iterator begin, Iterator end, Real weight=1.0) |
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.
Definition at line 50 of file sequencestatistics.hpp.
typedef StatisticsType statistics_type |
Definition at line 53 of file sequencestatistics.hpp.
typedef std::vector<typename StatisticsType::value_type> value_type |
Definition at line 54 of file sequencestatistics.hpp.
GenericSequenceStatistics | ( | Size | dimension = 0 | ) |
Definition at line 160 of file sequencestatistics.hpp.
Size size | ( | ) | const |
Definition at line 59 of file sequencestatistics.hpp.
Matrix covariance |
returns the covariance Matrix
Definition at line 247 of file sequencestatistics.hpp.
Matrix correlation |
returns the correlation Matrix
Definition at line 269 of file sequencestatistics.hpp.
Size samples |
Real weightSum |
Definition at line 170 of file sequencestatistics.hpp.
std::vector< Real > mean |
Definition at line 186 of file sequencestatistics.hpp.
std::vector< Real > variance |
Definition at line 187 of file sequencestatistics.hpp.
std::vector< Real > standardDeviation |
Definition at line 188 of file sequencestatistics.hpp.
std::vector< Real > downsideVariance |
Definition at line 189 of file sequencestatistics.hpp.
std::vector< Real > downsideDeviation |
Definition at line 190 of file sequencestatistics.hpp.
std::vector< Real > semiVariance |
Definition at line 191 of file sequencestatistics.hpp.
std::vector< Real > semiDeviation |
Definition at line 192 of file sequencestatistics.hpp.
std::vector< Real > errorEstimate |
Definition at line 193 of file sequencestatistics.hpp.
std::vector< Real > skewness |
Definition at line 194 of file sequencestatistics.hpp.
std::vector< Real > kurtosis |
Definition at line 195 of file sequencestatistics.hpp.
std::vector< Real > min |
Definition at line 196 of file sequencestatistics.hpp.
std::vector< Real > max |
Definition at line 197 of file sequencestatistics.hpp.
Definition at line 211 of file sequencestatistics.hpp.
Definition at line 218 of file sequencestatistics.hpp.
Definition at line 212 of file sequencestatistics.hpp.
Definition at line 219 of file sequencestatistics.hpp.
Definition at line 213 of file sequencestatistics.hpp.
Definition at line 220 of file sequencestatistics.hpp.
Definition at line 214 of file sequencestatistics.hpp.
Definition at line 221 of file sequencestatistics.hpp.
Definition at line 222 of file sequencestatistics.hpp.
Definition at line 215 of file sequencestatistics.hpp.
Definition at line 223 of file sequencestatistics.hpp.
Definition at line 216 of file sequencestatistics.hpp.
Definition at line 224 of file sequencestatistics.hpp.
void reset | ( | Size | dimension = 0 | ) |
void add | ( | const Sequence & | sample, |
Real | weight = 1.0 |
||
) |
Definition at line 115 of file sequencestatistics.hpp.
void add | ( | Iterator | begin, |
Iterator | end, | ||
Real | weight = 1.0 |
||
) |
|
protected |
Definition at line 144 of file sequencestatistics.hpp.
|
protected |
Definition at line 145 of file sequencestatistics.hpp.
|
mutableprotected |
Definition at line 146 of file sequencestatistics.hpp.
|
protected |
Definition at line 147 of file sequencestatistics.hpp.