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
Submitted by: ivan popivanov
Assigned to: Joshua Ulrich R-Forge link
ge = getSymbols('ge', src='yahoo', from='1900-01-01', auto.assign=F, adjust=T)
Error in sprintf('%.2d', to.d) :
invalid format '%.2d'; use format %f, %e, %g or %a for numeric objects
The problem occurs when the call to getDividends is made, because it passes the default to.d which is Sys.Date() instead of string.
ge = getSymbols('ge', src='yahoo', from='1900-01-01', to='2050-01-01', auto.assign=F, adjust=T)
The above works fine, which confirms the type problem. Now:
Hmm, looks like the adjustment is bad. Why do you have to use the splits and the dividends to adjust when the Adjusted column is available? Just take the ratio between Adjusted and Close and use this ratio to adjust Open, High, Low and Close. Is this wrong for some reason?!
Followups:
Date: 2014-12-07 20:04
Sender: Joshua Ulrich
The first issue seems to have been fixed awhile ago. The second issue is fixed in r618. getSymbols.yahoo now uses adjustOHLC if adjust=TRUE. I think the differences were because the previous getSymbols.yahoo adjustment did not un-adjust dividends for splits (Yahoo already adjusts dividends for splits) before calculating the adjustment ratios.
The text was updated successfully, but these errors were encountered:
Submitted by: ivan popivanov
Assigned to: Joshua Ulrich
R-Forge link
The problem occurs when the call to getDividends is made, because it passes the default to.d which is Sys.Date() instead of string.
ge = getSymbols('ge', src='yahoo', from='1900-01-01', to='2050-01-01', auto.assign=F, adjust=T)
The above works fine, which confirms the type problem. Now:
Hmm, looks like the adjustment is bad. Why do you have to use the splits and the dividends to adjust when the Adjusted column is available? Just take the ratio between Adjusted and Close and use this ratio to adjust Open, High, Low and Close. Is this wrong for some reason?!
Followups:
Date: 2014-12-07 20:04
Sender: Joshua Ulrich
The first issue seems to have been fixed awhile ago. The second issue is fixed in r618. getSymbols.yahoo now uses adjustOHLC if adjust=TRUE. I think the differences were because the previous getSymbols.yahoo adjustment did not un-adjust dividends for splits (Yahoo already adjusts dividends for splits) before calculating the adjustment ratios.
The text was updated successfully, but these errors were encountered: