It is the best of times, it is the worst of times for investors.

Only two months into the year, the broad S&P 500 index is up more than 6%, and oil is up twice that amount. And while the stock market’s rise these past two years has been accompanied by dreary economic news, we’re now starting to see truly encouraging developments in the economy.

The Labor Department reports that jobless claims plunged to a two-and-a-half year low, unexpectedly (they were actually forecast to rise somewhat), and after a long and bitter recession current economic forecasts call for respectable 3.5% to 4% growth this year. A strong auto sales report for February confirms the upbeat trend in consumer confidence.

Alas, just as we are on the cusp of good times, signs suggesting they will be short-lived abound. The commodities boom that has gratified the investing class poses a big challenge at the consumer level.

I know a manufacturer who distributes food products nationwide. Rising prices for the ingredients he requires have driven his costs up significantly.

His customers know him, trust him, like him — but that doesn’t mean they will accept the price increases. His choice is to eat the costs and keep his prices as they were, or to raise them and see the contract competitively re-bid.

If my friend’s experience is typical, and market prices and trends indicate it is, I foresee a profit squeeze ahead for commodity-dependent businesses, which is to say the whole economy.

The key may be the commodity with perhaps the widest impact: oil. The events in the Middle East and North Africa are a fresh reminder of just how interdependent the world is. The world’s most advanced economy, finally on the verge of growth, could fall back into deep recession based on events in the world’s most backward regions where illegitimate despots sit atop the filthy fuel we need to keep our world moving.

Indeed, the findings of James Hamilton, an economics professor at U. San Diego who studies oil shocks, are grim. His research (cited by economist Irwin Stelzer in the Weekly Standard) indicates that all but one of 11 postwar recessions was highly associated with the kind of oil shock that seems to be unfolding right now.

Does this mean sell, sell, sell?

It’s never so simple. For one thing, the situation in the Mideast could stabilize, leading oil prices to glide, or fall, back down. 

That’s the view of David Malpass, a former senior Treasury official and principal of Encima Global. Recent Encima reports suggest the market will pick up the slack from the shutdown in Libyan oil production, and that global economic uptrends will more than compensate for continued troubles in North Africa.

As another of those reports states: “Our market concerns aren’t centered on Libya or $100 oil. Global growth hasn’t been that sensitive to oil prices, and the world is finding oil and BTU equivalents quickly. Libya’s oil and gas production could be met by other suppliers.”

Malpass could be right.

Perhaps Saudi reserves could compensate for Libyan oil as Saudi Arabia’s oil minister has pledged, and perhaps global growth trends will not be stopped. So what is an investor to do in these best times/worst times scenarios? Just as we worry about oil shocks, so too must we concern ourselves with portfolio shocks.

One potentially effective way to do this would be to invest in volatility, which is currently on the rise.

The ever-expanding ETF market has a solution for this need in the form of two newly introduced volatility ETFs: ProShares VIX Short-Term Futures (VIXY) and VIX Mid-Term Futures (VIXM).

There are several ETNs that have been on the market a while longer, such as the iPath S&P 500 VIX Short-Term Futures ETN (VXX) and iPath S&P 500 Mid-Term Futures ETN (VXZ).

Another approach, which seems to have had greater success in responding to volatile commodity trends, is the Direxion Commodity Trends Strategy Fund (DXCTX). [Disclosure: I own shares in DXCTX.]

The basic idea, in theory at least, is to own shares in the trends that frighten equity investors and trigger losses, such as rapidly rising oil and other commodities.

That way you get a bit of the best of times when times are worst.