quantlab.factor.predefined.intraday.CompositePart#

class quantlab.factor.predefined.intraday.CompositePart(output, statistic, window, sign)[source]#

Bases: object

One part of an IntradayComposite output, parsed from "[-]<output>:<statistic>:<window>".

Examples

>>> CompositePart.parse("-trade_size:mean:60")
CompositePart(output='trade_size', statistic='mean', window=60, sign=-1.0)
property min_count#

Fewest present values the window needs: half of it, rounded up.

classmethod parse(text)[source]#

Parse "[-]<output>:<statistic>:<window>".

Raises:
ValueError

If the text has not three :-separated fields, the statistic is not one of COMPOSITE_STATISTICS or the window is not an integer of at least 2.

Examples

>>> CompositePart.parse("auction_share:cv:120").sign
1.0