You do not get to point a borrowed instrument at a dataset until you have measured the dataset’s noise floor. Priced in bits against last year’s export basket, the four largest apparent shocks in the HS6 panel that this entire site computes on are all HS nomenclature revision years. They vanish the moment you aggregate to chapters.
Instrument
Kullback-Leibler surprisal against a Jelinek-Mercer interpolated backoff codebook
Borrowed from
Information theory and language modelling
Concede the framing first, because it is the correct objection and nothing here depends on winning it. What follows is a Kullback-Leibler divergence between two consecutive share vectors, smoothed toward a world backoff. That is a structural-change index, and structural-change indices are decades old. The language-model dress buys exactly one thing, and this page claims nothing more for it: a unit. Bits per unit of export value is the unit in which the comparison across classification grains is legible, which is the only comparison the page is actually making.
The deliverable is not the metric. It is the audit result. This is a quantified defect in TradeWeave’s own core table, country_year_product, found by a measure computed on that table, and it changes how the other experiments in this section have to be computed. It is why the anti-product space runs at HS4 and why Savings runs on a balanced code core rather than the raw HS6 panel.
The instrument
Treat a country’s export basket as a distribution over HS codes and last year’s basket as a language model of it. For country c in year t, let p be this year’s share vector over codes and q last year’s. Interpolate the codebook with the world share vector w at weight λ, the Jelinek-Mercer backoff that keeps a code the country did not ship last year from costing infinite bits: q̂ = (1 − λ)·q + λ·w. The reading is the surprisal of this year’s basket under that codebook, D(p ‖ q̂) = Σ p·log₂(p / q̂), in bits. High means the basket said something the codebook did not expect.
Headline configuration, held fixed everywhere below unless a figure says otherwise: value shares, λ = 0.02, median across every country exporting at least $5bn in the year, the two BACI reporter-code changes (Belgium 1999 and Sudan 2012) suppressed, 29 readings for 1996 through 2024. 1995 is the first codebook year and carries no reading. Six of the 29 years are HS revision years: 1996, 2002, 2007, 2012, 2017 and 2022. Product codes are zero-padded strings throughout and BACI values, which arrive in thousands of USD, are converted to plain USD before the size floor is applied.
HS6 seam ratio1.52–2.10revision vs non-revision years
HS2 seam ratio0.996–1.074the seam is gone
2017, one HS6 line59.2%854211, integrated circuits
r, HS6 vs revision dummy0.700HS2: 0.038
The finding
At HS6 the four highest-surprisal years of the 29 are 2017, 2012, 2007 and 2022, in that order, and all four are HS revision years. The remaining two revision years in the panel rank 7th (1996) and 22nd (2002), so the claim is about the top of the ranking, not about revision years in general. The 2009 financial crisis, which is the event a trade economist would expect to top a structural-change index computed on export baskets, is fifth. Truncate the same baskets to two-digit chapters, change nothing else, and the ordering reorganises itself around events: 2022 first, 2009 second, 2021 third, 2023 fourth. 2007 falls to 20th, 2012 to 10th and 2017 to 13th of 29.
Figure 1
The same 29 years, priced at two grains
HS6, 5,000-odd six-digit lines. Revision years flagged.
Figure 2
Every year, both grains, ranked, with the two overlays that failed
Year
HS6 bits
HS6 rank
HS2 bits
HS2 rank
HS6 tonnage rank
Crisis share
US tariff actions
Flag
1996
0.15247
7
0.02296
18
14
6.7%
0
HS revision
1997
0.14817
9
0.02278
19
12
14.1%
0
1998
0.15168
8
0.02590
12
9
22.7%
0
1999
0.13587
14
0.02146
23
3
7.7%
0
2000
0.12730
20
0.02405
15
1
2.9%
0
2001
0.11076
28
0.01647
29
20
4.3%
0
2002
0.12020
22
0.01786
28
24
5.6%
0
HS revision
2003
0.11110
26
0.01835
27
7
1.4%
How large, and by how much do two defensible specifications disagree
There is no single number here, and publishing one would be a choice dressed as a measurement. Taking the median across countries treats Bangladesh and Germany alike; weighting by export value treats the panel as one world basket. Both are defensible and they disagree by 38 percent on the HS6 magnitude. Both are below.
Figure 3
Revision-year surprisal divided by non-revision-year surprisal, three grains, three specifications
Which lines make the seam
A structural-change index that goes up in a year is a claim about nothing in particular. This one decomposes additively: the year total is a sum of per-product terms p·log₂(p / q̂), so the question of what a spike is made of has an exact answer rather than an interpretation.
Figure 4
The three largest contributing HS6 lines in each of the four highest years
Figure 5
Top six lines per year, with the cancellation exposed
Year
HS6
Line
Bits
Share of net
Year net
Positive
Negative
2007
844390
Printing machinery: parts thereof
0.02585
0.148
0.17507
0.22225
-0.04718
844350
Printing machinery: of a type n.e.s. in heading no. 8443
0.01577
0.090
851730
Line telephony or telegraphy apparatus: telephonic or telegraphic switching apparatus
0.01547
0.088
852530
Television cameras
0.00996
0.057
854219
Electronic circuits: monolithic integrated, other than digital
0.00720
0.041
851790
Line telephony or telegraphy apparatus: electrical, parts of the apparatus of heading no. 8517
0.00579
0.033
2012
851782
Telegraphic apparatus: n.e.s. in heading no. 8517
0.06905
0.322
0.21427
0.25007
-0.03580
854219
Electronic circuits: monolithic integrated, other than digital
0.02325
0.109
Price or quantity
A divergence between value-share vectors cannot separate a change in what a country ships from a change in what it is paid. The control is to run the identical estimator on tonnage shares, and it is run before publication rather than promised for later, because export_qty is present and non-null in country_year_product. The control does its intended job and it also refuses to corroborate the headline, which is reported here rather than omitted.
Figure 6
Value shares against tonnage shares, HS6, same estimator
The classification seam is overwhelmingly a value-reallocation phenomenon. On tonnage it mostly disappears. The HS6 tonnage ratio is 1.106 against 1.516 on value, so the defensible range across specifications is 1.106 to 1.516. On tonnage the top three years become 2000, 2010 and 1999, none of them revision years, and 2017 falls to 4th with 2012 at 10th. The control does do the job it was built for: HS2’s first-place 2022 finish on value shares drops to 7th on tonnage, confirming that the 2022 chapter-grain peak is largely an energy-price effect and not a change in what is shipped.
The two free parameters
Two choices in this estimator are not forced by the data: the backoff weight λ, and the export size floor that decides which countries enter the median. Both get a figure. The site’s contract is that no modeled number appears unless the sweep over its free choice appears as a figure, not as an appendix and not as a sentence.
Figure 7
Sweep over the backoff weight λ
Figure 8
Sweep over the export size floor
The other hazard, and why it does not matter here
BACI resolves reporter codes by era, so an ISO3 aggregate can change composition mid panel: Belgium is reported inside Belgium-Luxembourg through 1998 and alone from 1999, and Sudan loses South Sudan in 2012. A year-over-year divergence measure should be expected to read that as a basket change. The suspicion was that this manufactures the spikes. Measured, it does not.
Figure 9
Reporter-code changes, as published against a composition-consistent entity
Entity
Composition
1996
1997
1998
1999
2000
2001
2002
BEL
Belgium, as published
0.07409
0.06118
0.05616
0.07514
0.07234
0.06450
0.07800
BLX
Belgium + Luxembourg
0.07409
0.06118
0.05616
0.06361
0.06933
0.06258
0.07401
Entity
Composition
2009
2010
2011
2012
2013
2014
2015
SDN
Sudan, as published
0.11667
1.04686
0.23500
1.55391
0.35857
0.47517
0.50212
SDNU
Sudan + South Sudan
0.11667
1.04686
0.23500
1.30468
0.35011
0.29375
0.33299
The hazard is real at the country level and immaterial at the aggregate. Belgium 1999 reads 0.07514 bits as this site aggregates ISO3 against 0.06361 for the Belgium-plus-Luxembourg entity that does not change composition, an effect of about 18 percent on a year that is not even a local maximum: Belgium 2002, with no code change at all, reads higher at 0.07800. Sudan 2012 reads 1.55391 against 1.30468 for Sudan plus South Sudan, so roughly 16 percent of an enormous reading is composition and the rest is a basket that genuinely churns: Sudan 2010, no code change, already reads 1.04686. Suppressing both observations changes the year-level result by exactly zero, HS6 median ratio 1.516 with them in and 1.516 with them out, value-weighted 2.100 either way.
What this page got wrong before it was computed
The design note for this experiment carried six specific claims that the computation did not reproduce. They are listed because a section that quietly corrects its own drafts is not running experiments, and because the shape of the finding came out stronger than the draft claimed while four of its digits came out wrong.
The levels. The draft had a revision-year median of 0.25384 bits and a non-revision median of 0.17492, ratio 1.451. At exactly the stated configuration the values are 0.19836 and 0.13082, ratio 1.516. The draft’s levels sit closest to a $1bn floor, so its country set was probably not the one its text described. Six country-year cells were re-derived in pure numpy from the raw parquet and match this pipeline to 4e-16.
The rank claim, which was wrong in the page’s favour. The draft said 2007, 2012 and 2017 rank first, second and fifth of 29. The actual ranks are 2017 = 1, 2012 = 2, 2007 = 3, with 2022 taking the fourth slot, so the top four of 29 are all HS revision years and the financial crisis is fifth.
The Asian crisis is not recovered. The draft claimed that at HS2 the top years become 2009, 1998, 1996 and 2000, the global financial crisis and the Asian crisis recovered with no event dummies. At the $5bn floor the draft itself specified, the HS2 top four are 2022, 2009, 2021 and 2023 and the ratio is 0.996, not 0.929. The Asian-crisis ordering appears only with the size floor removed. The seam-disappears result survives cleanly; that particular flourish does not, and it is deleted rather than softened.
2022 is not a classification seam. It is fourth at HS6 and first at HS2, and folding it into the revision story would have been the lazy reading. The decomposition says its largest HS6 contributor is the COVID-vaccine line at 29.1% and its energy lines sum to 41.9%. This page carries three seam years, not four.
The reporter-code changes do not manufacture the spike. The draft asserted they do. Measured, they move two country-year cells by 16 to 18 percent and move the year aggregate by zero.
The two aggregations disagree by more than anticipated. 1.516 under the median, 2.100 under value weighting. Quoting only the second would have been cherry-picking, so the page quotes the range everywhere.
What this constrains
The result is a constraint on every other analysis this site computes on country_year_product, and it is worth stating in the imperative because that is how it is being used. Any HS6 year-over-year change measure that straddles 2002, 2007, 2012, 2017 or 2022 is contaminated at the classification boundary and must either aggregate to HS4 or HS2, or exclude those transitions, or restrict to a balanced set of codes that survives the revision. A measure that does none of those three is measuring the World Customs Organization.
Panel diagnostics, for anyone checking that the estimator is not doing something silly: the share of a country’s export value that falls on HS6 lines with zero world trade in the previous year, and is therefore dropped as infinite surprisal and renormalised, has a median of essentially zero, a 99th percentile of 0.00034 and a maximum of 0.00321. It is never material. No surprisal value anywhere in the panel or the year table is negative, as a Kullback-Leibler divergence should not be.
The strongest objection to this page
The predictive-coding framing is decoration. Kullback-Leibler divergence between consecutive share vectors is a structural-change index that has existed for decades, wearing a language-model hat. Calling last year’s basket a codebook and this year’s reading a surprisal adds a unit and a vocabulary, and adds no identification, no null, and no inferential content that the same divergence did not already have.
And Kullback-Leibler on value shares cannot separate price from quantity. A commodity exporter’s 2022 reading may be entirely the oil price, in which case the instrument is measuring a terms-of-trade movement and reporting it as a change in what the country makes.
The framing objection is correct and this page concedes it in the lede rather than defending it. The measure is a Kullback-Leibler structural-change index, it is named as one, and the unit of bits is kept for one reason only: it is the unit in which the comparison across HS6, HS4 and HS2 is legible. Nothing here rests on the language-model metaphor. What the page delivers is not the metric but the audit result, which is the strongest kind of finding a platform can publish about itself: a quantified defect in its own core table, found by a measure computed on that table, that changes how the other four experiments in this section have to be computed. Whether that defect is discovered with a codebook or with a Bray-Curtis dissimilarity is immaterial to the constraint it imposes.
The price-versus-quantity objection is closed before publication rather than acknowledged after it, and the closing run is Figure 6. export_qty is present and non-null in country_year_product, so the identical estimator runs on tonnage shares and ships beside the value-share series. It vindicates the objection where the objection is right: HS2’s first-place 2022 finish on value shares falls to 7th of 29 on tonnage, which is exactly the claim that a commodity exporter’s 2022 value reading is largely the energy price. It also refuses to corroborate the headline, which is reported at full strength above: on tonnage the HS6 seam ratio is only 1.106 against 1.516 on value, and 2017 falls to 4th. The classification seam is a value-reallocation phenomenon. That is a weaker claim than the one the draft wanted, and it is the one the data supports.
One further honesty point, since it is the kind of thing that is usually left in a notebook. The replication that produced this page gives an HS6 seam ratio of 1.516 on the median-across-countries specification where the original working estimate was 2.15 on a value-weighted one, and the value-weighted specification here reads 2.100. The direction and the HS2 collapse are robust across 48 parameter cells. The multiplier is not. Both specifications are published, and the page quotes the range rather than choosing.
Evidence classes on this page. MEASURED the panel’s structural facts: 29 surprisal years, 6 of them HS revision years, 65 to 128 countries clearing the size floor, the dropped-mass diagnostics, the US tariff action counts, and the GMD coverage fractions. MODELED every surprisal value, ratio, rank and decomposition share, all of which depend on the backoff weight λ and the export size floor; both sweeps are published as Figures 7 and 8. EXPLORATORY the single bordered block above, which is the only interpretive claim on the page.
HS2, 97 chapters. Same countries, same years, same estimator.
At HS6 the three tallest points in thirty years of world trade are the three HS revisions that restructured electronics headings. 2017 reads 0.23017 bits against a non-revision median of 0.13082. At HS2 the same countries, the same years and the same estimator produce a series whose peaks are 2022 and 2009, and whose revision years sit inside the band. Note the vertical scales: HS2 surprisal is roughly a sixth of HS6 surprisal, because most of what HS6 records as a basket change is reallocation inside a chapter.
Headline configuration: value shares, λ = 0.02, median across countries exporting ≥ $5bn in the year, reporter-code observations suppressed. Dashed vertical rules and filled markers are the six HS revision years (1996, 2002, 2007, 2012, 2017, 2022). A revision year is flagged because the WCO nomenclature changed that January, not because an economic event is claimed for it. Every value here is MODELED: λ is a free choice and its sweep is Figure 7.
CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), data/parquet/country_year_product/ (export_value in thousands of USD, export_qty in metric tonnes); series from data/parquet/instruments_substrate_events.parquet (columns hs6_bits, hs2_bits, is_revision_year). Vintage: CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), 1995-2024.Query
SELECT year, hs6_bits, hs6_rank, hs2_bits, hs2_rank,
hs6_qty_bits, hs6_qty_rank, hs2_qty_rank,
n_gmd_matched, share_any, gmd_coverage, crisis_reported,
n_us_tariff_actions, is_revision_year
FROM read_parquet('data/parquet/instruments_substrate_events.parquet')
ORDER BY year
0
2004
0.12749
19
0.02030
25
13
0.0%
0
2005
0.11318
24
0.02304
17
29
1.2%
0
2006
0.11109
27
0.02133
24
27
0.0%
0
2007
0.21720
3
0.02253
20
5
2.1%
0
HS revision
2008
0.13443
15
0.03038
9
18
25.5%
0
2009
0.17200
5
0.03561
2
6
5.2%
0
2010
0.15712
6
0.03249
6
2
2.0%
0
2011
0.13163
16
0.02456
14
11
0.9%
0
2012
0.22475
2
0.02936
10
10
3.7%
0
HS revision
2013
0.13069
18
0.02643
11
8
3.7%
0
2014
0.13907
11
0.02346
16
15
4.6%
0
2015
0.13625
13
0.03050
8
22
9.3%
0
2016
0.11702
23
0.02247
21
19
3.8%
0
2017
0.23017
1
0.02492
13
4
0.9%
0
HS revision
2018
0.11060
29
0.02199
22
28
not reported
4
2019
0.11179
25
0.01951
26
25
not reported
2
2020
0.14017
10
0.03362
5
23
not reported
1
2021
0.13740
12
0.03411
3
17
not reported
0
2022
0.17951
4
0.04040
1
16
not reported
0
HS revision
2023
0.13082
17
0.03373
4
21
not reported
0
2024
0.12595
21
0.03054
7
26
not reported
9
HS6 ranks 1, 2, 3 and 4 are 2017, 2012, 2007 and 2022. HS2 ranks 1, 2, 3 and 4 are 2022, 2009, 2021 and 2023. The two right-hand columns are validation overlays that did not work and are published as nulls. Pearson r between the HS2 series and the share of matched panel countries carrying a Global Macro Database banking, currency or sovereign-debt flag is 0.277 over the 22 years the flags are actually reported (1996-2017); for HS6 it is -0.031. The direction is right (the aggregate grain tracks crises, the fine grain does not) and the magnitude is far too weak to headline. US tariff actions are worse than weak: 2018 carried four Section 232 and 301 actions into effect and is the quietest year in the entire HS6 panel, rank 29 of 29.
GMD crisis columns are populated for only 18 of about 118 matched panel countries in 2018-2020 and for none from 2021, so the crisis column is blank wherever crisis_reported is false rather than plotting a false zero; the gmd_coverage column in the CSV carries the reported fraction. Tariff counts are effective-date counts from data/curated/us_tariff_actions.parquet and are zero in every year not shown. Ranks are over 29 years, 1 = highest surprisal.
CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), data/parquet/country_year_product/ (export_value in thousands of USD, export_qty in metric tonnes); ranks and overlays from data/parquet/instruments_substrate_events.parquet; crisis flags from data/parquet/gmd.parquet (BankingCrisis, CurrencyCrisis, SovDebtCrisis); tariff actions from data/curated/us_tariff_actions.parquet (effective_date). Vintage: CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), 1995-2024.Query
SELECT year, hs6_bits, hs6_rank, hs2_bits, hs2_rank,
hs6_qty_bits, hs6_qty_rank, hs2_qty_rank,
n_gmd_matched, share_any, gmd_coverage, crisis_reported,
n_us_tariff_actions, is_revision_year
FROM read_parquet('data/parquet/instruments_substrate_events.parquet')
ORDER BY year
At HS6 the range is 1.516 to 2.100. At HS2 it is 0.996 to 1.074, which is parity under either aggregation. HS4 sits between them at 1.160 to 1.514, which is the practical reason this site’s other product-space work runs at four digits. The third specification, tonnage shares rather than value shares, is the price-versus- quantity control and it reads 1.106 at HS6: much weaker, and discussed at Figure 6 rather than buried.
Bars right of the dashed line mean revision years are noisier than ordinary years. Every bar is MODELED (λ = 0.02, $5bn floor). Both value-share aggregations are shown because they disagree; the page quotes the range and never the more dramatic end of it. Tonnage shares are computed on export_qty, which BACI reports in metric tonnes, so its levels are not comparable to the value-share levels, only its ratio is.
CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), data/parquet/country_year_product/ (export_value in thousands of USD, export_qty in metric tonnes); ratios from data/parquet/instruments_substrate_sweep.parquet (rev_median_bits, nonrev_median_bits, ratio) at lambda = 0.02, floor_usd = 5e9, suppress_seam = true. Vintage: CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), 1995-2024.Query
SELECT grain, spec, agg, rev_median_bits, nonrev_median_bits, ratio
FROM read_parquet('data/parquet/instruments_substrate_sweep.parquet')
WHERE "lambda" = 0.02 AND floor_usd = 5000000000 AND suppress_seam
AND (spec = 'value' OR (spec = 'qty' AND agg = 'median'))
ORDER BY grain DESC, spec DESC, agg
The single line 854211, monolithic digital integrated circuits, is 59.2% of the entire 2017 reading. HS2017 restructured heading 8542. 851782, telegraphic apparatus, is 32.2% of 2012; HS2012 restructured heading 8517. The two printing-machinery lines 844390 and 844350 are together 23.8% of 2007; HS2007 restructured heading 8443. In each case the WCO published the restructuring, and the instrument found it without being told it existed. 2022 is drawn in a different colour because it is not that: its largest line is 300290, toxins and cultures of micro-organisms, the COVID-vaccine line, at 29.1%, with chapter 27 energy lines in the top six summing to 41.9%.
Shares are of the year’s net total, and the terms are signed: a product whose share came in under the codebook’s prediction contributes negative bits. A share is therefore not a percentage of a positive whole and can exceed 1 in a year with heavy cancellation. The positive and negative halves of each year are printed in Figure 5 so the cancellation is visible. Decomposition is computed on the value-weighted aggregation, which is where an additive per-product split is defined; the median aggregation used for the year series has no such decomposition.
CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), data/parquet/country_year_product/ (export_value in thousands of USD, export_qty in metric tonnes); contributions from data/parquet/instruments_substrate_contrib.parquet (bits, share_of_year_signed); HS6 names from data/parquet/products.parquet. Vintage: CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), 1995-2024.Query
SELECT grain, year, product_code, bits, year_total_bits, year_positive_bits,
year_negative_bits, share_of_year_signed, rank_in_year, product_name
FROM read_parquet('data/parquet/instruments_substrate_contrib.parquet')
WHERE grain = 6 AND year IN (2007, 2012, 2017, 2022) AND rank_in_year <= 6
ORDER BY year, rank_in_year
852110
Video recording or reproducing apparatus: magnetic tape-type
0.01856
0.087
710812
Metals: gold, non-monetary, unwrought (but not powder)
0.01703
0.079
901020
Photographic laboratory apparatus and equipment (including cinematographic): negatoscopes and other equipment n.e.s. in heading no. 9010
0.00694
0.032
710813
Metals: gold, semi-manufactured
0.00533
0.025
2017
854211
Electronic circuits: monolithic integrated, digital
0.19677
0.592
0.33226
0.38757
-0.05531
852520
Transmission apparatus: for radio-telephony, radio-telegraphy, radio-broadcasting or television, with reception apparatus, with or without sound recording or reproducing apparatus
0.02138
0.064
847330
Machines: parts and accessories of automatic data processing, magnetic or optical readers, digital processing units
0.01639
0.049
847193
Data processing machinery: storage units, whether or not presented with the rest of a system
0.01509
0.045
854449
Insulated electric conductors: for a voltage not exceeding 80 volts, not fitted with connectors
0.01379
0.042
410422
Leather: bovine, without hair on, pre-tanned, (not vegetable pre-tanned), but not further prepared, whether or not split, excluding leather of heading no. 4108 and 4109
0.01074
0.032
2022
300290
Toxins, cultures of micro-organisms (excluding yeasts) and similar products
0.04207
0.291
0.14439
0.20216
-0.05777
271000
Petroleum oils and oils from bituminous minerals, not crude: preparations n.e.c. containing by weight 70% or more of petroleum oils or oils from bituminous minerals: these being the basic constituents of the preparations: waste oils
0.01757
0.122
271121
Petroleum gases and other gaseous hydrocarbons: in gaseous state, natural gas
0.01567
0.108
270900
Oils: petroleum oils and oils obtained from bituminous minerals, crude
0.01093
0.076
271111
Petroleum gases and other gaseous hydrocarbons: liquefied, natural gas
0.01067
0.074
271600
Electrical energy
0.00560
0.039
Three of these four years are one restructured heading wearing a trade shock’s clothes. The fourth is a trade shock. 2022’s HS2 reading, which is first of 29 at chapter grain, is dominated by chapter 27: mineral fuels contribute 0.05712 bits, 2.115 of a small net total. That figure above 1 is the cancellation made visible, not an error: it is why this page refuses to print these numbers as bare percentages.
share_of_year_signed is the product’s signed bits divided by the year’s signed net total. Positive and negative column totals are the sums of all positive and all negative per-product terms in that year, so net = positive + negative. Value-weighted aggregation, λ = 0.02, $5bn floor. MODELED.
SELECT grain, year, product_code, bits, year_total_bits, year_positive_bits,
year_negative_bits, share_of_year_signed, rank_in_year, product_name
FROM read_parquet('data/parquet/instruments_substrate_contrib.parquet')
WHERE grain = 6 AND year IN (2007, 2012, 2017, 2022) AND rank_in_year <= 6
ORDER BY year, rank_in_year
Tonnage shares are built from export_qty (metric tonnes) with the same λ = 0.02 backoff, the same $5bn value floor for country selection, and the same median across countries. Levels are not comparable across the two lines, because bits over a tonnage distribution and bits over a value distribution measure different objects; only the shape and the ranking are. The 1999-2000 and 2010 tonnage peaks look like quantity-reporting artefacts and are not claimed as anything else. MODELED.
CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), data/parquet/country_year_product/ (export_value in thousands of USD, export_qty in metric tonnes); both series from data/parquet/instruments_substrate_year.parquet (grain = 6, agg = 'median', lambda = 0.02, floor_usd = 5e9). Vintage: CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), 1995-2024.
Query
SELECT spec, year, surprisal_bits, rank_desc
FROM read_parquet('data/parquet/instruments_substrate_year.parquet')
WHERE grain = 6 AND agg = 'median' AND "lambda" = 0.02
AND floor_usd = 5000000000 AND suppress_seam
ORDER BY spec, year
The HS6 seam survives every smoothing weight from 0.001 to 0.5, and HS2 never leaves the neighbourhood of parity. The HS6 ratio ranges 1.017 to 1.520 across the eight weights; HS2 ranges 0.848 to 1.031. 2017 ranks first at every weight in the grid, 2012 ranks second at every weight except λ = 0.5, and 2007 ranks third for λ ≤ 0.05. The weakening at λ = 0.5 is expected and not a defect: at that weight the codebook is half world-average, so it stops being last year’s basket at all.
Held fixed: value shares, median across countries, $5bn floor, reporter-code observations suppressed. Ranks in the CSV are over 29 years, 1 = highest. λ = 0.02 is the headline choice and is one row of this figure, not a separate calculation.
SELECT grain, "lambda", floor_usd, ratio, rank_2017, rank_2012, rank_2007
FROM read_parquet('data/parquet/instruments_substrate_sweep.parquet')
WHERE spec = 'value' AND agg = 'median' AND floor_usd = 5000000000
AND suppress_seam AND grain IN (6, 2)
ORDER BY grain DESC, "lambda"
The HS6 seam never changes sign across floors, but its magnitude moves by a factor of 1.4, and the HS2 result is the one that has to be stated carefully. HS6 ranges 1.247 with no floor at all to 1.721 at a $50bn floor. HS2 straddles 1 throughout, which is the robust part. What is not robust is which years top the HS2 ranking: at the $5bn headline floor they are 2022, 2009, 2021 and 2023, but with the floor removed entirely they become 1996, 1998, 1997 and 2000, an Asian-crisis-era reading that exists only when the smallest exporters are allowed into the median. This page therefore does not claim that chapter-grain surprisal recovers the Asian crisis. At the headline floor it recovers 2009 and the 2020-2023 pandemic-and-energy block, and that is all it recovers.
Held fixed: value shares, λ = 0.02, median across countries, reporter-code observations suppressed. The floor is applied to plain USD exports (BACI thousands × 1000). Country counts clearing the $5bn floor run from 65 in 1996 to 128 in 2023.
CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), data/parquet/country_year_product/ (export_value in thousands of USD, export_qty in metric tonnes); data/parquet/instruments_substrate_sweep.parquet (grain, floor_usd, ratio) at lambda = 0.02. Vintage: CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), 1995-2024.Query
SELECT grain, "lambda", floor_usd, ratio, rank_2017, rank_2012, rank_2007
FROM read_parquet('data/parquet/instruments_substrate_sweep.parquet')
WHERE spec = 'value' AND agg = 'median' AND "lambda" = 0.02
AND suppress_seam AND grain IN (6, 2)
ORDER BY grain DESC, floor_usd
Composition-consistent entities are constructed by summing the BACI reporter codes on both sides of the split for every year in the window (BEL + LUX, SDN + SSD), so the entity’s membership is constant across the seam. Only HS6 rows are shown; HS4 and HS2 rows are in the CSV. The headline series suppresses these two observations, which is a documented choice with no measurable consequence, retained because the alternative is an undocumented one.
CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), data/parquet/country_year_product/ (export_value in thousands of USD, export_qty in metric tonnes); data/parquet/instruments_substrate_seam_series.parquet (entity, entity_kind, surprisal_bits). Country labels via src/lib/country-name.ts. Vintage: CEPII BACI 202501 (retrieved 2026-04-28, HS 1996 revision), 1995-2024.
Query
SELECT entity, entity_kind, year, surprisal_bits, is_seam_year
FROM read_parquet('data/parquet/instruments_substrate_seam_series.parquet')
WHERE grain = 6
ORDER BY entity, year