# Cross-instrument Composition

Also known as: pair spreads, beta-hedged overlays, basket signals, constituent aggregation.
A Meta & Composition concept (Cross-instrument composition) in the LuxAlgo Library, with 3 indicator implementations.

## What is Cross-instrument Composition?

Cross-instrument composition is the umbrella for techniques whose input is built from more than one instrument. Instead of analyzing a single symbol's own prices, the analyst constructs a derived series: a pair ratio or spread between two symbols (ratio charts are the simplest case), a beta-hedged overlay that offsets one leg against another, an equal- or cap-weighted [custom basket or index](https://www.luxalgo.com/library/concept/custom-indices-baskets/), the same asset aggregated across venues, or a signal computed on one market and applied to a different one. That derived series is then charted and analyzed like any instrument.

The lineage is old. Charles Dow's industrial and railroad averages of the 1880s and 1890s were composites, built on the premise that many stocks read together say more than any one alone. Relative-strength ratio work has been standard in equity analysis since at least the mid-20th century, hedged spreads formalized alongside beta and the capital asset pricing model in the 1960s, and the statistical pairs desks of the 1980s industrialized spread construction.

Composition exists to isolate the exposure that actually interests you. A ratio cancels the direction both legs share and leaves relative performance; a beta-weighted spread aims to cancel market sensitivity and keep the residual; a basket averages away single-name noise to expose a theme. The caveats are statistical and practical: the relationships that justify a composite, measured by correlation or cointegration, drift over time, and the derived series inherits every leg's data problems, from mismatched sessions and illiquid prints to splits and venue differences. A composite is only as clean as its dirtiest input.

Composition of instruments is also worth distinguishing from composition of signals. [Composite oscillators](https://www.luxalgo.com/library/concept/composite-oscillators/) and [confluence scoring](https://www.luxalgo.com/library/concept/confluence-and-scoring-systems/) merge indicators computed on one instrument; cross-instrument composition merges the instruments themselves and only then applies indicators. It likewise differs from intermarket analysis, which reads cross-market relationships while each chart stays single-instrument, and from a pairs-trading workflow, a strategy built on top of a composed spread rather than the construction itself. The order matters for interpretation: a derived series has no order book behind it, so ideas that lean on traded prices, volume at a level, or literal support and resistance need translating with care, while purely statistical tools apply directly.

## How to build a cross-instrument composite

Most charting platforms accept symbol arithmetic directly in the symbol box, which makes construction a chart-side task.

1. Choose the legs and the question: relative performance suggests a ratio, hedged exposure a scaled spread, a theme an average of several symbols.
2. Check alignment before doing math: same sessions, comparable bar timestamps, adequate liquidity in every leg.
3. Write the expression: A/B for a ratio, A minus k times B for a spread with hedge coefficient k estimated from beta or relative volatility, or a weighted sum for a basket.
4. Set the scale deliberately: long-history ratios usually belong on a logarithmic [chart scale](https://www.luxalgo.com/library/concept/chart-scales/) so early and recent history are comparable.
5. Analyze the result like any series, applying trend tools, mean-reversion bands, or [trend/range classifiers](https://www.luxalgo.com/library/concept/trend-range-classifiers/) to the composite.

## How it's calculated

A synthetic series built from two or more instruments, such as a ratio, a hedged spread, or a weighted basket, which is then charted or fed to standard indicators.

```
Ratio_t = P_A,t / P_B,t
Spread_t = P_A,t - h × P_B,t
h = Cov(r_A, r_B) / Var(r_B), the beta of A's returns on B's returns over the estimation window
Basket_t = Σ w_i × P_i,t over constituents i = 1..k

  t: bar index
  P_A,t: price of instrument A (the traded leg) at bar t
  P_B,t: price of instrument B (the reference or hedge leg) at bar t
  Ratio_t: relative strength line of A versus B
  Spread_t: hedged price difference between A and B
  h: hedge ratio, units of B per unit of A (default 1 for a plain spread)
  r_A, r_B: one-bar returns of A and B, e.g. r_A,t = (P_A,t - P_A,(t-1)) / P_A,(t-1)
  Cov(x, y): sample covariance of x and y over the estimation window (commonly 20 to 250 bars)
  Var(x): sample variance of x over the same window
  i: constituent index
  k: number of instruments in the basket
  w_i: weight of constituent i (equal weights 1/k are common)
  P_i,t: price of constituent i at bar t
  Basket_t: weighted composite value at bar t
```

Spreads are often built on log prices, Spread_t = ln(P_A,t) - h × ln(P_B,t), which makes h scale-free; h can also be fixed by contract size or FX conversion instead of regression.

Breadth composites aggregate conditions rather than prices, e.g. the percent of the k constituents trading above their own moving average.

Align sessions, time zones, currencies and contract multipliers before composing; any single-instrument indicator can then run on the composed series.

## How traders use it

- For relative-strength selection: ratios of candidates against a benchmark or against each other rank leaders and laggards, and the trade is then executed in the individual legs; comparative relative strength formalizes the ranking.
- For spread mean reversion: the spread between historically related instruments is standardized with a z-score and faded at extremes, on the premise, never the promise, that the relationship reasserts itself.
- For breadth and consensus: aggregating constituents, whether counting how many basket components sit above a moving average or summing their volume, turns many charts into one regime input.
- For context: series composed from other markets, such as dollar strength against a currency basket or volume aggregated across exchanges, set the bias for the instrument actually being traded, a cross-instrument flavor of [top-down analysis](https://www.luxalgo.com/library/concept/top-down-analysis/).
- As a regime input to single-instrument systems: a composite feeds the filter stage of a [filter-setup-trigger-exit](https://www.luxalgo.com/library/concept/filter-setup-trigger-exit-architecture/) design, gating signals on the traded chart rather than generating them.
- For automation: composite series are watched with [alerts and webhooks](https://www.luxalgo.com/library/concept/alerts-and-webhooks/) like any chart, so a spread crossing a threshold can notify the trader or trigger downstream order logic on the individual legs.

## Cross-instrument Composition vs related approaches

- **Custom Indices/baskets** (https://www.luxalgo.com/library/concept/custom-indices-baskets/): A custom basket is one output of composition: several symbols merged into a single synthetic index. The umbrella also covers two-leg ratios, hedged spreads, and venue aggregation, where the goal is a relationship or a cleaner feed rather than an index.
- **Composite Oscillators** (https://www.luxalgo.com/library/concept/composite-oscillators/): A composite oscillator blends several indicators computed on the same instrument into one line. Cross-instrument composition blends the instruments themselves before any indicator is applied: signal fusion versus data fusion.
- **Confluence & Scoring Systems** (https://www.luxalgo.com/library/concept/confluence-and-scoring-systems/): Confluence scoring counts agreement among signals to grade a setup and can sit on top of any chart, single or composite. Composition happens a layer earlier: it decides what series the signals are computed on in the first place.

## FAQ

### What is the difference between a spread and a ratio?

A spread subtracts one leg from the other, often after scaling by beta or notional value, and keeps currency units, which suits hedged position math and P&L tracking. A ratio divides, producing a scale-free line that stays comparable across price regimes and long histories. Both express relative value; the choice usually follows how the trade will be sized and hedged.

### Why beta-hedge a pair instead of trading it one-to-one?

Equal notional legs only cancel market direction if both legs respond to the market equally. When one leg is more volatile or higher-beta, a one-to-one pair keeps residual directional exposure that can dominate the relative bet. Weighting by beta or volatility aims the position at the relationship itself. The hedge is approximate at best, because betas are estimated and they drift.

### What data pitfalls affect cross-instrument composites?

Alignment is the big one: different sessions, holidays, and time zones mean bars that look simultaneous are not, and an illiquid leg prints stale values that fabricate spread moves. Corporate actions, futures rolls, and venue differences in an aggregated feed all inject artificial jumps. Many apparent signals in a badly aligned composite are data artifacts, so composition quality precedes any analysis of the result.

### Can a composite series be traded directly?

Usually not. A ratio or spread has no order book of its own; expressing the view means trading the legs individually, which introduces execution slippage between fills, margin on each leg, and the possibility of one leg filling without the other. Exceptions exist where a listed product already tracks the composite, such as an index future or a basket ETF.

### How many instruments should a basket contain?

Enough to average away single-name accidents, few enough to stay interpretable and executable; very large baskets converge on an existing index, at which point charting the index is simpler. There is no magic number, and the weighting choice, equal versus cap versus volatility, typically changes behavior more than adding a few extra names does.

## Implementations in the Library

- Arbitrage Detector (LuxAlgo): https://www.luxalgo.com/library/indicator/arbitrage-detector/
- Arbitrage Matrix (LuxAlgo): https://www.luxalgo.com/library/indicator/arbitrage-matrix/
- Relative Crypto Dominance Polar Chart (LuxAlgo): https://www.luxalgo.com/library/indicator/relative-crypto-dominance-polar-chart/

## Related concepts

- Lead-lag Instrument Triggers: https://www.luxalgo.com/library/concept/lead-lag-instrument-triggers/
- Currency-adjusted Charting: https://www.luxalgo.com/library/concept/currency-adjusted-charting/

---

Source: https://www.luxalgo.com/library/concept/cross-instrument-composition/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/