我有 CSV 文件,其日期格式如下:25-Aug-2004
我想将其读取为“xts”对象,以便使用 quantmod 包中的函数“periodReturn”。
我可以将以下文件用于该功能吗?
Symbol Series Date Prev.Close Open.Price High.Price Low.Price
1 XXX EQ 25-Aug-2004 850.00 1198.70 1198.70 979.00
2 XXX EQ 26-Aug-2004 987.95 992.00 997.00 975.30
用同样的方法指导我。