Quant Memo
Core

Multidimensional Scaling

Taking a table of pairwise distances between assets and finding a low-dimensional map — usually 2D, for a picture you can actually look at — that reproduces those distances as faithfully as possible.

Prerequisites: Distance and Similarity Measures for Assets

You've computed a table of pairwise distances between 100 assets — how similar or different each pair is, by whatever metric you chose (see Distance and Similarity Measures for Assets). That's 100×99/24,950100\times99/2 \approx 4{,}950 numbers, far too many to look at directly and get any intuition. You want a picture: a 2D map where similar assets sit close together and dissimilar ones sit far apart, so a human can glance at it and immediately see clusters, outliers, and structure. Multidimensional scaling (MDS) is exactly the technique for building that map — it takes the full table of pairwise distances as input and finds coordinates in a low number of dimensions (usually 2, for plotting) that reproduce those distances as closely as possible.

An analogy: rebuilding a map from a list of city-to-city distances

Imagine you're handed a table listing the road distance between every pair of cities in a country, but no map — no coordinates, no directions, just distances. You could still reconstruct a reasonably accurate map: place any two cities, then find a third city's position consistent with its distance to both of the first two, and keep going, adjusting positions slightly for cities whose relationships can't all be satisfied perfectly at once (since real road distances aren't perfectly "as the crow flies," some compromise is unavoidable). MDS does this reconstruction mathematically and simultaneously for all points at once, finding the 2D layout that best honors all the pairwise distances together, accepting small unavoidable distortions rather than perfectly satisfying any single pair at the expense of all the others.

The mechanics, one symbol at a time

Let dijd_{ij} be the given distance between assets ii and jj (from your chosen distance table) and d^ij\hat d_{ij} be the distance implied by candidate 2D coordinates you're solving for. Classical MDS finds coordinates that minimize the stress, a measure of how much the reconstructed distances d^ij\hat d_{ij} deviate from the original dijd_{ij}:

Stress=i<j(dijd^ij)2i<jdij2.\text{Stress} = \sqrt{\frac{\sum_{i<j}(d_{ij}-\hat d_{ij})^2}{\sum_{i<j} d_{ij}^2}}.

In plain English: stress measures the total squared mismatch between the distances you started with and the distances your low-dimensional map actually reproduces, normalized so it's comparable across datasets — a stress near 0 means the 2D map is an almost perfect representation of the original distance table, while a high stress means real structure is being lost by squeezing everything into just 2 dimensions. Classical MDS solves this via eigenvalue decomposition of a transformed version of the distance matrix (closely related to PCA), while its cousin non-metric MDS only tries to preserve the rank order of distances (which pairs are closer than which others) rather than their exact magnitudes, useful when the distance numbers themselves are noisy but their relative ordering is trustworthy.

Crucially, MDS can only ever compress, never invent, information: if the true relationships among 100 assets genuinely require, say, 5 independent dimensions to describe well, forcing everything into 2 dimensions for a plot will necessarily distort some distances — the stress value tells you honestly how much distortion that compression cost.

Worked example 1: low stress, a genuinely 2D-ish structure

Suppose 30 stocks split cleanly into three sector groups, with tight within-sector correlation and looser cross-sector correlation — a structure that's naturally close to 2-dimensional (three well-separated clusters can usually be drawn well on a flat page). Running MDS on the correlation-based distance table produces a 2D map with three visually distinct, well-separated blobs, and the stress computes to about 0.04 — low, meaning the 2D layout reproduces the original 4,950 pairwise distances quite faithfully. A practitioner can trust the visual clusters in this map as a reasonably accurate summary of the real distance structure.

Worked example 2: high stress, a warning sign

Now suppose the same 30 stocks actually have a richer, higher-dimensional relationship structure — driven by, say, 5 independent sector and style factors, not 3 clean clusters. Forcing this into a 2D MDS map produces a stress of about 0.32 — a level generally considered poor. The resulting map might visually suggest two assets are "close" that are, in the true higher-dimensional structure, not particularly similar at all — an artifact of compression, not a real finding. Reporting clusters read off a high-stress MDS map here would be misleading; the honest conclusion is that 2 dimensions are insufficient and either more dimensions should be used (even if not directly plottable) or the visual clusters should be treated with real skepticism.

low stress (0.04) high stress (0.32) true clusters compressed and blurred
A low-stress MDS map faithfully separates the true clusters; a high-stress map (real structure too high-dimensional for 2D) blurs groups together and can suggest false neighbors.

What this means in practice

MDS is a visualization and exploration tool, not an inference engine — it's used to eyeball the structure of an asset universe, sanity-check a clustering result, or spot outliers and unexpected groupings before committing to a more formal model. It's most trustworthy when the resulting stress is low; a high-stress 2D map should be treated as a rough, potentially misleading sketch rather than a reliable summary, and the analyst should consider whether 3D (harder to plot but still checkable) or a different technique entirely is more honest about the data's true complexity.

Multidimensional scaling turns a table of pairwise distances into a low-dimensional (usually 2D) map that best reproduces those distances, with "stress" quantifying how much information was necessarily lost by compressing into so few dimensions.

Don't read visual proximity on an MDS map as proof of real similarity without checking the stress value first. When true structure is higher-dimensional than the plot allows, MDS still produces a plausible-looking 2D layout — it has no way to flag "I couldn't fit this well" except through the stress number, and a compressed map with high stress can show two assets sitting next to each other that are, in the actual distance table, not close at all.

Related concepts

Practice in interviews

Further reading

  • Cox and Cox, Multidimensional Scaling
  • Borg and Groenen, Modern Multidimensional Scaling: Theory and Applications
ShareTwitterLinkedIn