5.6 TTR
momentum(Cl(AAPL), n=2)
M <-head (M,n=5)
## AAPL.Close
## 2003-01-02 NA
## 2003-01-03 NA
## 2003-01-06 0.0008846439
## 2003-01-07 -0.0004420741
## 2003-01-08 -0.0030974926
momentum(Cl(AAPL), n=2)
M <-head (M,n=5)
## AAPL.Close
## 2003-01-02 NA
## 2003-01-03 NA
## 2003-01-06 0.0008846439
## 2003-01-07 -0.0004420741
## 2003-01-08 -0.0030974926