Portfolio Design

Advanced concepts in stock investment portfolio design.  Fundamentals, technical analysis and many other related topics are discussed.

Business Cycle Contraction Indicator

I have completed the design of the contraction indicator, the second of four indicators required for this business cycle model.  Yesterday it was three indicators, recovery, expansion, and contraction. But I have now decided to split the expansion phase into mid and late expansion, the way it was originally supposed to be before I simplified it.

Stock market analysis tools provided by Portfolio123.


It turns out that the struggles from designing the first (recovery) indicator have been worth it, and the second indicator (contraction) was pretty easy to design by reusing and modifying what was already there. I have decided to only show the reader the top level design from now on without getting into the formula details.

If you have been following along then you are up to speed and shouldn't have problems creating your own version of formulas. If not, then please go back to square 1 with Market Timer: Business Cycle Approach and start there. If you really get stuck then don't hesitate to contact me, either via Portfolio123 or using the contact form on this site. But try to do this by yourself first.

Below is a screenshot of my library of signals. I now have four economic and six (company) fundamental aggregate-based signals. I haven't touched any technical indicators yet, that will come later.

Library of economic and fundamental binary indicators

My recovery indicator consists of the six signals shown below, three banking and three company-related signals. The six signals form a vote and 90% or more  (at least 5 of 6) signals the business cycle recovery state.  I covered these signals in the last post Recovery Indicator Is Complete. I have renamed some of them but the functionality remains the same.

Composition of the Recovery Indicator

My contraction indicator consists of the six signals shown below, rising unemployment, declining Fed Funds Rate, declining bank prime, slowing sales growth, declining earnings, and declining inventory. The six signals form a vote and 90% signals the business cycle contraction state.  

Composition of the Contraction Indicator

The Contraction_OK node has to be set up for this indicator. The formula is shown below.  This node is designed so that it won't be TRUE if the Recovery_OK node is also TRUE. i.e. there won't be an overlap between the two and Recovery_OK takes precedent. Note that the Contraction_OK node has to be located below the Recovery_OK node.

Contraction_OK voting threshold and setting Recovery as a higher priority

In order to test the Contraction_OK node, the Recovery_OK node is dummied out by placing " & FALSE " at the end of the formula. When testing of Contraction_OK is complete, then remove the " & FALSE ", and both the Recovery_OK and Contraction_OF will both be functional.

Deassertion of Recovery_OK while testing Contraction_OK


My Contraction only, and Contraction plus Recovery simulations are shown below. Note that there are no glitches in the asserted signals, they should be solid. Try playing with the voting thresholds, and performing minor variations on the signals to see how these indicators degrade.

Business cycle contraction indicator simulation backtest

Contraction plus Recovery indicators tested together

If all goes well, I should have the remaining two indicators completed then.

Good night and good luck with your design!