Mojena Market Timing
Timing Model

The Timing Model is a proprietary computer-based mathematical/statistical model that issues buy and sell signals as it detects changes in the direction of stock market trends based on a set of predictive indicators. 

Right off let’s say that economics and finance, as social sciences, are not pure sciences and so the models are more likely to be imperfect, even disastrously wrong, than in pure science.  This page describes a backtested model, a timing system, that has outperformed buy-n-hold (greater return, less risk) in real time since 1990.

Note also that each new year brings a revised model that incorporates the previous year’s data.  Then the revised model is used “live” or real time during the entire new year.  Why do this? The stock market is evolutionary as it changes and adapts… and so must the model.


The accompanying table and charts summarize the backtested performance of the timing model over selected time periods, with comparisons to inflation, money market based on Treasury Bills, and buy and hold for the S&P 500 index… starting with $1000.  The S&P 500 index is used because of its importance: it’s the most followed, most used as a benchmark, has a long history,  most used to compensate fund managers, and covers most of the market-cap of the US.

The timing strategies determines what to do when a sell or buy signal is issued by the model.  The standard timing strategy is fully in stocks (based on the S&P 500 Index) during a buy signal and completely out in a money market (based on Treasury Bills) during a sell signal.  The aggressive timing strategy ups the ante with a multiplied (greater by half) investment during a buy signal and a gain during a sell signal equivalent to a market decline (or a loss equal to a market gain).  Specifics are described at the bottom of the table.

Timing Model Version: 2017

Starting Amount $1000  
 Ending Amount

Per Year Return

Years to Double

Morningstar Risk

Max Annual Drawdown








T-Bills (Money Market)






Buy & Hold






Model Using Standard Strategy






Model Using Aggressive Strategy













T-Bills (Money Market)






Buy & Hold






Model Using Standard Strategy






Model Using Aggressive Strategy













T-Bills (Money Market)






Buy & Hold






Model Using Standard Strategy






Model Using Aggressive Strategy













T-Bills (Money Market)






Buy & Hold






Model Using Standard Strategy






Model Using Aggressive Strategy













T-Bills (Money Market)






Buy & Hold






Model Using Standard Strategy






Model Using Aggressive Strategy













T-Bills (Money Market)






Buy & Hold






Model Using Standard Strategy






Model Using Aggressive Strategy






Buy & Hold is buying and holding the S&P 500 Index through thick and thin, including reinvested dividends.  Model Using Standard Strategy is 100% in the S&P 500 during buy signals, including reinvested dividends, and 100% in T-Bills during sell signals.  Model Using Aggressive Strategy is 150% long the S&P 500 (dividends not received) during buy signals and 100% short the S&P 500 (dividends not paid) during sell signals.  Returns for the model are based on next-day trades at the close.

Per Year Return is the annualized return that would give the ending amount over the given time horizon, including any reinvested dividends, but not including expenses or taxes. Each account started with $1,000 and was updated (compounded) on a weekly basis. Years to Double is the number of years it would take to double the value of the account given the per year return for the relevant time span. Morningstar Risk is average under performance relative to the three-month T-Bill's annual return, a la Morningstar.   Max Annual Drawdown is the maximum loss sustained for the entire year (the biggest decline based on annual returns). 

Buying and holding stocks from 1970 forward would have returned an annualized 10.2%, including nine losing years with losses up to -37%. The standard timing strategy returned an average 17.5%, while the aggressive timing strategy further upped the return to 25.9%. Putting $1,000 into stocks in 1970 and letting it ride would have accumulated about $98 thousand by the end of last year. The equivalent money market indexed on T-  Bills would have been about $9 thousand. The same starting amount based on the timing system would have grown to about $1.9 million using the standard strategy and $50 million using the aggressive strategy. The average performance of the standard timing strategy doubles a portfolio in 4.3 years.  To account for real return we can subtract the inflation rate.  For example, over the entire time frame from 1970 on, the annualized real return for buy and hold is about 6.2% (10.2 less 4.0%).  Note that the artificially low interest rates by the Fed resulted in T-bills either just beating inflation (in the 2000s) or not keeping up with inflation (2010s).  The real return for buy and hold over the 2000s is -3.5%, worse than the -1% shown.

The -37% buy-and-hold worst drawdown loss over the test period far exceeded the -3% and -9% losses for the standard and aggressive strategies.  And note that the 2000s “lost decade” shows a -1% yearly loss for the S&P 500, but annualized gains of about +12% and +27% for our timing strategies.

The aggressive timing strategy gained an impressive +30% during the debilitating bear-market in 1973-74, while the standard timing strategy lost -3% and buy-n-holders liquidated about -42% of an S&P 500 portfolio.  During the bear market of 2000-2002, buy & hold portfolios shrank -46%, while the standard portfolio gained +1% and the aggressive portfolio surged +48%.  The bear market of 2007-2009 axed -55% from the S&P 500, while the  standard strategy gained +3% and the aggressive strategy gained +105%.

The timing model has its warts as well. The standard strategy had three losing years (-1.0, -3.5, and -1.6), while the aggressive strategy had five losing years (ranging from -0.6 to -9.3%).  By comparison, buy and holders lost money in nine years, with losses ranging from -3 to -37%. Out of 47 years, the standard strategy under-performed buy & hold in 6 years, breaking even in 21, and winning 20.  The aggressive strategy beat buy and hold in 77% of the years.

Still, the timing model's strategies yielded superior results over the once popular, although theoretical and discredited, buy-n-hold strategy. And it accomplished this with much less risk of under-performing the money market alternative during weak stock market years. In particular, note the results for the risky and tough investment period spanned by the 1970s. During that turbulent decade, buy-and-hold returned less than money markets. Worse yet, inflation sprinted to an annualized rate of 7.4%, giving a real (inflation-adjusted) negative return for both money markets and stocks!  And, the results are even worse for buy & holders during the 2000s decade.

Risk is often expressed and calculated as volatility in returns. From my perspective, however, it's not simply a measure of volatility; it's a measure of downside volatility. In one version, as implemented by Morningstar Mutual Funds, a portfolio exhibits risk if it under performs the money market alternative. For example, in 1990 the buy-and-hold S&P 500 strategy lost -3.2%, whereas T-Bills returned +7.5%. The risk for that year is the 10.7 percentage points by which the S&P 500 under performed T-Bills. The risk for a year is zero whenever a portfolio's return exceeds the T-Bill rate. A risk calculation in the table is the sum of risk results for each year divided by the number of years. By this definition of risk, a money market's risk based on T-Bills is zero. Note that the standard strategy's Morningstar risk is about one-sixth that of the considerably riskier buy-and-hold S&P 500 strategy (0.7 v 4.3%).

The accompanying Return vs (Morningstar) Risk chart shows the standard portfolio above (higher return) and to the left (lower risk) than the buy & hold portfolio.  A good timing model “can have its cake and eat it too.”  It can achieve higher return with lower risk than the widely-promoted buy-and-hold strategy.  Note, however, that the aggressive strategy yields higher return than the standard strategy, but at the expense of greater risk.  This result is consistent with financial research (and conventional wisdom) that higher return incurs higher risk.  Yet, the aggressive strategy sustains just one-fourth the risk of buying and holding (1.0 v 4.3%).  A good timing model can turn conventional wisdom on its head.

Maximum drawdown is another risk criterion.  For buy and holders this risk amounted to a devastating -37% annual loss (in 2008), compared to about 3% (1977) for the standard portfolio, and 9% (1977) for the aggressive portfolio.  Standard deviation (Sigma) is another measure of statistical risk that’s widely used in theoretical financial models, although it treats upside and downside variations from the average or mean equally, an undesirable trait for capital preservation. Sortino Sigma accounts strictly for downside deviations, a more appealing metric of risk.  As expected, the model’s strategies have lower Sortino Sigmas, as seen in the accompanying table. 

Two popular methods of accounting for risk-adjusted returns are the Sharpe Ratio and Sortino Ratio, the former named after Nobel Laureate William Sharpe. These calculate the excess returns (returns less risk-free returns based on 90-day T-bills, our money market benchmark) and divide by their respective Sigma and Sortino Sigma.  In other words, each ratio measures excess return per unit of standard deviation.  It’s useful in comparing the performances of different portfolios during the same time period. 

The model’s strategies clearly outperform buy-n-hold on a risk-adjusted basis as well.  Note that the standard strategy has higher risk-adjusted returns than the more volatile aggressive strategy, meaning that the latter didn’t generate enough additional return to compensate for the additional volatility.  During the strongly cyclical decades of the 1970s and 2000s, the standard strategy exhibits much less risk than buying and holding, by any measure.

Yet another take on risk is value at risk (VAR), which in our case addresses the question "How much do we stand to lose from one week to another?" The accompanying table yields some interesting answers, including responses to the dual question "How much can we gain in a week?"

From a VAR viewpoint, the red cells tell a potentially harrowing story for risk-averse investors. Buy & holders suffered losses in 43% of the weeks, just above the 42% for the aggressive timing strategy; the standard timing strategy reduces this risk to 31%. The worst weekly drawdown was about -18% for buying & holding; again, the standard strategy shows lower risk at about -8%, while the aggressive strategy posts -12%. The maximum drawdown for buy & holders  was sustained during the extremely turbulent 2008; the model's maximum loss was in the second week of September, 1986, as the market gave back strong gains from the preceding month. Out of 2453 weeks, the standard strategy lost more than 7.5% in just one week. Buy & holders incurred 10 such losses, but the aggressive strategy showed 21 severe weekly losses exceeding seven and one-half percent.

The aggressive strategy does compensate the risk takers, with some spectacular weekly returns. The +21% maximum return in the table is not a misprint; it was achieved in the first week in October, 1974, as the S&P 500 vaulted from the bottom of the bear market during a buying panic, marking the end of that bear market, and a point in time that many analysts cite as the beginning of the great secular (long-term) bull market that ended in 2000.  At that time the aggressive strategy was 150% long..  Its next best weekly performance was +18% in the second week of October, 2008, a short position during a week that featured an -18% selling panic in the waning weeks of that bear market.

Regarding volatility, as seen near the bottom of the table, the model's standard portfolio strategy shows a lower standard deviation than buying and holding, as expected. The aggressive strategy shows the highest variability, although this measure is influenced by returns both below and above the average return. 

The standard and aggressive strategies have the highest Sharpe ratios, about 2 1/2 times that of buy and hold.  From a weekly standpoint, the standard and aggressive strategies have about the same Sharpe ratio.  The standard portfolio has a lower return than the aggressive portfolio, but its much lower standard deviation compensates when risk is taken into consideration.  On an annual basis standard beats aggressive, as shown in the earlier table.

Alpha and Beta are still other metrics for performance and risk, as seen within the table at right.  Alpha is a measure of a portfolio’s excess return relative to the risk assumed by buying and holding an index, in this case the S&P 500.  The positive alpha for the standard strategy indicates that this strategy adds value to its investments in the S&P 500.  Numerically, the strategy would return an average +9.5% in a year when the S&P 500 broke even.  A negative value here would indicate downside risk.   Beta can be thought of as the volatility of a portfolio (up and down, not just down) relative to the index.  Beta for the standard strategy says that its annual up/down return movements are on average just about 57% of the annual return changes for the S&P 500.  Lower volatility would be expected, given that this strategy resides in TBills 22% of the time. As seen, both strategies yield excess return and lower volatility than buying and holding.  See here for how these metrics are calculated.  As reported in this table, returns are risk-adjusted by subtracting the risk-free return for each year.  Also, the “fit” of the regression line is much more significant for the standard strategy (R-square 0.54), but less so for the aggressive strategy (R-square 0.08), meaning that the estimates in the table are more reliable for the standard strategy than for the aggressive strategy.  The aggressive strategy’s low correlation with the S&P 500 also says that this strategy offers diversification (and lower volatility) when part of a portfolio that also includes the S&P500.

The stock market can be hazardous to our short-term wealth, with severe price shocks to the downside. The standard timing strategy has historically reduced this form of risk, but it does take a steady hand at the helm during these short-term squalls.

Model Scores and Construction

The timing model calculates a score in the range 0 to 100. A score of 50 is dead neutral, roughly stating that the odds of a currently up trending market are the same as a currently down trending market. A score of 80, for example, says that the likelihood of a primary uptrend is 80%, or four to one odds; a score of 10 indicates only a 10% probability (odds of 1 to 9) of a primary uptrend. A primary uptrend is defined as an increase of 8% or more in the S&P 500 Index over at least eight weeks, based on end-of-week closings (usually Fridays). Similarly, a primary downtrend is defined as a decrease of 8% or more in the index over at least eight weeks, based on closings at the end of a week. Basically, we want to be in stocks during primary uptrends and in cash during primary downtrends.  The table at left shows common stats for the lengths of primary trends.  Note that up trends filled 73% of the total weeks and are longer than primary downtrends.

So, for example, based on closings at week’s end: If we're currently in a primary uptrend and then the market starts falling, the trend will change to downtrend if a closing price exceeds an 8% decline from the uptrend's week-ending peak after at least 8 weeks, else the trend remains an uptrend.  Conversely, if now in a primary downtrend and the market subsequently rises 8% or more from the downtrend's week-ending low, then the trend changes to an uptrend, providing that at least 8 weeks have passed. To reduce volatility, these changes have to occur over a period of time, eight weeks or more, as a means to reduce the ill-modeling effects of countertrend spikes.  The model views an uptrend as a series of 1s and a downtrend as a series of 0s.  It then predicts (as a probability between 0 and 100) whether the end of a current week is in an uptrend. 

Buy and sell trades (signals) are triggered by comparing the model's score to rigorously tested buy and sell bands. A score at or above the buy band (currently 55) is positive or bullish for stocks; a score at or below the sell band (currently 41) is bearish or negative. If we're in a sell phase (the last signal was a sell trade), the score must hit or pop above the buy band 55 for the model to issue a buy trade; otherwise, it remains a sell. Likewise, if we're in a buy phase, the score must hit or sink below the sell band 41 to issue a sell trade; else the model stays on its buy signal. We can interpret scores within the band as hold current position.

So, from the standpoint of primary trends, if currently on a sell and the score rises to 55 or above, the model decides the primary trend has changed to up.  Likewise, if currently on a buy and the score drops to 41 or below, then the model decides we have a new primary downtrend. That's why in the downloadable data files you see a series of 1s and 0s. Based on rigorous testing the boundaries 41/55 for the current model determine the model's view if the primary trend has changed.  And does it in a way that maximizes the value of the portfolio over the test period since 1970.

The accompanying chart and tables show 53 switch signals (trades) over 47 years, averaging about one per year. An average 46 weeks passed between trades.  Buy trades ranged from 1 to 407 weeks, averaging 72 weeks, where one-half were above 32 weeks in length; sell trades lasted anywhere from 1 to 78 weeks, averaging 20 weeks, with one-half the sells lasting over 13 weeks. Of the 53 trades, there two one-week switchbacks, three switched back after two weeks, and three lasted three weeks. Sixteen trades (30%) were less than 8 weeks.  The model spent 78% of the time in stocks.

An average of 1.1 trades per year can be misleading.  The model switches more frequently during turbulent periods.  There were 5 signals in less than a year during November 2007 to May 2008, the start of the financial crash that included twin bear markets.  That last sell mostly stepped aside from a market that collapsed 50% into March, 2009 (see 42% Max Avoidance in table below).  In the trendless and turbulent 2015 market the model issued 4 trades.  During many switches it’s tempting to ignore one or more trades, behavior that can dent returns given the asymmetry of results in the table below.  Note that the model easily beat buy and hold during the difficult 1970s (table at the top of the page): annualized 6% for buy and hold, 14% standard timing, 19% aggressive timing.  During the 2007-2009 debacle buy and hold crashed 55%, the standard timing strategy gained 3%, and the aggressive timing strategy surged 105%.

This model’s historical record shows that 22% of the sell trades (6 of 27) resulted in missed gains (regrets) averaging +2.5%, ranging from to +6%. (See table left.) The 78% successful sells avoided losses of -12% on average, ranging from -1 to -42%.  On average, a sell trade avoided a loss of -9%.  These asymmetric results suggest that it’s wiser to follow sell trades than not.  Buy trades were successful 69% (18 of 26) of the time with gains ranging from about 1 to +266%, averaging +51%.  The 31% unsuccessful buys incurred losses of up to -6%, averaging -3%.  Overall, buy trades gained an average +34%.  We can think of regret sell losses and losing buy losses as insurance premiums for avoiding severe losses during serious market declines.

The model is made up of components called indicators or predictors.  I revise the model each year in January, as data for the preceding year are incorporated into the model’s structure. During this process, new and revised hypothesized indicators are researched and vetted, as I seek improvements in the model’s performance. Think of this as developing a product with a number of ingredients, the particular mix and strength of these ingredients affecting the efficacy of the product, say, a drug or a food. Each new ingredient in combination with existing ingredients is laboriously tested, as in a chemical or biological lab. Is the new ingredient (indicator) effective as it interacts with others in the mix? Can I change the nature of that particular ingredient to create a better product?  Each indicator is a mathematical/statistical manipulation or transformation of one or more data points. So, for example, if chili powder is one of the ingredients (indicator) in chili (the model), what constitutes chili powder includes its own set of fundamental ingredients (data points).

The initial selection of an indicator is rooted in the scientific method: formulate a hypothesis, design the experiment, test the hypothesis, draw a conclusion.  For example, a so-called null hypothesis might be “Yield spread (T-bill minus Dividend Yield) is unrelated to primary trends.” The experiment is the structure of the model used and the inclusion of this indicator in the model.  Its test is running the revised model to identify primary trends.  The conclusion would be to further consider this indicator if it’s statistically significant, meaning that the hypothesis is rejected.  In other words, yield spread is related to primary trends. The monetary performance of the revised model is then evaluated.  If it improves return, then the new indicator is incorporated in the model.  The current model does include yield spread as an important indicator: As yield spread increases the model’s score decreases (a negative correlation).

The current model included tests of indicators that were carefully constructed (derived or transformed) from a set of data points, based on financial and technical hypotheses.  (No miniskirt or Super Bowl indicators here.)  Of these, 14 indicators using 28 data points passed experimental muster over the test period from 1970 to date.  These distilled indicators feed the model’s score calculation. Note from the chart above that the model is an oscillator that generates probabilities as it fluctuates (oscillates) between 0 and 100 (probabilities of 0-100% or 0 to 1), depending on the influence of its indicators.  Moreover, within the range of about 20 to 80 the model is particularly sensitive to its indicators.  Conversely, scores near the upper or lower end change reluctantly.

A buy trade is issued when the score is 55 (probability 0.55) or above; a sell trade is given when the score is 41 (probability 0.41) or below.  Scores between 41 and 55 mean hold the current position, whether on a buy or sell.  So, if currently following a buy signal and a sell signal is issued (the score changes to 41 or below), the standard portfolio switches to a money market, and stays there while the score is under 55.  If the model is currently on a sell signal, then the standard portfolio stays out of the market while the score is under 55, but buys the market should the score hit 55 or above.

We can group indicators into four categories for descriptive purposes. Technical indicators reflect levels, changes, and other measures of stock market price activity, the end results of the battles between the forces of supply and demand.  Momentum, trends, and volatility in stock market indexes, internal (under-the-surface) indicators relating to market breadth calculated in various ways based on up and down volume action, relationships between new highs and lows, and measures of advancing issues versus declining issues are all examples of technical indicators. The model’s technical indicators include its own versions of the popular Bollinger bands, negative volume index, death cross, and golden cross indicators. Monetary indicators include levels, changes, and differences in various interest rates, as in their effects on yield curves; certain actions by the Federal Reserve that implement changes in monetary policy; and money supply measures that influence economic activity, such as the widely reported M2. Sentiment indicators gauge emotion in the market.   Many of these indicators take advantage of the "herd mentality" by giving signals that run contrary to extremes in sentiment.  For example, high levels of cash in mutual funds not only may mean that cash is available to fuel an up move in the stock market but also that stock fund managers are bearish on the market.  As another example, extremely bullish sentiment among financial newsletter writers or retail investors often means that the market is about to reverse course to the downside (if everyone is already bullish, who's left to buy?).  The model includes the widely-followed AAII Investor Sentiment Survey and other metrics to account for this factor.  Fundamental indicators describe economic and valuation activities. These include measures of inflation, growth, GDP, and other factors related to the overall economy; they also embrace relationships among stock prices, corporate earnings, and dividends, such as price/earnings ratios and dividend yields. Research indicates that large stock market losses are more likely when valuation levels are high, not low.  This result shows up in the model’s choice of fundamental indicators.  The literature usually includes monetary indicators under fundamental.  Here we break it out as a separate category that’s uniquely important and widely studied and reported.

Several indicators include two categories: monetary/sentiment, tech/monetary, monetary/fundamental, and tech/sentiment.  For example, the VIX used in the model reflects sentiment (fear) but is a technical calculation for 30-day implied volatility in statistical finance.  When this metric is elevated, fear is high and impulsive selling episodes are more likely, especially during bear markets.  During the twin bears in 2000-2002 min/max/ave VIX daily closings were 16/45/25; 16/81/33 for the twin bears in 2007-2009.  When fear is lower (VIX below average 20 down to minimum 9) the market more easily shrugs off bad news and “climbs the wall of worry.” Another example: The model's hybrid monetary/fundamental indicator considers two counteracting effects. Fundamentals such as price/earnings and dividend yields are negative influences when prices rise and/or dividends and earnings decrease. But, low interest rates cushion their effect and ultra-low rates totally negate their negative influence on the model.

Fundamental and monetary indicators can be thought of as measures over longer term horizons, as attempts to divine secular trends and cycles such as recessions, bear and bull markets.  Technical and sentiment indicators are more useful as intermediate term measures, more associated with 10-20% corrections.

As mentioned elsewhere, the model is adaptive, in that it incorporates the previous year’s data. The revised model is then used live in the current year.  The change from year to year is far from dramatic, as the model is reasonably stable. Its indicators for this year dropped from 15 to 14, while improving overall statistical significance and performance. One technical indicator (that used the Dow Industrials and Transports) and one monetary indicator (yield curve) were dropped (based on a loss of statistical significance from both updated data and revised or new indicators) and replaced by a single fundamental that uses earnings yield (e/p), dividend yield (d/p), and inflation (CPI) in its calculation.  And a (death/golden) cross technical indicator based on weeks was replaced by another that’s updated at the end of each month. 

No one indicator dominates the model.  Many analysts focus on one or two indicators regarding market direction, a decidedly narrow view that ignores other competing influences.  For example, many investors view a meaningful rise in interest rates as a time to sell.   The extent of this influence depends on other factors as well.  At what point are we in the interest rate cycle?  Where are we in the business or profit cycle?  Is market momentum strong?  What appears under the hidden technical surface?  Is the market overvalued, undervalued, or fair-valued?  How much is emotion influencing the market?  Reality is much more complex and subtle.  Note also that external factors such as terrorist attacks and geopolitical events are unpredictable and not directly accounted for by the model, but the model does monitor how the market “patient” reacts to these events, much like a real patient’s vital signs are measurable by instrumentation.  The effect of a shock to the system is much more pronounced when the patient is weak (the model is on a sell signal or shows a low score) than when a patient is strong (the model is on a buy signal or has a high score).  Declines during “emotional” times suggest opportunities for additional, although scary, commitments to the market, providing that the model remains “comfortably” above its sell trigger. In sum, the model stirs 14 indicators into the pot, making its decisions based on the interactions that determine this brew’s composite flavor.

The selected model for the new year and its buy/sell triggers maximize total return by applying the standard strategy from 1970 to the end of the recently completed year.    

More readings?  Technical analysis    Fundamental analysis    Sentiment indicators

For the technically inclined…

Over the years, I’ve tested buy/sell triggers and hundreds of indicators over countless trials that affect the model’s performance. Performance in this case is the standard strategy’s total return, based on the ending value of a portfolio that begins in 1970 and ends the year just completed, providing the model itself and all indictors are statistically significant. After too many trials to count, I select the model (mix of indicators) and sell/buy triggers that optimize (maximize) the portfolio’s total return, providing the resulting model is reasonably stable with respect to a limited number of trades and robust regarding small changes in its parameters (numeric constants used in the model). Moreover, each candidate indicator for inclusion in the model must be statistically significant at p<.05.  The current model has all p<.03 and most zero to three digits.

The accompanying chart plots the model’s function, a binary logistic regression.  The term “binary” refers to the use of 0 or 1 to respectively describe a primary downtrend and uptrend. This is the target variable used by the logistic regression to approximate the pattern of zeroes and ones over time. The x-axis (horizontal axis) is the function’s calculated result based on specific values for its indicators in a particular week; the y-axis (vertical axis) is a (logistic) transformation from the x-axis that gives an equivalent probability, that is, the likelihood that we’re in a primary uptrend, or the probability that the particular week is associated with a “1.”  Note that the function approaches the y-axis asymptotically, meaning that it gets closer and closer to its extremes (0 or 1) but never gets there, regardless of how far out we go.  Note also that the model is steep within its mid-range values (roughly 0.2 to 0.8), suggesting that it is sensitive to bigger changes in the middle than at extremes. 

The visual setup of the data shows a table (matrix) whose rows represent weeks and columns represent indicators and the target variable (0s and 1s).  Minitab is used for the analysis.  In Minitab the binary response (target) variable is specified and regressed against the 14 predictors (indicators). Using the function f’(x) = β0 + β1 x 1 + … +  β14 x 14 , the software generates two columns of maximum likelihood estimates for the β parameters and probabilities using an iterative-reweighted least squares algorithm. As an example, consider the calculated score 85.4 for January 20, 2017, as seen in the bottom front-page table at this web site. Plugging the 14 values for that week (to name three, 11.54 for VIX, 1.436 for M2 Velocity, and -1.55 for yield spread given by TBill minus dividend yield) into f’(x) gives 1.77 to two decimals (6 decimals are actually used). This is the value along the horizontal axis in the chart at right.  The probability is mapped to the y-axis using the natural log transformation (logistic function) e1.77/(e1.77 +1) giving 0.854, a score of 85.4.

A three-dimensional surface (not shown) was generated in Excel with axes buy, sell, and total return.  The surface for the selected final model has a fairly smooth, flat top of total returns for the “optimal” range of buy/sell triggers. The buy/sell trigger combination that’s selected for the final model corresponds to a point on the surface well-embedded within the flat top, to minimize the instability associated with steep drop-offs. In other words, the final buy/sell triggers are not necessarily those that correspond to the maximum total return, although they might; rather they correspond to a total return more or less in the middle of a flat area of the highest total returns, thereby better ensuring the stability of the triggers.

Here’s a question I’ve been asked: “Your model has 4 indicator categories. Do you mind sharing the approximate weight of each category?”  This is a great question that inexplicably never occurred to me, let alone the answer.  Unfortunately, this simple question requires a not-so-simple answer regarding the "weight" of each category (technical, monetary, sentiment, fundamental).  The answer would be easy if the model were linear (it’s not) with point scores assigned to each indicator within a category; the category weights would then be the sum of indicator points within each category. This is far from the case. The model is non-linear and includes continuous as well as binary variables, with logarithms further complicating the answer. But... maybe this would help.  Of the 14 predictors, 7 are pure technical, 2 pure monetary, 0 pure sentiment, 1 pure fundamental, 1 tech/monetary, 1 monetary/fundamental, 1 monetary/sentiment, and 1 tech/sentiment.  Ignoring overlapped categories (double counting), we have 9 tech, 5 monetary, 2 sentiment, and 2 fundamental. Mixed categories cloud the picture, although we can safely say that technical indicators dominate when looking at overall presence, followed by monetary, and finally tied sentiment and fundamental.  If we consider ranking based on statistical significance for each predictor, we have tech at #1,3,8-10,13-14; monetary at #4,6; fundamental at #5, tech/monetary at #12; monetary/fundamental at #2; monetary/sentiment at #7; and tech/sentiment at #11. So, based on average ranking, we can say that fundamental leads the pack, monetary follows second, and sentiment and tech bring up the rear. Technical and sentiment indicators focus more on short to intermediate time horizons, whereas monetary and fundamental indicators are more concerned with intermediate to long time spans.  The model’s smoothing coefficients for relevant indicators emphasize intermediate to long-term averages.  In the final analysis, it's the composite score that matters relative to the buy/sell bands. 

I’ve also been asked if so many indicators (14 for the current model) represent a mathematical overfit to the data.  The answer would be no, given that the binary logistic regression used here and the great number of weeks would require about 66 indicators to represent an overfit, based on the Rule of 10.  Fourteen are used here. Did the model’s development include out-of-sample trials? No, not directly, but the year-long-look-ahead application of the model over 27 live years shows successful out-of-sample tests.  Does testing so many combinations of indicators and buy/sell triggers introduce data-snooping bias? The approach does have elements of this type of bias, although this is mitigated by choosing indicators based on financial hypotheses, by their statistical significance, by not using bulk methods, and by the applied and successful use of the model with out-of-sample data each new year.  Also, the embedded selection of the final buy/sell triggers within a flat top of total returns reduces, but does not eliminate, data snooping and overfitting, while increasing stability.

In the final analysis, the model and its triggers are validated by real-time use and performance (return and risk) since 1990.  See Reality Check and TimerTrac.

See download page for pdf files and Excel workbook that include tested time series of the S&P 500, timing model scores, buy/sell bands, switch signals, T-Bills, and dividend yields from 1970 forward.


Financial modeling is not like modeling in classical physical sciences. It's not precisely measurable and predictable. It's more like sociology, influenced by emotions, irrationalities, gullibility, the flow of hormones, noisiness, fear, greed, envy... you name it. They simplify reality yet provide useful insights of economic phenomena. Still, don’t confuse the map [model] for the territory [reality].

Harvey CORE

Fabled Quants: Renaissance Technologies


Simplicity, Patience, and Discipline

In its simplest form, a buy signal suggests that the portfolio should emphasize stocks; a sell signal shifts the emphasis to cash.  What proportions should be stocks or cash would depend on the investor’s age, net worth, propensity for risk, and other personal attributes.

Note that the timing model addresses only the stock portion of a portfolio.  An investment strategy based on the standard strategy is simple to implement. Telephone or online switches are made between money market funds and stock mutual funds or exchange traded funds (ETFs) whenever market conditions favor one or the other based on switch signals.  An ETF mimics the behavior of an index and trades like a stock within a brokerage account.  Thus, an investor who wishes to closely follow the standard strategy would position the portfolio’s stock portion in a money market fund during a sell signal and in an S&P 500 ETF such as SPY or VOO or an index mutual fund such as Vanguard 500 Index (VFINX) during a buy signal. The counterpart to the aggressive strategy is to be in a fund such as Rydex Nova (RYNVX) during buy signals and Rydex Inverse S&P 500 (RYURX) or an ETF such as SH during sell signals.

NOTE: Important advantages of ETFs over mutual funds are no restrictions on number of trades and the ability to trade at any time of the day. A disadvantage: Dividends are issued, but not reinvested; instead they flow to the core cash account.  Dividends and their reinvestment significantly add to performance over long time periods, making up about 50% of S&P 500 total return since 1926 (its lifespan) and about 30% since 1970 (model’s lifespan).

Those of you who wish to mimic the behavior of the aggressive portfolio should keep in mind that this strategy requires a high tolerance for volatility... and nerve. At a buy signal, this portfolio switches all funds into a 150% long position basis the S&P 500 Index. This would be equivalent to a mutual fund or ETF with beta 1.5 (multiplier 1.5x), or one that generates 50% greater daily gains (on the upside) and 50% greater daily losses (on the downside) than the S&P 500 Index. At a sell signal, all money is 100% short the S&P 500 (multiplier -1x or beta -1.0). Thus, if the S&P 500 were to lose 10%, this position would gain 10%. Conversely, a 10% gain in the Index translates into a 10% loss for the portfolio.  In theory the aggressive strategy should work very well; in practice, daily updates over time, the multiplier, and volatility can reduce performance over what we would expect (see this CAUTION). I wouldn't bet the bank on volatile investment strategies... and I would restrict funds to only a modest portion of my overall portfolio.

See the FAQs page for portfolio diversification and alternative standard and aggressive investments.  To generalize, a buy signal suggests that the stock portion of an actual portfolio should be invested in its favorite stock mutual funds and ETFs, based on that portfolio’s target allocation for stocks, say, 50 to 90%, depending on individual preferences.  Diversified stock investments would likely include a menu of large to medium to small stocks, stocks based on growth and value, and stocks outside the US.  Note that many stock classes are highly correlated with the S&P 500, the model’s benchmark index.  This means that a buy signal would favor most other stock categories as well.  The remainder of the portfolio would likely be invested in other asset classes, such as money markets, bonds, and commodities.  During a sell signal the emphasis should be light to nothing on stocks and heavy on money markets and perhaps bonds.

Abiding by the timing model's signals does require patience and discipline. False switchbacks aside, the timing system has an intermediate to long-term perspective, months to years, rather than days to weeks. The less we trade the better off we are with respect to the payment of expenses and taxes. Moreover, we have to control emotions when following a switch signal. Often, the model gives a buy signal at a time of high investor anxiety, as in November 1987, October 1990, September 1998, April 2003, and February 2009. And it can give a sell signal when times look okay, as it did in early October 1987 and October 2000.

A stock market index exhibits cyclicality and randomness, the former over months to years, the latter over days to weeks. There is too much randomness within short time frames to model with any accuracy; long term offers more stable outcomes (probabilities), but misses out on too many cyclical opportunities. The model takes the middle ground to judge probabilities for its trades. The timing model is tuned to cyclicality, as it anticipates changes of 8% or more in the S&P 500 Index over a minimum eight-week period, based on the closing value at the end of a week.  It leaves the smaller, riskier, choppier, random waves for the traders to try to fathom.  Declines of about 5% are common and scary, but extremely difficult to anticipate with any accuracy.  I treat these with equanimity (usually!) when they happen, letting the model tell me when to consider a switch. 

Market timing is controversial and not suitable for everyone. "Buying and holding" was the mantra based on the spectacular returns during the 1980s and 1990s… until the serious bears in 2000-2002 and 2007-2009. Few souls can hold through thick and thin, or commit new money when times are scary. Asset allocation strategies are more conservative, giving up gain for lower risk, although those who rebalance portfolios are practicing a form of market timing. And how about buying good stocks and sticking with them? How do we pick the good stocks? Do we really hang on? Academic studies and research in behavioral finance suggest that individuals buy high and sell low their individual stocks and mutual funds; yes, even during the 1974-2000 super bull market. Long-term good stock picking surely rewards the pickers and their followers. Witness Peter Lynch, George Soros, and Warren Buffett. But few of us have neither the time, the emotional makeup, nor the talent for successful stock picking... and how do we pick the good pickers? And will we ride it down with them during prolonged and severe market downturns? Few bulls come out the back end of a serious bear market.

Remember that investment strategies have a dual objective: Preserve capital during bad times and build wealth during good times. The avoidance of major losses during steep declines is far more important than capturing all gains during uptrends. Drawdowns leading to permanent losses drain wealth and victimize emotions, factors that require models to seriously consider risk.

We can think of investors as having three risk profiles: risk-averse investors who only build modest capital; risk-seeking investors who all-too-often blow up; risk-smart investors who take calculated risks on selective and timed investments based on probable outcomes. The model addresses the latter investor.

This work is as much art as science, with a good smack of luck. Any trading system is imperfect in practice. I accept the bad along with the good, as long as the good outweighs the bad. This underscores a key advantage of working with a good system: It offers an investment plan and promotes discipline, while stabilizing emotions and curtailing actions that constantly play to fear and greed. I can't guarantee future results based on past performance, but I haven't found a better way for myself.

Don't gamble; take all your savings and buy some good stock and hold it till it goes up, then sell it. If it don't go up, don't buy it.
Will Rogers


Live Market Timing Phases

The performances described are theoretical in the sense that the model's makeup is tested and revised annually to “optimize” return based on historical data. In other words, the model that’s used is developed by backtesting the data since 1970 (so-called in-sample training). For the new year, the model is real time or "live" (is applied to out-of-sample data) when it’s used for real. We can’t expect, on average, that a live model will outperform its backtested parent. And that’s indeed the case, as measured by a metric called shrinkage, the difference between a backtested model’s average return and its degraded average return when used live.  Shrinkage since 1990 is about 5% per year, as seem in Reality Check, starting with the model’s earliest implementation in full-year 1990.

In theory, there is no difference between theory and practice. In practice, there is.

Yogi Berra

Last revised 12 Feb 2017

Copyright © 2017 Richard Mojena. All rights reserved. All materials contained on this site are protected by United States copyright law and may not be reproduced, distributed, transmitted, displayed, published or broadcast without the prior written permission of Richard Mojena at You may not alter or remove any graphics, copyright or other notice from copies of the content.  You may download or print one machine readable copy and one print copy per page from this site for your personal, noncommercial use only.

Specific and personalized investment advice is not intended by this communication. Its contents are for the public record as a free public service. Information is based on the analysis of past data and assessments by the models. Future performance may not reflect past performance. Profitable trades are not guaranteed. No system or methodology ensures stock market profits. No guarantee is made regarding the reliability or accuracy of data. In other words, use this stuff at your own risk!

Front Page     Timing Model     Reality Check     FAQ     Downloads     About     Mea Culpa?