Look at the examples at the end of ?xts for more info.
library(quantmod)
getSymbols("AAPL")
class(AAPL)
## [1] "xts" "zoo"
range(time(AAPL))
## [1] "2007-01-03" "2022-07-08"
# everything up to indicated date
a1 <- AAPL["/2018-02-01"]
# remove non consecutive dates
d <- as.D
Time to do your homework:
https://rpubs.com/odenipinedo/manipulating-time-series-data-with-xts-and-zoo-in-R
Bert
On Sun, Jul 10, 2022, 6:42 PM akshay kulkarni wrote:
> Dear members,
> I have OHLC data of 500 stocks: OHLCData and
> dates. These are of xts object. I want
2 matches
Mail list logo