OPEN-SOURCE SCRIPT
Updated

comm_idx

821
This script displays information about the components of the Goldman Sachs Commodity Index. The index is based on futures contracts in the categories of agricultural products, softs commodities, livestock, energies, industrial metals, and precious metals. The statistics displayed in the table are:

change: 1-day % change
from ma: the % change from a moving average
corr idx: correlation of the contract to the GSCI

The lengths for the moving average and correlation statistic can be set using the inputs.

See the script source for the symbols used for each commodity. Although most of the symbols correspond to the actual futures contract used to compute the index, LME contracts are not available on tradingview. Hence, corresponding HKEX contracts are used for the industrial metals.
Release Notes
cosmetic fix
Release Notes
accidentally missed rbob gasoline -- added

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.