Image: Hangs exchanging money in front of a U.S. flag © Plush , DH Kong, Blend Images, Corbis

The historic market rally we've seen over the past few months, in the midst of a deteriorating economy, has been the product of a special set of circumstances.

Market sentiment has reached extreme levels of overconfidence, with small retail traders and professional fund managers all joining in. The economic numbers, while trending lower, have been scattershot enough not to scare the bulls. Fourth-quarter earnings have been trending lower, but slowly enough not to attract attention. The budget battle in Washington has moved to the back burner. Japan is aggressively pumping cheap money into the global economy. And the eurozone crisis has calmed, thanks to temporary political tranquility there.

But the one wild card the market cheerleaders didn't expect to spoil the fun is now in play: politics. In the U.S. and in Europe, scandals, infighting, protests and looming fights over issues like taxes and spending are set to remind the market that not all is solved and that deep structural economic problems remain.

And all that squabbling will peel back the thin veneer that has pushed the Dow Jones Industrial Average ($INDU) past 14,000 and end the rally. Here's why.

Scandal in Europe

The first wrinkles started to appear in Europe earlier this week as the borrowing costs faced by Spain and Italy -- which had been moving lower since last summer on an alleviation of eurozone breakup fears -- started to move higher.

Meanwhile, Europe's economic fundamentals have deteriorated as a strong euro has pinched export competitiveness.

More importantly, important, technocratic, austerity-minded leaders in Italy and Spain are under pressure amid scandal allegations.

In Spain, scandal threatens to bring down the government of Prime Minister Mariano Rajoy, who is accused, along with senior party officials, of receiving illegal cash payments from a construction company in exchange for public contracts. As the scandal has spread, more party officials have come forward to support the claims. And, during a press conference with German Chancellor Angela Merkel, both were visibility flustered as Rajoy admitted some of the things reported about him were true, without specifying which ones.

Anthony Mirhaydari

Anthony Mirhaydari

This is a problem, because Spain has already fallen behind its budget-consolidation targets as a weak economy, 56% youth unemployment and a restive population limit the effectiveness of austerity measures. Protesters have returned to the streets. It's being reported that a weakened Rajoy will demand more time from eurozone officials to meet Spain's deficit-to-gross-domestic-product target.

Political tumult now, with the opposition Socialist Party already calling for Rajoy's resignation, not only would threaten austerity efforts and relations with eurozone creditors such as Germany, but also would jeopardize efforts to solidify the finances of Spain's vulnerable banks. All of this increases the chance that Spain will request a formal bailout, once again raising the prospect of a eurozone breakup.

The economy there is in dire straits. In December, house prices fell nearly 10% year over year, industrial output fell nearly 7% from the same period the year before, and retail sales fell 10.2% year over year.

In Italy, Prime Minister Mario Monti, who is slipping in the polls ahead of elections later this month, is under fire as one of the country's largest banks crumbles in what looks to be an oversight failure -- requiring a taxpayer-funded bailout while the country faces near-40% youth unemployment, higher taxes and less spending. The bank, which has ties to the center-left ruling party and was already in need of a $5.3 billion bailout -- approved, but still being implemented -- is facing additional losses totaling nearly $1 billion after dabbling in derivatives trading.

Italians are angry; the first bailout was an amount equal to an unpopular new housing tax -- increasing the perception that everyday Italians are paying to save politically connected fat-cat bankers. This is increasing the strength of former conservative Prime Minister Silvio Berlusconi in the polls -- a man who had rejected eurozone calls for budget cuts and is promising tax cuts if elected.

Both situations are threatening the pro-austerity unity in the eurozone and disrupting the relative calm that had settled into the markets there. No wonder the Spanish stock market has returned to early December levels. For investors here at home, any eurozone fallout will weaken the euro, strengthen the dollar and jeopardize dollar-sensitive assets like commodities and emerging-market stocks, as well as risky assets in general.

Washington saber-rattling

In the wake of the kick-the-can fiscal cliff deal over the New Year's holiday, Wall Street has taken a break from worrying about U.S. budget deadlines and the tough decisions on issues like taxes and spending that are required to solve it.

The reprieve is almost over. At the end of the month, the country faces an additional $1 trillion in spending cuts (over 10 years) in the form of the budget sequestration, half of which will hit the Pentagon. It's worth noting that the reason fourth-quarter GDP came in at -0.1% was big cuts in defense spending, which the bulls said would prove temporary. As it's structured now, the sequester will make this anything but temporary.

Then, at the end of March, we face the end of the continuing budget resolution that keeps the government running. Unless Democrats and Republicans can agree on new spending plans, we face the prospect of a partial government shutdown. Republicans are working on a tough budget that, they say, will kill the deficit within 10 years. And they were able to get Senate Democrats and President Barack Obama to agree to their "No Budget, No Pay" plan that requires both houses of Congress to pass a budget plan or face having their pay withheld.

So budget plans are coming. Obama has missed his Feb. 4 deadline to file the White House budget proposal, but he will need to release it soon.

After all that, the debt ceiling looms again in May. And Obama is calling for a short-term delay in the scheduled sequester cuts -- featuring tens of billions in taxes and spending -- to give Washington more time to find $1 trillion in spending cuts.

Because the budget is the one issue Republicans feel they can take a strong stand on, given Americans' feelings on taxes and the debt ceiling, expect another big battle, renewed brinkmanship and more political blood sport. Citigroup strategist Steven Englander believes Wall Street faces a repeat of the reaction to the2011 debt-ceiling fight:complacency first, then horror.

Currency wars

The third and final way I see policymakers shaking the economy this year has been the headlong push toward an outright global currency war as the world's major central banks all look to lower the value of their currencies as a way to boost exports, increase competitiveness and juice economic growth.

Much of the reason stocks have been on a tear lately has been because the Bank of Japan, spurred by a new government, has joined the Federal Reserve and the European Central Bank in committing to unlimited money printing in a last-ditch attempt to boost growth.

Because of this, the yen has collapsed back to early 2010 levels -- a development that worries European politicians. On Tuesday, French President François Hollande warned that Europe was leaving the euro vulnerable to volatility and asserted that the eurozone needed to work toward a lower-valued currency.

Other countries, such as Brazil, have been openly critical of what they see as a race to the bottom in exchange rates. Singapore's Monetary Authority recently warned of the need to avoid competitive devaluations and the protectionist measures that would surely follow as countries try to keep their products competitive in the global market. There is reason to be worried, with Singapore's non-oil exports down nearly 20% from last year because of currency issues.

This has similarities to the breakdown of trade relations during the Great Depression. Back then, the issue was tariffs on imports. Today, it's currency devaluation. But the intention (boosting exports) and the fallout (breakdown in trade relations) feels very similar.

What the pols are doing to you

While investors are feeling good right now, with active fund managers more aggressively positioned now than at the 2007 market top and small, speculative Russell 2000 Index ($RUT) futures traders moving to a near-record long position, cautious investors should keep an eye on these three areas in the weeks and months to come. If things go badly, they will disrupt the rally.

Politics is, by nature, unpredictable. And with recession-fatigued voters and high-strung tensions, fireworks are likely to disrupt the calm that has settled on Wall Street and enabled stocks to drift higher.  

In anticipation, and with cyclical, economically-sensitive stocks and sectors already rolling over, I've recommended shorts against weakening stocks such as AK Steel (AKS) and Alpha Natural Resources (ANR) as well as long positions in inverse exchange-traded funds such as ProShares UltraShort FTSE China 25 (FXP).

And if you're absolutely committed to maintaining long exposure, consider defensive, noncyclical issues just starting to perk up, including AT&T (T) and Integrys Energy (TEG).

Click here to become a fan of MSN Money on Facebook

At the time of publication, Anthony Mirhaydari did not own or control shares of any company mentioned in this column in his personal portfolio. He has recommended Alpha Natural Resources and AK Steel short and ProShares UltraShort FTSE China 25 long to his money-management clients. At the time of publication, his Edge Letter Sample Portfolio had short positions in Alpha Resources and AK Steel.

Be sure to check out Anthony's new money management service, Mirhaydari Capital Management, and his investment newsletter, the Edge. A free, two-week trial subscription to the newsletter has been extended to MSN Money readers. Click here to sign up. Mirhaydari can be contacted at anthony@edgeletter.com and followed on Twitter at @EdgeLetter. You can view his current stock picks here. Feel free to comment below.