OPEN-SOURCE SCRIPT

OECD CLI Diffusion Index

Updated
What does the indicator measure?
This is a macro indicator. It uses OECD's composite leading indicator - see details about the CLI below.
What it does it calculate YoY changes for CLI of 38 countries that are members or are associated with the OECD. Then it measures a percent of countries which CLI is rising.

How this can be used?
The positive slope of the curve means that there probably will be an economic growth among those countries within next 6 - 9 months. The negative slope means there probably will be an economic contraction.
Forward-looking economic growth is correlated with positive S&P 500 YoY growth (equity markets are also forward looking). The chart above presents the CLI diffusion index with overlayed S&P500 YoY rate of change.

The CLI is also correlated with ISM PMI - see example below:
snapshot


What is a CLI?
"The OECD system of Composite Leading Indicators (CLIs) is designed to provide early signals of turning points in business cycles - fluctuation in the output gap, i.e. fluctuation of the economic activity around its long term potential level. This approach, focusing on turning points (peaks and troughs), results in CLIs that provide qualitative rather than quantitative information on short-term economic movements."
Release Notes
Another reason to look at CLI Diffusion Index is its relationship with the volatility. Table below presents the distribition of VIX spikes over 35 among ten buckets of the index - where first bucket consists of index values of 0%-10% and the last one 90%-100%.

snapshot

Additional idea on how to use the index is to look at securities that the most sensitive to economic changes. Below are YoY rate of changes of Russell 2000 and Copper futures.
snapshot
snapshot
Release Notes
I changed how CLI data is pulled - instead of using data.nasdaq.com (which does not store the data anymore) - the code uses TW data.
However, additional change comes from OECD. They previously published data for all OECD members and some associated countries. Now it is limited only to G20 countries (TW allows us to get only 16 coutries). Go to OECD's website to get more details on that.
Release Notes
Just minor code cleaning.
businesscycleCyclesmacrooecd

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer