WOLFRAM

Data Analysis and Visualization

Best of Blog

Stock Market Returns by Presidential Party

The New York Times recently published an “Op-Chart” by Tommy McCall on its Opinion page showing what your returns would have been had you started with $10,000 in 1929 and invested it in the stock market, but only during the administrations of either Democratic or Republican presidents. His calculations showed that if you had invested only during Republican administrations you would now have $11,733 while if you had invested only during Democratic administrations you would now have $300,671. Twenty-five times as much!

That’s a pretty dramatic difference, but does it stand up to a closer look? Is it even mathematically plausible that you could have essentially no return on your investment at all over nearly 80 years, just by choosing to invest only during Republican administrations?

To answer these questions, I of course turned to Mathematica.

And the answer is that yes, it is mathematically plausible, using the assumptions made by McCall. My analysis using historical Dow Jones Industrial Average data available in Mathematica’s FinancialData function roughly matches the figures in the Times, which used Standard & Poor’s data. (I used the Dow because it’s more convenient, not because I think it’s a better measure.)

But the fact that they are correct doesn’t mean the figures are even remotely meaningful. Here are some problems with the New York Times’ Op-Chart:
Computation & Analysis

Analyzing US 2008 Elections with Mathematica

The 2008 United States presidential election is arguably the most interesting US presidential election in my lifetime.

Already, millions of Americans have registered to vote for the first time in their lives.

Regardless of the outcome, America is going to elect either its first black president or its first female vice president.

America will elect a sitting US senator to the highest office in the land—which, until now, has only occurred twice in US history (Warren Harding and John F. Kennedy were US senators).

Both presidential candidates were born outside of the continental United States.

If elected, John McCain will be the oldest sitting US president upon ascension to the presidency.

Never before in US history has there been such a large disparity in age between the two presidential candidates, either.

It’s also the first election you can analyze using Mathematica 6.
Computation & Analysis

Flag Day

On June 14, 1777, the Continental Congress resolved that the flag of the United States would have 13 alternating red and white stripes, with the states represented as white stars on a blue field. The CountryData data paclet has information about this and many other flags, as can be seen in the “Country Flags and Descriptions” Demonstration. If you’d like to test your knowledge of national flags, there is also a “Country Flag Quiz” Demonstration that you may download for free. Both of these Wolfram Demonstrations show off the power of the CountryData paclet. For example, Mathematica can analyze all those flag descriptions.
Computation & Analysis

3D Printing with Mathematica

An email went out on a mailing list here at Wolfram looking for someone interested in learning about doing 3D printing. I’d heard about these so-called “Santa Claus machines,” but had never seen one in action. They’re really quite interesting. You tell Santa what you want, and out it comes---a shiny new toy! Now it’s not quite that simple, but you get the idea. The models that these printers create can’t be too delicate, or they’ll break. The kind of printer that I’m now most familiar with builds the model from the bottom up, constructing the object one layer at a time from plaster and water. A thin layer of plaster is deposited, then a binding agent sprays from basically an oversized ink-jet printer to harden the areas that form the object. Once the printer is done, you have to dust off the object and infuse it with a hardener so it’s less fragile. But back to the story. Ed Pegg Jr---associate editor for MathWorld---was writing an article about 3D printing and wanted to know more about the process. The idea was to print a physical 3D model of the Spikey, our company logo, at the University of Illinois at Urbana-Champaign, which is just a few blocks from our offices. (You can read about the development of the Spikey here.) This was the version we were working with: But how would we turn that image into something we could actually hold in our hands?
Computation & Analysis

Computable Data—Already Updated in Mathematica

Well, Mathematica 6 has only been out a week, and I’m happy to announce that we’ve already released an update! What’s better, you probably already have it if you use Mathematica 6! How is that possible? After exploring the What’s New website, you might have noticed the page for Load-on-Demand Curated Data, which says our “efficient load-on-demand mechanism makes hundreds of gigabytes of carefully curated and continually updated data immediately available inside Mathematica for use in computations.” We’ve done a lot of work to aggregate data in a variety of disciplines, from chemistry to graph theory, geography to linguistics. This data is collected from a broad range of sources and processed both automatically and by knowledgeable experts here at Wolfram Research, with the goal of providing data that is consistent, computable and accurate. How is this data delivered to you? At first, you might guess it’s shipped along with the many other features of the product. But the box doesn't have a dozen CDs in it and there’s only a single download from our online store. That’s because Mathematica itself automatically downloads the data it needs, when it needs it.