📜  创建 50 天和 100 天移动平均线 python 代码示例

📅  最后修改于: 2022-03-11 14:46:51.136000             🧑  作者: Mango

代码示例1
#We use the closing price for Apple to create a MA using rolling windows
AAPL['Moving Average 200'] = AAPL['Close'].rolling(200).mean()
AAPL['Moving Average 50'] = AAPL['Close'].rolling(50).mean()