joshuaulrich / quantmod

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

getDividends no longer works #297

Closed salritchie2 closed 4 years ago

salritchie2 commented 4 years ago

Description

getDividends() works sometimes but not others.

Expected behavior

download of yahoo finance dividends for FCNTX

Minimal, reproducible example

FCNTXDIV <- getDividends('FCNTX', from = "2015-01-01")

Error in vapply(parse(text = fr[, 2]), eval, numeric(1)) : 
  values must be length 1,
 but FUN(X[[1]]) result is length 10

Session Info

joshuaulrich commented 4 years ago

Thanks for the report. I'm closing because this is a duplicate of #292 and #294. In the future, please search for similar issues and/or test to see if the development version is fixed.

salritchie2 commented 4 years ago

Thank you. But neither of these other issues references getDividends so I will try to figure it out on my own.

Sally Ritchie

On Tue, Feb 11, 2020, 6:40 AM Joshua Ulrich notifications@github.com wrote:

Closed #297 https://github.com/joshuaulrich/quantmod/issues/297.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joshuaulrich/quantmod/issues/297?email_source=notifications&email_token=AB5YIV3XXTLAGTZ43ROCHODRCKMDHA5CNFSM4KSYSHXKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWRROFRQ#event-3026379462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5YIV32N3K44VID2BPNJ23RCKMDHANCNFSM4KSYSHXA .

joshuaulrich commented 4 years ago

@salritchie2 issue 294 references getDividends(). Issue 292 is the root cause of the problem. getDividends() attempts to return dividends that are split-adjusted by default, so it calls getSplits(). The call to getSplits() fails, which throws the same error you report.

salritchie2 commented 4 years ago

Thank you. This was helpful. I did figure out what I needed to do by adding the split.adjust parm, which solved the problem. Sally Ritchie.

On Tue, Feb 11, 2020, 6:23 PM Joshua Ulrich notifications@github.com wrote:

@salritchie2 https://github.com/salritchie2 issue 294 references getDividends(). Issue 292 is the root cause of the problem. getDividends() attempts to return dividends that are split-adjusted by default, so it calls getSplits(). The call to getSplits() fails, which throws the same error you report.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/joshuaulrich/quantmod/issues/297?email_source=notifications&email_token=AB5YIV7QMAHOHG3UEN2EGYTRCM6P3A5CNFSM4KSYSHXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELOXKPA#issuecomment-584938812, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5YIVYDIESN33QEV5KJR3TRCM6P3ANCNFSM4KSYSHXA .