Class GenericSequenceStatisticsExtensions
The members of GenericSequenceStatistics<TStats> that need more of its type parameter than its class does, lifted over the components: the empirical risk measures, where each component's statistics keeps its samples (IEmpiricalStatistics, with the members of RiskStatisticsExtensions), and the downside variance and deviation of IncrementalStatistics, its own. QuantLib's template compiles a lifted member only where its type parameter has it; C# 14 extension members with these constraints keep that.
public static class GenericSequenceStatisticsExtensions
- Inheritance
-
GenericSequenceStatisticsExtensions
- Inherited Members
Methods
AverageShortfall<TStats>(GenericSequenceStatistics<TStats>, double)
Each component's average shortfall below a target.
public static ImmutableArray<double> AverageShortfall<TStats>(this GenericSequenceStatistics<TStats> statistics, double target) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>targetdoubleThe target.
Returns
- ImmutableArray<double>
The average shortfalls.
Type Parameters
TStats
DownsideDeviation(GenericSequenceStatistics<IncrementalStatistics>)
Each component's downside deviation, DownsideDeviation().
public static ImmutableArray<double> DownsideDeviation(this GenericSequenceStatistics<IncrementalStatistics> statistics)
Parameters
statisticsGenericSequenceStatistics<IncrementalStatistics>
Returns
- ImmutableArray<double>
The downside deviations.
DownsideDeviation<TStats>(GenericSequenceStatistics<TStats>)
Each component's downside deviation.
public static ImmutableArray<double> DownsideDeviation<TStats>(this GenericSequenceStatistics<TStats> statistics) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>
Returns
- ImmutableArray<double>
The downside deviations.
Type Parameters
TStats
DownsideVariance(GenericSequenceStatistics<IncrementalStatistics>)
Each component's downside variance, DownsideVariance().
public static ImmutableArray<double> DownsideVariance(this GenericSequenceStatistics<IncrementalStatistics> statistics)
Parameters
statisticsGenericSequenceStatistics<IncrementalStatistics>
Returns
- ImmutableArray<double>
The downside variances.
DownsideVariance<TStats>(GenericSequenceStatistics<TStats>)
Each component's downside variance, the variance of its observations below 0.
public static ImmutableArray<double> DownsideVariance<TStats>(this GenericSequenceStatistics<TStats> statistics) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>
Returns
- ImmutableArray<double>
The downside variances.
Type Parameters
TStats
ExpectedShortfall<TStats>(GenericSequenceStatistics<TStats>, double)
Each component's expected shortfall at a percentile.
public static ImmutableArray<double> ExpectedShortfall<TStats>(this GenericSequenceStatistics<TStats> statistics, double percentile) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>percentiledoubleThe percentile, in [0.9, 1).
Returns
- ImmutableArray<double>
The expected shortfalls.
Type Parameters
TStats
Percentile<TStats>(GenericSequenceStatistics<TStats>, double)
Each component's empirical percentile.
public static ImmutableArray<double> Percentile<TStats>(this GenericSequenceStatistics<TStats> statistics, double y) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>ydoubleThe percentile, in (0, 1].
Returns
- ImmutableArray<double>
The percentiles.
Type Parameters
TStats
PotentialUpside<TStats>(GenericSequenceStatistics<TStats>, double)
Each component's potential upside at a percentile.
public static ImmutableArray<double> PotentialUpside<TStats>(this GenericSequenceStatistics<TStats> statistics, double percentile) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>percentiledoubleThe percentile, in [0.9, 1).
Returns
- ImmutableArray<double>
The potential upsides.
Type Parameters
TStats
Regret<TStats>(GenericSequenceStatistics<TStats>, double)
Each component's regret: the variance of its observations below a target.
public static ImmutableArray<double> Regret<TStats>(this GenericSequenceStatistics<TStats> statistics, double target) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>targetdoubleThe target.
Returns
- ImmutableArray<double>
The regrets.
Type Parameters
TStats
SemiDeviation<TStats>(GenericSequenceStatistics<TStats>)
Each component's semi-deviation.
public static ImmutableArray<double> SemiDeviation<TStats>(this GenericSequenceStatistics<TStats> statistics) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>
Returns
- ImmutableArray<double>
The semi-deviations.
Type Parameters
TStats
SemiVariance<TStats>(GenericSequenceStatistics<TStats>)
Each component's semi-variance, the variance of its observations below its mean.
public static ImmutableArray<double> SemiVariance<TStats>(this GenericSequenceStatistics<TStats> statistics) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>
Returns
- ImmutableArray<double>
The semi-variances.
Type Parameters
TStats
Shortfall<TStats>(GenericSequenceStatistics<TStats>, double)
Each component's probability of falling below a target.
public static ImmutableArray<double> Shortfall<TStats>(this GenericSequenceStatistics<TStats> statistics, double target) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>targetdoubleThe target.
Returns
- ImmutableArray<double>
The shortfalls.
Type Parameters
TStats
ValueAtRisk<TStats>(GenericSequenceStatistics<TStats>, double)
Each component's value-at-risk at a percentile.
public static ImmutableArray<double> ValueAtRisk<TStats>(this GenericSequenceStatistics<TStats> statistics, double percentile) where TStats : IEmpiricalStatistics, new()
Parameters
statisticsGenericSequenceStatistics<TStats>percentiledoubleThe percentile, in [0.9, 1).
Returns
- ImmutableArray<double>
The values-at-risk.
Type Parameters
TStats