You should be fully invested in equities until next Monday's close, July 8, when you should go to cash until the close of July 29. That's when you should once again become fully invested.

These remarkably precise trading instructions come from one of the stock market timing strategies that have the best records of any tracked by Hulbert Ratings over the past three decades.

Better yet, this system couldn't be simpler, or cheaper: It trades on nothing but the calendar, exploiting seasonal strength around the turns of each month as well as prior to stock exchange holidays.

The calendar-based trading system to which I refer was created by Norman Fosback in the early 1970s. Fosback at the time was president of the Institute for Econometric Research; he called this system one of the best short-term indicators he had ever encountered. He has also edited a number of newsletters over the years, most recently Fosback's Fund Forecaster. (Full disclosure: Fosback's service is not one of the newsletters that pays a flat fee to have its performance audited by my firm.)

From the beginning of 1982, which is when my Hulbert Ratings' tracking of this system began, until the end of June, this system produced a 10.1% annualized return on the assumption that it was invested in the Wilshire 5000's Total Return Index when in the market and in 90-day T-Bills when in cash. That compares to an 11.3% annualized return for buying and holding.

Though you might want to dismiss this system for lagging a buy-and-hold strategy by 1.2 annualized percentage points, its performance is actually quite remarkable. That's because it was out of the market more than half the time. One way of appreciating how remarkable its performance has been is by asking the following question: Would you be willing to give up 1.2 annualized percentage points in return for being out of the market more than half the time?

Unless you're a thrill-seeking investor, you should jump at that tradeoff. On a risk-adjusted basis the system outperforms the stock market by a large margin.

There is a catch, of course: Because we know in advance -- by days, months, even years -- when the system gets into and out of the market, it's easy for anyone to trade on it.

And no strategy will continue working if too many investors try to profit from it.

This is more than an academic worry. Starting roughly around the turn of the century, the performance of Fosback's seasonality timing system became much less impressive -- lagging a buy-and-hold on both an unadjusted and a risk-adjusted basis. Some even began writing the system's obituary.

I regularly cautioned my clients over the years that it was premature to declare the system dead, however. That's because, at the 95% confidence level that statisticians often use when determining if a pattern is genuine, you could not conclude that the system's more recent years of mediocre performance were due to anything more than just bad luck.

In any case, I note that the system has started to perform better again. Over the 12 months through Jun. 30, for example, it produced a 12.6% annualized return, more than doubling the 6.2% return for buying and holding.

No matter how good the system's performance, of course, you shouldn't bet on it unless there are strong theoretical reasons for why it should work. And there are at least some plausible explanations, according to Donald Keim, a finance professor at the University of Pennsylvania's Wharton School. One is that retirement plan contributions typically wind their way into the market around the beginning of each month, thereby boosting the stock market's return around the turns of each month. Another explanation focuses on why the stock market may produce above-average returns prior to exchange holidays that occur on Fridays or Mondays: Short-term traders do not want to be short whenever the stock market is close for three straight days.

Note carefully that you would only want to follow this seasonality timing strategy in a tax-deferred account, since all profits will be otherwise taxed as short-term capital gains. And because the system trades so often, you should follow it by investing in the lowest-cost index funds and lowest trading commissions available. Fortunately, there are now several index fund ETFs that have zero expense ratios and can be traded with zero commissions.

Speaking of holidays and the markets, both the NYSE and the Nasdaq markets close at 1 p.m. Eastern on Wednesday, July 3 and are closed Thursday, July 4.

Looking for ways to become a smarter investor? Join Jim Cramer's Action Alerts Plus Charitable Trust Portfolio investor club. Learn more now about our big July 4th sale; save more than 50% off the list price.