The Wolfram|Alpha Blog is now part of the Wolfram Blog. Join us there for the latest on Wolfram|Alpha and other Wolfram offerings »
The Wolfram|Alpha Team

Computing Stock Data in Real Time

October 8, 2009 —
Comments Off

For active investors, the fast-paced nature of the trading floor requires having tools available to make confident decisions in a timely manner. Wolfram|Alpha offers a collection of money and finance tools ideal for finance professionals and personal finance matters. This data flows into Wolfram|Alpha in real time, providing traders with computation results in charts and graphs. In this post, we’ll look at a variety of ways Wolfram|Alpha can compute and present stock data.

Let’s start with the basics. Simply enter the name of a stock, such as Starbucks or its ticker symbol SBUX, into the computation bar. Wolfram|Alpha retrieves and analyzes both real-time and historical data, and presents the output in category pods. The pods display information such as the stock’s current value at last trade, its value at open and close, and range for that trading period. The “Fundamentals and financials” pod displays information such as the stock’s market share, revenue, number of employees, dividends, and more. Change the “Fundamentals” option on the right side of the pod to see additional information, including ratios, balance sheets, and income and cash flow statements.

Wolfram|Alpha can also produce historical analysis for values such as recent returns, including a price history pod that allows you to adjust the time frame and view the data in a variety of formats such as a basic, a candlestick, or trend chart. The performance pods, for which you can adjust the time period, compare daily and annual returns along with daily and annual volatility. Other pods include a daily correlations matrix, daily returns analysis, projections, and basic company information. Click on the image below to see the full results.

Wolfram|Alpha presents computation results for Starbucks stock

Wolfram|Alpha can compute and compare properties for multiple stocks, too:
Wolfram|Alpha can compute and compare data for multiple stocks

Wolfram|Alpha can also tell you a particular company’s stock properties during a specific period of time. For example: “GE 2000 through 2004”:

Stock history for GE 2000-2004

Wolfram|Alpha can present a company’s data in a candlestick chart:
Wolfram|Alpha presents stock data for Caterpillar in a candlestick chart

Want multiple-step computations for specific properties, such as the market cap for car makers Toyota and Ford? No problem. The “market cap” (market capitalization) is the current price of the company’s stock, multiplied by the number of shares issued. This number represents the value of the company as a whole. At the time of this writing, Toyota’s market cap was $121.2 billion and Ford’s was 23 billion. Enter the query “market cap Toyota / Ford”, and Wolfram|Alpha draws the market cap value for each of these companies and then divides Toyota’s market cap value by Ford’s. See the full results in the graphic below:

Wolfram|Alpha computes market caps for Toyota and Ford

Here is an example of how Wolfram|Alpha can compute properties from different domains, such as its database of financial data and its employment database. When you query “Starbucks net income / a barista salary”, Wolfram|Alpha first draws Starbucks’s 2009 net income of $246.2 million from the financial database. Next, it computes the median annual salary of a coffee-shop attendant, then divides that $16,890 result into Starbucks’s net profit. See the full results below:

Wolfram|Alpha computes Starbucks' net income divided by the median barista's annual salary

Currency conversions are easy, too—here we ask Wolfram|Alpha to retrieve dividends of Walmart stock and convert the data from U.S. dollars to euros:
Wolfram|Alpha computes a currency conversion for Walmarts dividends to euros

We will continue to highlight Wolfram|Alpha’s handy financial tools here on the blog. Until our next post, please browse Wolfram|Alpha’s examples for more, and join other finance and investing enthusiasts who are exchanging inputs and tips on the Wolfram|Alpha Community site.

17 Comments

“Coffee” is misspelled.

Posted by Dennis October 8, 2009 at 5:58 pm

    Dennis,
    Good catch, and thank you! I’ll pass this along.

    Posted by The PR Team October 8, 2009 at 6:07 pm

There is more to investments than figures.
Set a maximum amount you are prepared to lose. Stop dead if this limit is reached and the best of luck. Do not risk your life savings.

Posted by Brian Gilbert October 9, 2009 at 3:54 am

This is really cool. I wish that WA would allow more direct math comparisons like this. For example, nutritional information for a new recipe divided by number of servings or added to a side dish.

Posted by Andrew Breza October 9, 2009 at 12:45 pm

how do you graph candesticks in mathematica?

Posted by Sumanth October 11, 2009 at 8:59 pm

    A candlestick requires four data price points:
    – Opening
    – Closing
    – High
    – Low

    High and low determine the top an bottom “wicks”, open and close define the body. Color of the body is determined by whether the close is higher (green or outline) or lower (red or solid) than the open.

    Posted by Alexi October 12, 2009 at 9:03 pm

This is a nice idea, and has all kinds of ways in which to grow. For instance, Google has made a good first step with their “public data”, but has apparently stopped after their initial efforts.

For example, they do a very nice job with the U3 unemployment data, but do nothing with the U6 data, which is available from the same place and in the same formats as the U3 data.

BLS has all kinds of raw data that is already tabulated in a format that is easy to load into tables — although, with HTML5 just over the horizon, with embedded SQL query capabilities, it would seem that a veritable revolution is at hand in the manipulation of tabular data. If only the data archivists will step up to the plate and make their data available via embedded SQL queries.

Posted by Dave Lentz October 12, 2009 at 5:59 pm

this should come with a strong health warning.
your data on citigroup, shares outstanding and market cap is OFF by a factor of 4, not reassuring.

Posted by jck October 13, 2009 at 2:02 pm

I think, this calculation to the shareholders ..
My students
thank’s

Posted by SAMSUL_F October 14, 2009 at 8:32 am

ACLI had a reverse stock split on 5/26/2009.
Wolfram Alpha does not seem to include this reverse split.

I used IE8 to search for ACLI KEX stock symbols.
The ACLI KEX search result page has an out of memory at line 67 error message.
Also shows a stack overflow at line 80 error message when trying to exit the page.

Posted by Gene Seib October 18, 2009 at 7:13 pm

Thanks for the information this site is good and informative and i suggest my friend to visit this site.
Stock Chart

Posted by alex July 22, 2010 at 3:20 pm

Great blog! I really love how it’s easy on my eyes and the details is well written. I am wondering how I might be notified whenever a new post has been made. I have subscribed to your rss feed which need to do the trick! Have a nice day!

Posted by currency exchange rates August 3, 2010 at 7:58 pm

Thanks for this site.Simply enter the name of a stock, such as Starbucks , into the computation bar. Wolfram|Alpha retrieves and analyzes both real-time and historical data, and presents the output in category pods.The pods display the stock’s current value at last trade.The real time stock as AAPL Stock Price.
——————————————————————————
Historical Stock

Posted by sarahsmith August 5, 2010 at 12:12 pm

Excellent resource.

I’d love to see something about approximate DRIP accumulation (Dividend Reinvestment Plan) added into the mix on any given dividend bearing stock for a particular time period. The compounding nature of the formula seems like it would be very simple to figure out, and would be a HUGE bonus for dividend investors out there …

– D

Posted by Dan December 20, 2010 at 7:26 am

[…] team member introductions, and “how-to’s” in a wide variety of areas, including finance, nutrition, chemistry, astronomy, math, travel, and even solving crossword […]

How do you find the “Computation Bar”? I am brand new and ;learning.

Thanks

Posted by Wayne December 2, 2014 at 11:11 pm

    Thank you for your comment Wayne, the computation bar is simply the search field displayed on the wolframalpha.com home page where you can enter your queries.

    Posted by The Wolfram Team December 3, 2014 at 10:52 am