Skip to content
Prev 6368 / 15274 Next

ttrTests error

A few points of clarification:
On Thu, Jul 8, 2010 at 8:04 PM, Sarbo <cmdr_rogue at hotmail.com> wrote:
The MA functions are actually defined in TTR (not quantmod) and they
*internally* try to convert a vector series to xts, BUT there is no
error if the vector does not have names.  In that case, TTR functions
*internally* convert to a matrix.  I stress *internally* because TTR
functions will return the same class of object given to them.

For example:
num [1:20] NA NA NA NA NA NA NA NA NA 5.5 ...
An ?xts? object from 1969-12-31 18:00:01 to 1969-12-31 18:00:20 containing:
  Data: num [1:20, 1] NA NA NA NA NA NA NA NA NA 5.5 ...
  Indexed by objects of class: [POSIXt,POSIXct] TZ:
  xts Attributes:
 NULL
?zoo? series from 1969-12-31 18:00:01 to 1969-12-31 18:00:20
  Data: Named num [1:20] NA NA NA NA NA NA NA NA NA 5.5 ...
 - attr(*, "names")= chr [1:20] "1969-12-31 18:00:01" "1969-12-31
18:00:02" "1969-12-31 18:00:03" "1969-12-31 18:00:04" ...
  Index:  POSIXct[1:20], format: "1969-12-31 18:00:01" "1969-12-31 18:00:02" ...
Time-Series [1:20] from 1 to 20: NA NA NA NA NA NA NA NA NA 5.5 ...

Best,
--
Joshua Ulrich
FOSS Trading: www.fosstrading.com