Bug introduced in 10.0 or earlier and solved in 10.4
Bug introduced in 10.0 or earlier and persisting through 11.0.1 or later

First bug. See output of DateListPlot[%]
Second bug. See output of DateListPlot[wtiInflationAdjusted["Path"]]

Ran across this (possible bug) today.

Here's historical West Texas Intermediate oil prices:

wti = TimeSeries[Import["https://www.eia.gov/dnav/pet/hist_xls/RWTCd.xls", "XLS"][[2, 4 ;; -2]]];
wti = TimeSeriesMap[Quantity[#, "USDollars"] &, wti]

It plots nicely.


Mathematica graphics

Now to put the data in 2016 dollars and plot:

wtiInflationAdjusted = InflationAdjust[wti, {2016, 1, 1}];

And, well, it fails spectacularly for MMA 10.3 on Win7 x64 (also happens on OS X).

We can go about it another way:


...and we actually get a plot, albeit with a $Failed error thrown in:

Mathematica graphics

The only way I can get around an error is to do a ridiculous Quantity conversion:

take2 = TimeSeriesMap[
 Quantity[QuantityMagnitude[#], "USDollars"] &, InflationAdjust[wti, {2016, 1, 1}]];
DateListPlot[{wti, take2}]

Mathematica graphics

Any ideas? User error or bug?

  • $\begingroup$ I'll give this until tomorrow before I slap the "bug" tag on it. $\endgroup$
    – kale
    Commented Jan 25, 2016 at 20:24
  • $\begingroup$ I went ahead and reported to Wolfram and applied the bugs tag since this post got a sarcastically-huge amount of interest! $\endgroup$
    – kale
    Commented Jan 26, 2016 at 19:48
  • 1
    $\begingroup$ same on V.10.3 + Win 10, but no problem on 10.0 + Win 10 (same machine). Definitely, it is a bug. $\endgroup$
    – garej
    Commented Jan 26, 2016 at 21:39
  • 1
    $\begingroup$ I added the bug header and specified two bugs. The main bug (evaluation of DateListPlot[%]) is solved as of 10.4; the second (error message of First) persists through 11.0.1 or later. In case the latter should not be considered as a bug, please remove the corresponding parts in the header. $\endgroup$
    – user31159
    Commented Nov 9, 2016 at 13:45

1 Answer 1


Wolfram confirmed bug. Assigned to [CASE:3521328].

  • $\begingroup$ @bbgodfrey So the answer (as a CW, by the way) a) confirms that is a bug and b) refers to the case number that Wolfram is using. Disagree with your assessment. $\endgroup$
    – kale
    Commented Jan 28, 2016 at 16:22
  • $\begingroup$ @bbgodfrey I am fairly certain this has been discussed by the community before, because I remember personally being on the side of allowing an authoritative "it is a bug" as an answer. If you disagree with this position I encourage you to post on Mathematica Meta, though please first search to see if a discussion already exists there. $\endgroup$
    – Mr.Wizard
    Commented Jan 30, 2016 at 21:03
  • $\begingroup$ @Mr.Wizard I am happy to accept your advice and shall delete my comment. Thanks. $\endgroup$
    – bbgodfrey
    Commented Jan 30, 2016 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.