Professional Documents
Culture Documents
Model13 R Algorithm Trading Using R 1635644342447
Model13 R Algorithm Trading Using R 1635644342447
library(quantmod)
library(tidyverse)
library(TTR)
plot(AAP)
print(paste("The trend-following algorithm was applied to the AAP stock prices and
was able to achieve an annualized return of", AnnualizedReturn,"%"))