You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most recent day often returns non-unique values which returns a warning. Problem is with the yahoo extract in the first place via quantmod then passed on to tq_get().
Suggest to amend tq_get just before the return(ret) last line to include:
if (identical(get, "stock.prices")) {
ret <- ret %>%
dplyr::group_by(symbol, date) %>%
dplyr::summarise(open = dplyr::last(open),
high = dplyr::last(high),
low = dplyr::last(low),
close = dplyr::last(close),
volume = dplyr::last(volume),
adjusted = dplyr::last(adjusted)) %>%
dplyr::ungroup()
}
At times yahoo finance returns duplicate last day and at other times everything is the same with the exception of volume. Hence the approach above instead of dplyr::distinct().
The text was updated successfully, but these errors were encountered:
Most recent day often returns non-unique values which returns a warning. Problem is with the yahoo extract in the first place via quantmod then passed on to
tq_get()
.Suggest to amend tq_get just before the return(ret) last line to include:
At times yahoo finance returns duplicate last day and at other times everything is the same with the exception of volume. Hence the approach above instead of
dplyr::distinct()
.The text was updated successfully, but these errors were encountered: