STANDARD means a published construction, ADAPTED means a known idea applied differently, and
INVENTED means this exact construction was not found elsewhere. The label describes provenance,
not quality.
days_of_cover
Days of import cover
How many days it keeps running
STANDARD
- Formula
stock ÷ average daily net imports
- Inputs
th.oil.days_coverin.oil.days_coverjp.oil.days_covercn.oil.days_cover
- Output
- read-only / multi-country
- Status
- static · days
- Provenance
- IEA emergency stockholding obligation — 90 days of NET IMPORTS for member countries. Note the denominator: the IEA uses net imports, while the oil market more often quotes days of forward DEMAND. The two give different answers for the same country and are routinely confused. This register uses net imports and says so on every reading.
< 15 · no buffer< 45 · thin< 90 · below the IEA line< 180 · adequateotherwise · deep
How long the country runs if imports stopped tomorrow. It makes reserves of wildly different absolute sizes comparable, which raw tonnes never do.
stocks_to_use
Stocks-to-use ratio
How much grain the world has spare
STANDARD
- Formula
ending stocks ÷ total annual use × 100
- Inputs
xx.food.rice_stocks_to_use
- Output
- read-only / multi-country
- Status
- static · %
- Provenance
- USDA WASDE and FAO AMIS both publish this monthly; it is the grain equivalent of days of cover and one of the oldest agricultural statistics there is.
< 20 · tight — price spikes likely< 30 · snug< 40 · comfortableotherwise · ample
Below roughly 20% grain prices stop responding to demand smoothly and start jumping. World rice is currently comfortable, which is the single best piece of news in the resource picture for a Thai household budget.
stock_to_flow
Gold stock-to-flow
Years of gold mining already above ground
STANDARD
- Formula
above-ground stock ÷ annual mine production
- Inputs
xx.gold.above_groundxx.gold.mine_supply
- Output
xx.gold.stock_to_flow
- Status
- static · years
- Provenance
- Popularised by Incrementum AG's In Gold We Trust report. NOT a World Gold Council metric — the WGC publishes the 219,891 t above-ground numerator but does not present the ratio. My first draft credited the WGC and that was wrong.
< 20 · supply can respond< 50 · slow to respondotherwise · supply is effectively fixed
About 67 years. Everything ever mined is still here, and a year of world mining adds roughly 1.5% to it. That one ratio is the entire argument for gold as a monetary asset rather than a commodity: no price rise can conjure meaningful new supply.
hhi_refining
Refining concentration (HHI)
How few countries do the processing
STANDARD
- Formula
Σ (country share)² × 10,000
- Inputs
xx.refine.galliumxx.refine.rare_earthxx.refine.graphitexx.refine.cobaltxx.refine.lithiumxx.refine.aluminiumxx.refine.copperxx.refine.nickel
- Output
- read-only / multi-country
- Status
- static · index 0–10,000
- Provenance
- USGS (Thomas, Nassar & DeYoung 2022) and the EU Critical Raw Materials methodology. NOT an IEA metric — the IEA publishes a plain top-three share (82% in 2020 rising to 86% in 2024) and uses reverse-HHI only for power-generation fuel mix. I had this attributed to the IEA and it was corrected.
< 1500 · competitive< 2500 · moderately concentrated< 5000 · highly concentratedotherwise · single-country control
Reserves are spread around the world; the furnaces that turn ore into usable material are not. A country that mines something it cannot process does not control it.
Limit: Computed from China's share alone with the remainder assumed to split evenly, because that is the only share published consistently for all eight minerals. Real residual shares are lumpier, so this understates concentration.
gold_oil_ratio
Gold/oil ratio
Barrels of oil one ounce of gold buys
STANDARD
- Formula
gold USD/oz ÷ Brent USD/bbl
- Inputs
xx.commodity.goldxx.commodity.brent
- Output
xx.ratio.gold_oil
- Status
- live · barrels per ounce
- Provenance
- A market convention of very long standing with no institutional publisher — no central bank or agency computes it, but every commodity desk watches it.
< 15 · oil expensive vs gold< 30 · historically normal< 50 · gold expensive vs oilotherwise · extreme — usually a crisis print
The cleanest way to separate a monetary story from an energy story. If both gold and oil are rising but the ratio is flat, that is money losing value. If the ratio is falling, it is a genuine energy supply problem.
net_liquidity
US net dollar liquidity
Cash the Fed is leaving in the system
STANDARD
- Formula
WALCL − Treasury General Account − overnight reverse repo
- Inputs
us.fed.walclus.fed.tgaus.fed.rrp
- Output
net_usd_liquidity
- Status
- live · USD tn
- Provenance
- A MARKET CONVENTION, not a Fed publication. The Fed publishes WALCL, WTREGEN and RRPONTSYD separately and does not endorse the subtraction. The originator of the construction could not be verified; it is in wide use without a clear first author.
< 0 · drainingotherwise · adding
The single best-known proxy for whether money is being added to or drained from markets, read as a 13-week change rather than a level.
Limit: Widely followed enough that its predictive power is partly arbitraged away.
term_spread
2s10s term spread
Whether the bond market expects trouble
STANDARD
- Formula
10-year Treasury yield − 2-year Treasury yield
- Inputs
us.rates.10yus.rates.2y
- Output
us.rates.2s10s
- Status
- live · pp
- Provenance
- Estrella & Mishkin (1996); published continuously by the New York Fed as a recession probability model.
< 0 · inverted< 0.5 · flatotherwise · positive
Inversion has preceded most US recessions, with a long and variable lag.
real_yield
US 10-year real yield
The return on cash after inflation
STANDARD
- Formula
10-year TIPS yield
- Inputs
us.rates.10y_real
- Output
- read-only / multi-country
- Status
- live · %
- Provenance
- US Treasury TIPS constant-maturity series, published daily (FRED DFII10).
< 0 · negative — everything else looks attractive< 1.5 · mild< 2.5 · restrictiveotherwise · punishing for long-duration assets
The hurdle rate for every other asset on earth, and the single biggest driver of the gold price after the dollar.
cover_gap_90
Cover gap vs the 90-day line
Days above or below the international standard
ADAPTED
- Formula
days of cover − 90
- Inputs
th.oil.days_coverin.oil.days_coverjp.oil.days_covercn.oil.days_cover
- Output
th.oil.cover_gap
- Status
- static · days
- Provenance
- The 90-day obligation is the IEA's. The subtraction is not novel. Renamed from 'Reserve Adequacy Spread' because that collided with the IMF's established Assessing Reserve Adequacy (ARA) metric, which is about FX reserves and is a different thing. Also note ARA and months-of-import-cover are two distinct metrics and must not be conflated — an error I nearly shipped.
< -60 · critically short< 0 · short of the standard< 60 · compliantotherwise · well provisioned
One signed number per country, comparable across countries that report differently.
official_absorption
Official absorption of mine supply
Share of new gold that central banks take
ADAPTED
- Formula
central-bank net purchases ÷ annual mine supply × 100
- Inputs
xx.gold.cb_purchasesxx.gold.mine_supply
- Output
xx.gold.official_absorption
- Status
- static · %
- Provenance
- Derived from World Gold Council data, not a WGC-published series. The WGC frames central-bank demand against TOTAL demand; this uses mine supply as the denominator, which is the harder test and the more interesting one.
< 10 · central banks are marginal< 20 · meaningful official bidotherwise · official buying sets the price
Above roughly 20%, official institutions rather than jewellers or investors are setting the marginal gold price — and central banks are famously price-insensitive buyers.
oil_beta_th
SET–Brent rolling correlation
How much Thai stocks follow the oil price
ADAPTED
- Formula
rolling 260-observation Pearson correlation of Δ%SET and Δ%Brent
- Inputs
th.equity.setxx.commodity.brent
- Output
th.oil_beta
- Status
- live · correlation −1…+1
- Provenance
- LSEG/FTSE Russell already publishes rolling oil betas for APAC equity markets including Thailand, so the idea is not new — I had this labelled INVENTED and the check overturned it. What is mine is the construction: a 12-month rolling Pearson correlation of daily PERCENTAGE CHANGES (not levels, which would be spurious), computed inside the pipeline so it updates with everything else.
< -0.2 · SET is an oil hedge< 0.2 · no relationshipotherwise · SET moves with oil
Thailand imports oil, so intuition says the SET should fall when oil rises. In practice the index is heavy in PTT and energy-linked names, so the relationship is often the opposite of the intuition. This measures which one is true right now.
endowment_score
Resource endowment score
How well supplied a country is, 0–100
ADAPTED
- Formula
mean of min-max normalised (arable land per person, inverse fuel import share, days of cover)
- Inputs
th.land.arable_pcth.energy.import_shareth.oil.days_cover
- Output
- read-only / multi-country
- Status
- live · score 0–100
- Provenance
- SolAbility's GSCI Natural Capital Index is a published normalised 0–100 resource composite and is the structural precursor; the World Bank's Changing Wealth of Nations is the monetary one. Downgraded from INVENTED after the check found both. Mine is narrower: min-max across the ten mandate countries on inputs already in the registry.
< 30 · dependent< 60 · mixedotherwise · well endowed
A slow structural ranking, not a market signal. It moves once a year at most.
Limit: Deliberately crude — three inputs, equal weights. Treat as a ranking, not a measurement.
stock_bond_correlation
US stock–bond return correlation
Whether bonds are diversifying shares
INVENTED
- Formula
60-observation Pearson correlation of daily S&P 500 returns and a DGS10 bond proxy, where bond r ≈ −7 × Δyield + yield ÷ 252
- Inputs
us.equity.spxus.rates.10y
- Output
us.corr.stock_bond
- Status
- live · correlation −1…+1
- Provenance
- No publisher prints this exact series. The equity leg is the S&P 500. The bond leg is a duration-7 total-return proxy reconstructed from the Federal Reserve's DGS10 yield, because a yield level is not a bond return. The approximation is standard fixed-income arithmetic; combining that proxy with a rolling correlation here is this project's construction.
< -0.2 · bonds diversify equities< 0.2 · relationship unstable< 0.5 · diversification weakenedotherwise · stocks and bonds falling together
Negative means bonds have tended to rise when shares fell. Positive means the two have moved together, so a conventional stock–bond portfolio is carrying less diversification than its labels imply.
Limit: The bond leg is an approximation with duration fixed at 7; it omits convexity, coupon timing and changes in the cheapest-to-deliver bond. Read the direction and regime, not the second decimal place.
bibi
Baht Import Burden Index
What the world costs, in baht
INVENTED
- Formula
(0.60 × energy index + 0.40 × food index) × (USDTHB ÷ 35.3), base 2016 = 100
- Inputs
xx.index.energyxx.index.foodth.fx.usdthb
- Output
th.import_burden
- Status
- live · index 2016 = 100
- Provenance
- No published equivalent found. The nearest cousin is the IMF's Commodity Terms of Trade index (PCTOT, IMF WP/19/21), but PCTOT is deflated to real USD and weighted by NET exports; this is import-only and denominated in the local currency, which is what makes it read like a household's experience rather than a country's trade account.
< 90 · cheap world< 110 · normal< 140 · expensiveotherwise · squeeze
Dollar commodity indices understate what a Thai household pays, because the baht usually weakens in the same move that lifts oil. This multiplies the two so the compounding is visible in one line.
ptp
Physical Tightness Premium
Is it expensive because it is scarce?
INVENTED
- Formula
z(price, 5y) − z(inventory, 5y)
- Inputs
xx.commodity.wtius.oil.commercial
- Output
- read-only / multi-country
- Status
- planned · z difference
- Provenance
- No published equivalent as a z-score construction. The canonical precursor is the theory of storage / convenience yield (Kaldor 1939, Working 1949, Brennan 1958), which reaches the same conclusion through the futures curve rather than through inventories directly.
< -1 · well supplied< 1 · balanced< 2 · tightotherwise · genuinely scarce
High price with full warehouses is a positioning or tariff story and tends to reverse. High price with empty warehouses is real scarcity and tends to persist. The subtraction is what separates them.
Limit: Needs EIA_API_KEY for the weekly inventory series. The annual static inventory figures cannot be z-scored — five observations is not a distribution.
cags
Chokepoint-Adjusted Growth Signal
Copper's growth message, discounted for distortion
INVENTED
- Formula
z(copper, 5y) × d, where d = 1 − min(1, |COMEX÷LME − 1| ÷ 2)
- Inputs
xx.commodity.copperxx.metals.comex_lme_copper
- Output
xx.growth.cags
- Status
- live · adjusted z
- Provenance
- No published equivalent. Copper as a growth proxy is ancient; exchange-inventory divergence as a distortion measure is well known to metals desks; multiplying one by a confidence factor derived from the other is the part I have not seen done.
< -1 · demand contracting< -0.25 · cooling< 0.25 · flatotherwise · expanding
At the current 1.85x COMEX/LME ratio the discount factor is 0.575 — copper's growth signal is being marked down by 42.5% because a large part of the price is a border, not a factory.
th_squeeze
Thai Squeeze Index
Cost-of-living pressure at home
INVENTED
- Formula
composite of z-scores, weights food 35 / transport fuel 25 / electricity 25 / borrowing 15, every price converted to THB first, scored −100 (pressure) … +100 (relief)
- Inputs
xx.index.foodxx.commodity.brentxx.commodity.lng_asiath.policy_rateth.fx.usdthb
- Output
th.squeeze
- Status
- live · score −100…+100
- Provenance
- No published equivalent. Central banks compute cost-of-living and financial-conditions indices, but not one that converts world commodity prices into local currency first and weights them by the domestic CPI basket for a single household.
< -40 · heavy pressure< -10 · pressure< 10 · neutral< 40 · reliefotherwise · strong relief
The four things that actually move a Thai household's monthly outgoings, in one number, measured in the currency it is paid in. Negative means pressure.
esp
Energy Shock Pass-Through
How much of an oil shock lands here
INVENTED
- Formula
(fuel imports as % of merchandise imports ÷ 100) × Δ% energy price index
- Inputs
th.energy.import_sharexx.index.energy
- Output
th.energy.passthrough
- Status
- live · % of import bill
- Provenance
- No published equivalent found. The inputs are entirely standard — World Bank TM.VAL.FUEL.ZS.UN and the IMF energy price index — but multiplying a structural import share by a live price change to get a country-specific shock intensity is not a published construction.
< -1 · windfall< 1 · immaterial< 3 · a real hitotherwise · macro-significant
A 20% oil move does not mean the same thing in Singapore, Thailand and Malaysia. This scales the world shock by how exposed each country's import bill actually is, which is the number that eventually shows up in the current account and then in the currency.
gold_thb
Gold in baht
What your gold is actually worth
STANDARD
- Formula
gold USD/oz × USDTHB
- Inputs
xx.commodity.goldth.fx.usdthb
- Output
th.gold.thb
- Status
- live · THB/oz
- Provenance
- Arithmetic, not an invention — every Thai gold shop quotes it. It is in this register because it is the single most under-appreciated line for a baht-based investor, not because it is clever.
otherwise · level — read the change, not the level
Your return on gold is the PRODUCT of the metal and the currency. Gold in baht can rise while gold in dollars falls, and vice versa — and the financial press only ever reports the dollar one.
ai_credit_tail
AI credit tail stress (CCC − HY)
What lenders charge the weakest borrowers
ADAPTED
- Formula
CCC & lower OAS − HY index OAS, in percentage points
- Inputs
us.credit.ccc_oasus.credit.hy_oas
- Output
us.credit.quality_spread
- Status
- live · pp
- Provenance
- Adapted from the AI Bubble Early-Warning framework's indicator 8 (AI infrastructure credit stress), which specifies bond/CDS spreads widening 25-50bp as Amber and >100bp as Red. Changed in one decisive way: the framework does not say WHICH spread, and the obvious choice — the high-yield index — is the wrong one. On 2026-07-23 HY OAS was 2.77%, historically tight and unambiguously green on a widening test, while CCC-and-lower was 9.91%. Data-centre SPV and neocloud paper sits in that tail, not in the index. Tracking the GAP catches lenders repricing the weak borrowers while the headline stays calm — the precise failure the framework wants caught, which its own metric would have missed.
< 5 · tail is fine< 6.5 · normal dispersion< 7.5 · lenders backing away from the weak endotherwise · tail is shut out
Credit usually breaks before equity does, and it breaks at the bottom first. This is the extra yield demanded from the worst-rated borrowers over the high-yield market as a whole. It widens when lenders start declining the weakest deals — which is where the AI build-out's marginal financing actually happens — even while the index looks calm.
Limit: Three years of history and no recession in it, so 'a three-year high' is a weaker claimthan it sounds — the series has never been observed through a downturn. The level is less informative than the 3-month change, which is the framework's own guidance. And this is NOT an AI-specific instrument: a widening driven by energy or retail defaults would move it without saying anything about data centres. It is the closest free proxy, not a measurement. Confirm any signal here against issuer-level pricing — Oracle's CDS and neocloud paper — before treating it as an AI-credit event.
ai_bubble_score
AI bubble composite risk score
How stretched the AI build-out looks
ADAPTED
- Formula
Σ(category score × weight) ÷ Σ(weight of SCORED categories only) ÷ 2, as a percentage. Unscorable categories are excluded from both sums rather than counted as Green.
- Inputs
us.credit.quality_spreadus.equity.soxus.semi.ipai.capex.hyperscaler
- Output
- read-only / multi-country
- Status
- planned · % of maximum risk score
- Provenance
- Implements the composite in section 5 of the AI Bubble Early-Warning framework — ten categories, Green 0 / Amber 1 / Red 2, five weighted ×2 and five ×1. Two corrections were needed before it could be used. FIRST, the bands do not fit the scale: max score is 30 (15 weight × 2), but the document's top band starts at 14, so a portfolio scoring Amber on every single category — a uniform 15 — lands in the highest risk band while no category is Red. That cannot be intended. Bands here are expressed as a PERCENTAGE of the maximum attainable, which also keeps them meaningful when categories are unscorable. SECOND, section 1 lists only three bands (0-5, 6-9, 10-13) and section 5 adds a fourth (14+); the four-band version is used.
< 20 · expansion supported< 35 · speculative excess building< 50 · pre-burst conditions emergingotherwise · broad deterioration
A deliberately crude tally across independent parts of the system, because the framework's central claim is that no single metric calls this — four unrelated things deteriorating together is the signal. Denominating in percent-of-maximum means a score built from four scorable categories is comparable to one built from ten, instead of silently reading low because six were missing.
Limit: MOSTLY NOT LIVE, and that is the honest state, not a defect to be papered over. Of the framework's ten categories, one (credit) computes daily from free data, two (semis equity, chip output) are proxies for capacity rather than measurements of it, and one (capex) is hand-entered guidance. The six that carry the most information — capex vs AI revenue, capex ÷ operating cash flow, cloud gross margin, depreciation vs gross profit, enterprise renewals, backlog conversion — all come from quarterly filings and none is wired. Treat this as a scaffold with one working leg. See docs/AI_BUBBLE.md.