我想在股票价格 OHLCV 的数据框中添加 aroon(看涨和看跌)指标列。阿隆计算在这里
问问题
577 次
1 回答
0
我建议查看pandas_ta
包含 80 多个指标的库:
$ pip install pandas_ta
>>> import pandas as pd
>>> import pandas_ta as ta
>>> pd.concat([price_ohlcv, price_ohlcv.ta.aroon()], axis=1).tail()
open high low close volume AROOND_14 AROONU_14
time
2020-04-30 00:00:00+00:00 1.095 1.102 1.093 1.098 70879.0 57.142857 7.142857
2020-05-01 00:00:00+00:00 1.097 1.097 1.090 1.091 79412.0 50.000000 92.857143
2020-05-04 00:00:00+00:00 1.091 1.093 1.083 1.084 74476.0 42.857143 85.714286
2020-05-05 00:00:00+00:00 1.084 1.085 1.078 1.080 78846.0 35.714286 78.571429
2020-05-06 00:00:00+00:00 1.079 1.082 1.079 1.080 22443.0 28.571429 71.428571
于 2020-05-07T08:16:15.100 回答