Skip to content

Instantly share code, notes, and snippets.

@rrguntaka
Created November 5, 2012 06:25
Show Gist options
  • Save rrguntaka/4015659 to your computer and use it in GitHub Desktop.
Save rrguntaka/4015659 to your computer and use it in GitHub Desktop.
Get 2011 Yearly quotes using R tseries and zoo package
get.quotes.2011 <- function(symbol){
get.hist.quote(instrument=symbol, start="2011-01-01",
end="2011-12-31", quote="AdjClose", provider="yahoo",
origin="1970-01-01", compression="d", retclass="zoo")
}
spy <- get.quotes.2011('spy')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment