1
我想从quantmod chartSeries函数向图中添加一个简单的线性回归线。r Quantmod Chart添加线性回归线
Input:
getSymbols('AAPL')
chartSeries(AAPL, subset='last 3 years', TA = NULL, theme = "white", up.col = "green", dn.col = "red")
但是当我尝试添加行,他们没有工作
addLines(lm(Cl(AAPL)~index(AAPL)),col="blue", on=1)
abline(lm(Cl(AAPL)~index(AAPL)),col="blue")
有什么建议?谢谢。