Hello,
I'm trying to create a dataframe for 5 different stock market indexes that are not the same length. Is there an alternative to dataframe to group all these data?
startDate = as.Date("2000-01-01")
endDate = as.Date("2021-10-30")
getSymbols("^GSPC", from = startDate, to = endDate)
getSymbols("^GDAXI", from = startDate, to = endDate)
getSymbols("^FCHI", from = startDate, to = endDate)
getSymbols("^FTSE", from = startDate, to = endDate)
getSymbols("^N225", from = startDate, to = endDate)
rGSPC <- dailyReturn(GSPC)
rGDAXI <- dailyReturn(GDAXI)
rFCHI <- dailyReturn(FCHI)
rFTSE <- dailyReturn(FTSE)
rN225 <- dailyReturn(N225)
rX <- data.frame(rGSPC, rGDAXI, rFCHI, rFTSE, rN225)