joshuaulrich / quantmod

Quantitative Financial Modelling Framework
http://www.quantmod.com/
GNU General Public License v3.0
822 stars 224 forks source link

Fix getQuote.yahoo for multiple timezones #248

Closed pverspeelt closed 6 years ago

pverspeelt commented 6 years ago

When getQuote.yahoo was called it genereted errors when quotes from multiple timezones were involved. Fixed so everything is forced to the local timezone.

Following code now works correctly:

library(quantmod)
metrics <- yahooQF(c("Name", "Volume", "P/E Ratio", "Dividend Yield", "Shares Outstanding"))
symbols <- c("MSFT", "GOOG", "FAGR.BR")
stats <- getQuote(symbols, what = metrics)

Fixes #246