qis.LegendStats¶
- class qis.LegendStats(*values)[source]¶
Bases:
Enumwhich summary statistics the legend prints beside each series name.
The members are compositional and the name reads left to right in the order the statistics appear in the legend, so
AVG_STD_LASTprints the mean, the standard deviation and the final value in that order. Rather than restate twenty-nine names, the vocabulary:AVGmean,STDstandard deviation withddof=1,MEDIANmedian,MADmedian absolute deviation scaled to be comparable with a standard deviation,SKEWandKURTthe third and fourth moments,TSTATmean over standard error,TOTALthe sum,FIRSTandLASTthe endpoints,MINandMAXthe extremes.Three modifiers change what the statistics are computed on:
NONNANtakes the last observed value rather than the value at the last index, which differs when a series ends with gaps.NONZEROexcludes zeros, for a series where zero means “no position” rather than “a return of zero”.MISSINGprefixes the count of NaN observations, which is how a ragged panel shows its own coverage in the legend.SCOREappends the percentile rank of the last value within its own history.NONEprints the column name alone. Formatting of every value follows thevar_formatargument of the plotting function, so the enum chooses the statistics and not their display.A member documented here is computed in
get_legend_lines, which is the single place the legend text is built for every plot in the package.- __init__(*args, **kwds)¶
Attributes
- NONE = 1¶
- LAST = 2¶
- AVG = 3¶
- AVG_LAST = 4¶
- AVG_STD = 5¶
- AVG_STD_SKEW_KURT = 6¶
- AVG_STD_LAST = 7¶
- AVG_NONNAN_LAST = 8¶
- NONZERO_AVG_LAST = 81¶
- NONZERO_AVG_STD_LAST = 82¶
- MEDIAN_NONNAN_LAST = 9¶
- AVG_MEDIAN_STD_NONNAN_LAST = 10¶
- AVG_LAST_SCORE = 11¶
- AVG_STD_LAST_SCORE = 12¶
- FIRST_LAST = 13¶
- FIRST_LAST_NON_ZERO = 14¶
- FIRST_AVG_LAST = 15¶
- FIRST_MEDIAN_LAST = 16¶
- FIRST_AVG_LAST_SHORT = 17¶
- AVG_STD_MISSING_ZERO = 18¶
- MISSING_AVG_LAST = 19¶
- TOTAL = 20¶
- MEDIAN = 21¶
- MEDIAN_MAD = 22¶
- TSTAT = 23¶
- AVG_STD_TSTAT = 24¶
- LAST_NONNAN = 25¶
- AVG_MIN_MAX_LAST = 26¶
- FIRST_MIN_MAX_LAST = 27¶