i'm scratching my head a lot of hours for this problem.
I've a xts
object with stock return, but i need to coerce this object to ts
.
Below there is an example.
date_vec <- as.Date(c("2010-01-05", "2010-01-06","2010-01-07",
"2010-01-08", "2010-01-11", "2010-01-12",
"2010-01-13"))
ret_vec <- rnorm(7)
ret_xts <- xts(ret_vec, order.by = date_vec)
As you can see, date are "discontinous" and when i try to force this to ts
something goes wrong.
Thank you everyone for helping and sorry for my bad english.