MaAndVolumeTransformer

class zvt.factors.algorithm.MaAndVolumeTransformer(windows=None, vol_windows=None, kdata_overlap=0)

Bases: zvt.contract.factor.Transformer

__init__(windows=None, vol_windows=None, kdata_overlap=0) 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