WolframAlpha has knowledge of crude oil prices, as a simple query will show. I am trying to obtain this data for use in Mathematica but I am not able to figure out the input.

If I try


The result is that this is not a known entity. Do I need to find another source or is there a simple way to access historical prices for the past 10 years directly from the Wolfram database ?


You can import the prices from the Energy Information Administration.

RCLC1d = Import["http://www.eia.gov/dnav/pet/hist_xls/RCLC1d.xls"];
c1 = RCLC1d[[2, All, {1, 2}]];
c1prices = Cases[Drop[c1, 3], {_, _?NumberQ}];

DateListPlot[c1prices, Joined -> True, 
 PlotLabel -> "WTI Oil Price since " <> 
    c1prices[[1, 1]], {"Day", " ", "MonthNameShort", " ", "Year"}], 
 FrameLabel -> {None, Style["$", Large]}, RotateLabel -> False]

enter image description here


Edit, still the lazy way:

enter image description here

Go the lazy way and try the folling

enter image description here

  • $\begingroup$ Indeed, I have done that. But what I would like to do is to import this into mathematical for further treatment. At the moment I don't know how to do it. $\endgroup$ – Whelp Feb 27 '16 at 16:18

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.