rOpenSci | New Package yfR

Package yfR recently passed peer review at rOpenSci and is all about downloading stock price data from Yahoo Finance (YF). I wrote this package to solve a particular problem I had as a teacher: I needed a large volume of clean stock price data to use in my classes, either for explaining how financial markets work or for class exercises. While there are several R packages to import raw data from YF, none solved my problem.


This is a companion discussion topic for the original entry at https://ropensci.org/blog/2022/07/26/package-yfr/
1 Like

Wonderful and extremely useful - especially, the caching functionality! Thank you for sharing this work!

I’ve been using yfR, great package, thanks so much! A problem has cropped up: I request two days worth of data on several tickers, and one of them has only one day of data. yfR generates this error message:

“Returned dataframe for xxxxx between xxxxx and xxxxx has only ONE row. Perhaps you
should check your inputs dates?”

and no data for any symbol is returned. This is not what I want, I want to see all the data it was able to retrieve, I will sort out for myself what data is missing. I think this should be a warning, not an error. I have set do_complete_data FALSE and thresh_bad_data to 0.

Also, I couldn’t find a place to make bug reports.

Hi Ted,

This issue was fixed in early december. Simply reinstall the new version from github (remotes::install_github("ropensci/yfR")) and try it out.

Best,

Let me know how it goes…