# NOT RUN {
# Get a portfolio
h <- getPortfolioReturns(c('A','AA','AAPL'), obs=150)
# Get an index portfolio
h <- getPortfolioReturns(getIndexComposition('^DJI'), obs=100, reload=TRUE)
# Doesn't work because of numerical symbols - need to fix
#h <- getPortfolioReturns(getIndexComposition('^HSI'), obs=100, reload=TRUE)
# Ensure that some assets exist
ensure(c('K','JNPR'), src='yahoo')
# }
Run the code above in your browser using DataLab