A great deal of time, money and effort are expended trying to predict stock market trends. That's especially true at the beginning of a new year and, in the U.S., at the beginning a new presidential term.

Wall Street may have its opinions over which party it prefers in the White House, but America's financial elite also has a definite and much bigger preference for making money.

If history is any guide, that second inclination would suggest Wall Street should be happy with Barack Obama beginning a second term as president. 

Since 1900, the Standard and Poors 500 stock index rose a median 12.1 per cent during the years with a Democratic president, and only 5.1 per cent when a Republican was resident at the White House, according to the Stock Trader's Almanac.

The Almanac has also identified a phenomenon it calls the "post-election year syndrome." After studying stock market performances during four-year presidential cycles, inauguration year to election year,  Almanac authors found that "post-election years have been the worst for stocks" — even though they still went up on average by 4.3 per cent since 1901.

Jeffrey Hirsch and Christopher Mistal offer this explanation on the Almanac website: "There has been an obvious tendency for administrations to orchestrate a favourable economic and investment climate in the last two years of their term before the election. Initiating harsh economic measures and other unpopular deeds in the earlier years of the four-year cycle sets the stage for a recovery ahead of the election."

So, since Obama, a Democrat, won the election, stock market performance should be better in 2013. But because it's a post-election year it could also be a bit of a downer.

But wait!

Hirsch and Mistal also note that if you limit the sample to post-election years since 1945 with Democratic incumbents, stock results have been "quite stellar."

Mind you, there are only four years in that sample — 1945 under Franklin Roosevelt; 1949, Harry Truman; 1965, Lyndon Johnson; 1997, Bill Clinton.

Still, those four years averaged gains of 16.8 per cent in the Dow Jones Industrial Average, while the average gain for post-election years since 1901 when a sitting president from either party wins is 4.3 per cent. (The average for all the years since 1901 has been 7.3 per cent.)

But wait again!

The Almanac also identifies other phenomena that may tell us something about where the market is going. It calls these trends the Santa Claus Rally, the First Five Days and the January Barometer.

The first two suggest the stock market will be up this year and the January barometer is only at the half way point, but so far it is also pointing up.

If the S&P 500 is up for the period of the last five trading days of a year plus the first two of the new year, that's a Santa Claus rally. The average for that period is a gain of 1.5 per cent in the S&P 500 for the years since 1950. This time the gain was two per cent.

"This is the first indication that the current rally still has legs," according to Hirsch and Mistal.

The first five trading days of 2013 recorded a 2.2 per cent gain in the S&P 500, another indicator that the stock market will be up this year.

The last 40 times the index was up for those first five days of a new year, the index at the end of that year was also up, 85 per cent of the time. The average annual gain for the last 40 years with the first five days up is 13.6 per cent

Hirsch, editor in chief of the Stock Trader's Almanac,  told CBC News that the January barometer is the most important of the three phenomena, but that when they all point in the same direction that is especially telling.

The barometer refers to the pattern where, if the market is up at the end of January, it will be up at the end of the year, and vice versa.

January is now half over and the S&P 500 is up 3.3 per cent, after hitting its high and highest close for the month on Wednesday.

What's behind the January barometer

Hirsch says the basis for the barometer is that in "January we get a good feel for what's going on in Washington and how it's going to impact the economy, the market and what's going on in the market, which gives us a reading as to the full year ahead."

This week, in Barron's magazine, Mark Hulbert looks at the validity of both January phenomena, and finds them a bit wanting.

"The 'first five days of January' indicator tells us nothing about how the stock market will perform in 2013," he argues and provides a table based on the Dow since 1896 to make his case. He notes that over some "sub-periods" the first five days indicator "has worked remarkably well," but was a dismal failure for other sub-periods.

On the January barometer, Hulbert writes that "there certainly appears to be more support."

But he also notes that before 1940 the barometer was a big disappointment and then asks for "a plausible explanation for why the January barometer should suddenly start working around 1940."

Asked about Hulburt's question, Hirsch responds that "the January barometer only exists because of the 20th amendment."

That's a 1933 amendment to the U.S. constitution that moved the presidential inauguration date from March to January and delayed the convening of the lame duck session of Congress from the beginning of December to early January. That would mean the barometer ought to become effective in 1937, the year of FDR's second inauguration.

Hirsch says that those changes "packed a lot of political decisions and political policy readings into January, which gave birth to the January barometer."

He says the reason he usually only uses data back to 1950 is because the post-Second World War U.S. is quite different from the way it was earlier and the first full postwar presidential cycle began in 1949.

Since 1950, the January barometer has had an 89 per cent success rate at predicting whether the market will be up or down at the end of the year.

Down Januarys a bad sign

For Hirsch the main takeaway of this isn't the up years but how well the indicator performs in the down years. He notes a favourite ironic saying of Canadian-born economist John Kenneth Galbraith that "financial genius is a rising stock market," since that's the long-term trend.

"Every down January since 1950 has been followed by a new bear market, a continuing bear market, a flat year or a 10 per cent correction, even if the year ended up positive," according to Hirsch.

Both 2009 and 2010 had down Januarys but markets were up at the end of the year. The market crash that began with the 2008 financial crisis hit bottom in March 2009. In Hirsch's analysis the bear market was continuing throughout 2009.

Hirsch may be a proponent of these phenomena, but he cautions that they aren't the only thing he uses in his analysis, and that they don't always reconcile. Right now, he points out, "we've got a cross-current of positive and negative influences cyclically, seasonally, fundamentally and technically."

and while he isn't expecting a big market swing either way in 2013, he does say, "if January is positive and we get some progress in Washington and there's some compromise, that would be a good sign."