R 的金融交易
Ilya Kipnis
Professional Quantitative Analyst and R programmer
TTR:經典交易指標工具箱
SMA(簡單移動平均)
CTA 常用:200 日移動平均
# Compute a simple moving average (SMA) across 200 days
sma <- SMA(x = Cl(LQD), n = 200)
# Add the SMA line to your plot of LQD closing price
plot(Cl(LQD))
lines(sma, col = "red")

R 的金融交易