QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
DiscrepancyStatistics Class Reference

Statistic tool for sequences with discrepancy calculation. More...

#include <discrepancystatistics.hpp>

+ Inheritance diagram for DiscrepancyStatistics:
+ Collaboration diagram for DiscrepancyStatistics:

Public Types

typedef SequenceStatistics::value_type value_type
 
- Public Types inherited from GenericSequenceStatistics< StatisticsType >
typedef StatisticsType statistics_type
 
typedef std::vector< typename StatisticsType::value_type > value_type
 

Public Member Functions

 DiscrepancyStatistics (Size dimension)
 
- Public Member Functions inherited from GenericSequenceStatistics< StatisticsType >
 GenericSequenceStatistics (Size dimension=0)
 
Size size () const
 
Matrix covariance () const
 returns the covariance Matrix More...
 
Matrix correlation () const
 returns the correlation Matrix More...
 
Size samples () const
 
Real weightSum () const
 
std::vector< Realmean () const
 
std::vector< Realvariance () const
 
std::vector< RealstandardDeviation () const
 
std::vector< RealdownsideVariance () const
 
std::vector< RealdownsideDeviation () const
 
std::vector< RealsemiVariance () const
 
std::vector< RealsemiDeviation () const
 
std::vector< RealerrorEstimate () const
 
std::vector< Realskewness () const
 
std::vector< Realkurtosis () const
 
std::vector< Realmin () const
 
std::vector< Realmax () const
 
std::vector< RealgaussianPercentile (Real y) const
 
std::vector< Realpercentile (Real y) const
 
std::vector< RealgaussianPotentialUpside (Real percentile) const
 
std::vector< RealpotentialUpside (Real percentile) const
 
std::vector< RealgaussianValueAtRisk (Real percentile) const
 
std::vector< RealvalueAtRisk (Real percentile) const
 
std::vector< RealgaussianExpectedShortfall (Real percentile) const
 
std::vector< RealexpectedShortfall (Real percentile) const
 
std::vector< Realregret (Real target) const
 
std::vector< RealgaussianShortfall (Real target) const
 
std::vector< Realshortfall (Real target) const
 
std::vector< RealgaussianAverageShortfall (Real target) const
 
std::vector< RealaverageShortfall (Real target) const
 
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)
 

1-dimensional inspectors

Real adiscr_
 
Real cdiscr_
 
Real bdiscr_
 
Real ddiscr_
 
Real discrepancy () const
 
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)
 
void reset (Size dimension=0)
 

Additional Inherited Members

- Protected Attributes inherited from GenericSequenceStatistics< StatisticsType >
Size dimension_ = 0
 
std::vector< statistics_typestats_
 
std::vector< Realresults_
 
Matrix quadraticSum_
 

Detailed Description

Statistic tool for sequences with discrepancy calculation.

It inherit from SequenceStatistics<Statistics> and adds \( L^2 \) discrepancy calculation

Definition at line 35 of file discrepancystatistics.hpp.

Member Typedef Documentation

◆ value_type

Definition at line 37 of file discrepancystatistics.hpp.

Constructor & Destructor Documentation

◆ DiscrepancyStatistics()

DiscrepancyStatistics ( Size  dimension)

Definition at line 103 of file discrepancystatistics.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ discrepancy()

Real discrepancy ( ) const

Definition at line 24 of file discrepancystatistics.cpp.

+ Here is the call graph for this function:

◆ add() [1/2]

void add ( const Sequence &  sample,
Real  weight = 1.0 
)

Definition at line 45 of file discrepancystatistics.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add() [2/2]

void add ( Iterator  begin,
Iterator  end,
Real  weight = 1.0 
)

Definition at line 50 of file discrepancystatistics.hpp.

+ Here is the call graph for this function:

◆ reset()

void reset ( Size  dimension = 0)

Definition at line 108 of file discrepancystatistics.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ adiscr_

Real adiscr_
mutableprivate

Definition at line 96 of file discrepancystatistics.hpp.

◆ cdiscr_

Real cdiscr_
private

Definition at line 96 of file discrepancystatistics.hpp.

◆ bdiscr_

Real bdiscr_
private

Definition at line 97 of file discrepancystatistics.hpp.

◆ ddiscr_

Real ddiscr_
private

Definition at line 97 of file discrepancystatistics.hpp.