if (FALSE) {
getSymbols('QQQQ',src='yahoo')
allReturns(QQQQ) # returns all periods
periodReturn(QQQQ,period='yearly',subset='2003::') # returns years 2003 to present
periodReturn(QQQQ,period='yearly',subset='2003') # returns year 2003
rm(QQQQ)
}
Run the code above in your browser using DataLab