掘金社区

怎么编写macdPinned highlighted

181581***876 发表在问题反馈 2020-04-11 15:18:53

问题反馈
1100
1
0

怎么编写macd

评论: 1
  • 计算MACD

    def MACD(df, shortperiod, longperiod, M):
    df['diff'], df['dea'], df['macd'] = talib.MACDEXT(df['close'], fastperiod=shortperiod, fastmatype=1, slowperiod=longperiod,
    slowmatype=1, signalperiod=M, signalmatype=1)
    df['macd'] = df['macd'] * 2
    return df

    2020-04-20 17:35:49

Looks like your connection to 掘金量化社区 - 量化交易者的交流社区 was lost, please wait while we try to reconnect.