Recently FinancialData["IBM","Volume"] started failing and when it does randomly work, it returns Quantity[3073167,Shares] but the units "Shares" fails the test: KnownUnitQ["Shares"] returns False. Previously this request returned a number, not a quantity. The same effect happens with FinancialData["IBM","OHLCV"], yet FinancialData["IBM","OHLC"] (no volume) works just fine. This is a new recent behavior. I'm using Mathematica


This does appear to be a bug


(* "11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018)" *)

vol = FinancialData["IBM", "Volume"]

(* Quantity[3073167, "Shares"] *)

As you pointed out,


(* False *)

As a result, QuantityUnit fails

vol // QuantityUnit

(* QuantityUnit[Quantity[3073167, "Shares"]] *)

As does QuantityMagnitude

vol // QuantityMagnitude

(* QuantityMagnitude[Quantity[3073167, "Shares"]] *)

The workaround is to use Part


(* 3073167 *)


(* "Shares" *)

Or without defining a variable,

FinancialData["IBM", "Volume"][[1]]

(* 3073167 *)

WolframAlpha has the same issue

WolframAlpha["trade volume for IBM", {{"Result", 1}, "ComputableData"}]

(* Quantity::unkunit: Unable to interpret unit specification Shares.

Quantity::unkunit: Unable to interpret unit specification Shares.

Quantity[3.073*10^6, "Shares"] *)
  • $\begingroup$ Sent this information to Wolfram support team and they said it does indeed look like a new bug. Support forwarded the issue to the development team, but no ETA on a fix. $\endgroup$ – Logan May 18 '18 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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