The Hang Seng Atlas

A map of the Hong Kong stock market — drawn by correlation, not by sector.

Every marker is a company in the Hang Seng Index; companies are connected when their share prices genuinely move together. Click a company for its story, or open the interactive atlas ↗

01 · The idea

Financial data providers put every stock in a sector box: HSBC is a "bank", JD Health is "healthcare", Sun Hung Kai is "real estate". But boxes are opinions. Prices are not. If two stocks rise and fall together, day after day for three years, the market is telling you they are exposed to the same forces — whatever the label says.

So this map ignores the labels entirely. It takes three years of daily returns for the 89 index members with a full price history, works out which co-movements are statistically real, keeps only the strongest connections, and lets the groups emerge on their own. The result is a market atlas — and the most interesting companies are the ones found in a group you would not expect.

02 · How the map is drawn

Step 1 — measure co-movement

For each stock, daily log returns: rt = ln(Pt / Pt−1). Correlating every pair gives 3,916 numbers between −1 and 1. (A rank-based check — Kendall's τ — confirms none of them are artifacts of a few extreme days.)

Step 2 — throw away the noise

Here is the problem: with 89 stocks and ~730 trading days, most of those 3,916 correlations are sampling noise — patterns that would vanish in a different sample. Random Matrix Theory says exactly what the correlations of purely random data look like (the Marchenko–Pastur distribution), so anything matching that prediction can be deleted. What survives: one giant pattern — the market mode, the tide that lifts and sinks everything at once, 39% of all variance — plus a handful of genuine group patterns. Only those are kept.

Eigenvalue spectrum against the Marchenko–Pastur prediction: most eigenvalues sit in the noise bulk, ten stand out, the market mode is far outside
The eigenvalue test: grey = statistically indistinguishable from noise; red = real structure. The market mode (λ₁ = 34.7) is so large it needs a log scale.

Step 3 — lay the track

Cleaned correlations are converted to distances (close = moves together), and a minimum spanning tree keeps just the 88 strongest links that connect all 89 companies — the skeleton of the network. A planarity-constrained extension (the PMFG) adds back the most important loops as thinner secondary track.

Step 4 — draw the lines

Hierarchical clustering groups companies by the same distances, and a fit statistic — not a human — picks the number of lines: ten. One honest subtlety: with the market tide left in, statistics says the whole index is one line (in a panic, everything is one trade). The lines are therefore drawn on what remains after removing that common wave, which is where the group structure lives.

Dendrogram of the hierarchical clustering with the nine-line cut marked
The family tree of the index. Cutting at the dashed height yields the ten lines of the map.

Step 5 — stress-test everything

A map built from noise would look just as pretty, so two checks: a permutation test (shuffle each stock's history independently — any surviving correlation must be luck) proves six eigenvalues are unambiguously real; and a bootstrap (rebuild the entire map 200 times on resampled data) grades every company's "group loyalty". the Pharma line re-forms 98% of the time, and three small groups — the state banks, the metals miners, the telecoms — re-form on every single resample; the sprawling consumer group barely holds together (49%) — and the map says so instead of hiding it.

Permutation-test null distribution of the largest eigenvalue with the observed significant eigenvalues marked
Which patterns beat pure noise: the null distribution from 500 shuffles, and the observed eigenvalues that clear it.

03 · How each line traded

Because the lines are real portfolios, each one has an accumulated index: put equal money in every company of a group, rebalance daily, start at 100. Three years later the spread is enormous — the new Metals & Mining Line returned +247%, Pharma +116% and the state banks +113%, while the Consumer Line lost 13% and the Developers Line went nowhere (+2%). Same index, same city, completely different journeys — which is exactly why the map has groups at all. The same sparkline appears when you click any company above.

Accumulated equal-weighted index per line over three years, from +247% for metals to −13% for consumer
Equal-weighted, daily-rebalanced index per line, start = 100.

04 · Where the map disagrees with the labels

HSBC is not on the banking line

The mainland state banks form their own tight line that re-forms on every statistical resample. HSBC and AIA instead ride the Hong Kong Line with CK Hutchison, MTR and the landlords. What binds a line is exposure: HK and global rates on one side, mainland policy on the other.

"Real estate" is two different trades

Mainland developers (China Overseas Land, Longfor, China Resources Land) get their own line, far from the HK landlords (Sun Hung Kai, Henderson, Link REIT). One label, two opposite macro stories: the China property cycle versus HK rates and retail rents.

Platform "healthcare" isn't healthcare

JD Health and Alibaba Health carry a Healthcare label but trade as appendages of their platform parents — they sit with JD.com, Alibaba and Tencent, two transfers away from the actual Pharma Line (CSPC, Sino Biopharm, the WuXi pair).

05 · The network breathes

Rebuilding the map on rolling half-year windows shows it is not a static object. In calm markets the network spreads out and up to seven distinct groups are visible. Under stress it contracts violently: in the windows covering April 2025 — the tariff shock, the Hang Seng's worst day since 1997 — the market tide alone explained 53% of all variance and the tree pulled to its tightest length of the whole sample. In a panic, there is only one line.

Rolling window metrics: market-mode share, tree length, and number of visible groups over time, with the April 2025 spike marked
The map under stress: market-mode share spikes and the tree contracts as the April 2025 shock enters the window.

06 · Notes & sources

Data: daily adjusted closes, July 2023 – July 2026, current Hang Seng Index constituents per the June 2026 review (89 of 93 pass data quality checks; the exclusions are recent listings without a full three-year history). Methods: Pearson/Kendall correlations; Marchenko–Pastur denoising with the one-factor correction (Laloux et al. 1999; Plerou et al. 2002); Mantegna distance and minimum spanning tree (Mantegna 1999; Onnela et al. 2003); PMFG (Tumminello et al. 2005); Ward clustering with silhouette-selected k; permutation and moving-block-bootstrap inference. The full pipeline, figures and a two-part technical write-up live in the project repository.

An educational project by an econometrics student. It shows statistical co-movement, past-only and sample-dependent — not investment advice, and not affiliated with Hang Seng Indexes Company or MTR Corporation.