Tuesday, March 10, 2020

quantmod_0.4-16 on CRAN

A new version of quantmod is on CRAN! One really cool thing about this release is that almost all the changes are contributions from the community.

Ethan Smith made more excellent contributions to getQuote() in this release. It no longer throws an error if one or more symbols are missing.  And it handles multiple symbols in a semicolon-delimted string, just like getSymbols(). For example, you can get quotes for multiple symbols by calling getQuote("SPY;AAPL").

@jrburl made a great enhancement to getOptionChain(). Now, instead of throwing an error, it sets volume and open interest to NA if those columns are missing from the Yahoo Finance data. They also submitted a pull request to handle cases where Bid and/or Ask data are missing too. Unfortunately, that pull request came after I had already pushed to CRAN.

Unfortunately, Yahoo! Finance continues to make changes to how they return data. Thankfully, quantmod users are diligent and catch these changes. @helgasoft noticed the split ratio delimiter changed from "/" to ":". So, for example, a 2-for-1 split was 1/2 but is now "2:1".

@helgasoft also noticed that Alpha Vantage discontinued their "batch quote" functionality, which broke getQuote(). Thankfully, they provided a patch that used the single-quote request, so getQuote() works with Alpha Vantage again!

@matiasandina noticed that I had incorrectly labelled the dividend pay date as the ex-dividend date in the data getQuote() returned from Yahoo Finance. Whoops!

See the news file for the other bug fixes. Thanks for using quantmod!

Thursday, October 10, 2019

microbenchmark_1.4-7 on CRAN

I pushed an updated microbenchmark to CRAN a couple weeks ago. There were two noteworthy changes, thanks to great contributions from @MichaelChirico and @harvey131.

Michael fixed a bug in the check for whether the unit argument was a character string (#9, #10). The prior behavior was an uninformative error.

Harvey added a feature to allow you to use a string for common checks: "equal", "identical", and "equivalent" (#16). So you don't need to create a custom function to use all.equal(), all.equal(..., check.attributes = FALSE), and identical, respectively.

I also converted the unit tests to use RUnit. I also made some changes to the repo, including adding a contributing guide and issue/pull-request templates.

Monday, March 25, 2019

quantmod_0.4-14 on CRAN

I just pushed a new release of quantmod to CRAN! I'm most excited about the update to getSymbols() so it doesn't throw an error and stop processing if there's a problem with one ticker symbol. Now getSymbols() will import all the data it can, and provide an informative error message for any ticker symbols it could not import.

Another cool feature is that getQuote() can now import quotes from Tiingo. But don't thank me; thank Ethan Smith for the feature request [#247] and pull request [#250].

There are also several bug fixes in this release.  The most noticeable are fixes to getDividends()  and getSplits()Yahoo! Finance continues to have stability issues. Now it returns raw dividends instead of split-adjusted dividends (thanks to Douglas Barnard for the report [#253]), and the actual split adjustment ratio instead of the inverse (e.g. now 1/2 instead of 2/1).  I suggest using a different data provider. See my post: Yahoo! Finance Alternatives for some suggestions.

See the news file for the other bug fixes. Please let me know what you think about these changes.  I need your feedback and input to make quantmod even better!

Tuesday, November 6, 2018

xts 0.11-2 on CRAN

xts version 0.11-2 was published to CRAN yesterday. xts provides data structure and functions to work with time-indexed data.  This is a bug-fix release, with notable changes below:
  • The xts method for shift.time() is now registered. Thanks to Philippe Verspeelt for the report and PR (#268, #273).
  • An if-statement in the xts constructor will no longer try to use a logical vector with length > 1. Code like if (c(TRUE, TRUE)) will throw a warning in an upcoming R release, and this patch will prevent that warning. Thanks to Hugh Parsonage for the report and PR (#270, #272).
  • Fix subset when index(i) and i contain duplicates. Observations were being incorrectly dropped, and behavior is now consistent with zoo. Thanks to Stack Overflow user scs for the report, and Philippe Verspeelt for the help debugging (#275).
  • Make column names for merge() results with unnamed objects shorter and more like zoo (#248). Previously, column names could be hundreds, even thousands, of characters. This change has the added benefit of making na.fill() much faster (#259). NOTE: This may BREAK existing code for integer unnamed objects.
  • The to.period() family of functions now use the index timezone when converting intraday index values to daily values (or lower frequency). Previously, the dates would be calculated as UTC dates, instead of dates in the local timezone (as they are now). Thanks to Garrett See and Gabor Grothendieck for the reports (#53, #277).
As always, I'm looking forward to your questions and feedback! If you have a question, please ask on Stack Overflow and use the [r] and [xts] tags. Or you can send an email to the R-SIG-Finance mailing list (you must subscribe to post). Open an issue on GitHub if you find a bug or want to request a feature, but please read the contributing guide first!

Wednesday, September 12, 2018

xts 0.11-1 on CRAN

xts version 0.11-1 was published to CRAN this morning. xts provides data structure and functions to work with time-indexed data.  This release contains some awesome features that will transparently make your xts code even faster!
  • There's a new window.xts() method, thanks to Corwin Joy (#100, #240). Corwin also refactored and improved the performance of the binary search algorithm used to subset xts objects. Tom Andrews reported and fixed a few related regressions (#251, #263, #264).
  • The na.locf.xts() method loops over columns of multivariate objects in C code, for improved speed and memory performance. Thanks to Chris Katsulis and Tom Andrews for their reports and patches (#232, #233, #234, #235, #237).
  • After many years, merge.xts() can finally handle multiple character or complex xts objects. Thanks to Ken Williams for the report (#44).
  • You can use "quarters" to specify tick/grid mark locations on plots. Thanks to Marc Weibel for the report (#256).
There are also a few notable bug fixes:
  • make.index.unique() always returns a unique and sorted index. Thanks to Chris Katsulis for the report and example (#241).
  • Plots have better axis tick mark locations, thanks to Dirk Eddelbuettel (#246).
  • periodicity() now warns instead of errors if the xts object contains less than 2 observations (#230).
  • first() and last() now keep dims when they would otherwise be dropped by a regular row subset. This is consistent with head() and tail(). Thanks to Davis Vaughan for the report (#226).
  • An invalid ISO8601 range subset now returns no data instead of all rows (#96).
As always, I'm looking forward to your questions and feedback! If you have a question, please ask on Stack Overflow and use the [r] and [xts] tags. Or you can send an email to the R-SIG-Finance mailing list (you must subscribe to post). Open an issue on GitHub if you find a bug or want to request a feature, but please read the contributing guide first!

Friday, August 24, 2018

Learning to code is worth it

Someone recently shared this great talk by Chris Allen from lambda conf 2017.  The title of the talk is "Why Johnny Can't Code Good," but the content is more about how to grow as a programmer.  His points are true whether you're just starting out, or have been coding for years.

My notes from Chris' talk are below, in the order they appear in the presentation.  My thoughts are in parentheses.

He's not talking about people who can't code, but rather those who haven't learned to code.  They usually work in the industry, but only know just enough to get things done.  They aren't super-independent, and may have trouble taking on new things.  All of us have been here before (often multiple times in different disciplines; whenever we start something new).

The problem is when you get stuck working on pre-defined tasks in a well-defined space.  The computer science industry's priorities are now wrapped around accommodating people who are comfortable staying there.

For example, nodejs, Go, and other new languages optimize for "zero-to-blog", not for something maintainable, or that allows people to build useful abstractions.  There's more focus on what is marketable in a short blog post.

(An interesting point on hiring:) you can't "hire only the best", unless you're able to attract talent. You can't select for it, because other employers trying to "hire only the best" too.

Using new tools is not learning new skills.  Learning how to learn, without someone feeding you pre-digested material, is how you grow.

Don't say something is easy. It's always going to be harder for some, it depends on their context. Either something is worth learning, or it's not. There may be some return-on-investment cutoff point, but it's either worth trying or it's not.

We're an amnesiac culture. We don't remember 5 years ago (and we don't like learning history).

Don't train how you play. Train harder, be more focused and structured.  (This is a sports analogy. The idea is that you work harder in training than you will work during a game.  That makes the game seem easy.  I have a habit of doing harder things when I'm doing something of lesser consequence.  People often asked me how I learned something, and the answer is often "I broke something and learned until I understood what I broke and what was needed to fix it."  This is sub-optimal at work, when a faster solution that isn't fully understood is preferable to a slower solution that is.)

Friday, April 20, 2018

R/Finance 2018 Registration

This year marks the 10th anniversary of the R/Finance Conference!  As in prior years, we expect more than 250 attendees from around the world. R users from industry, academia, and government will joining 50+ presenters covering all areas of finance with R.  The conference will take place on June 1st and 2nd, at UIC in Chicago.

You can find registration information on the conference website, or you can go directly to the Cvent registration page.

Note that registration fees will increase by 50% at the end of early registration on May 21, 2018.

We are very excited about keynote presentations by JJ AllaireLi Deng, and Norm Matloff.  The conference agenda (currently) includes 18 full presentations and 33 shorter "lightning talks".  As in previous years, several (optional) pre-conference seminars are offered on Friday morning.  We're still working on the agenda, but we have another great lineup of speakers this year!

There is also an (optional) conference dinner at Wyndham Grand Chicago Riverfront in the 39th Floor Penthouse Ballroom and Terrace.  Situated directly on the riverfront, it is a perfect venue to continue conversations while dining and drinking.

We would to thank our 2018 Sponsors for the continued support enabling us to host such an exciting conference:

  UIC Liautaud Master of Science in Finance
  R Consortium
  William Blair

On behalf of the committee and sponsors, we look forward to seeing you in Chicago!

  Gib Bassett, Peter Carl, Dirk Eddelbuettel, Brian Peterson, Dale Rosenthal, Jeffrey Ryan, Joshua Ulrich