TopBottomTransformer¶
- class zvt.factors.ma.top_bottom_factor.TopBottomTransformer(window=20)¶
Bases:
zvt.contract.factor.Transformer
- __init__(window=20) None ¶
- transform(input_df) pandas.core.frame.DataFrame ¶
input_df format:
col1 col2 col3 ... entity_id timestamp 1.2 0.5 0.3 ... 1.0 0.7 0.2 ...
the return result would change the columns and keep the format
- Parameters
input_df –
- Returns
- transform_one(entity_id: str, df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame ¶
df format:
col1 col2 col3 ... timestamp 1.2 0.5 0.3 ... 1.0 0.7 0.2 ...
the return result would change the columns and keep the format
- Parameters
entity_id –
df –
- Returns