is_event_feature

czsc.is_event_feature(df, col, **kwargs)[source]

事件类因子的判断函数

事件因子的特征:多头事件发生时,因子值为1;空头事件发生时,因子值为-1;其他情况,因子值为0。

Parameters:
  • df – DataFrame

  • col – str, 因子字段名称