Charts / React finance charts / Relationship
Correlation matrix
Pairwise correlations of twelve assets, clustered so related markets sit together, with each mark sized by the strength of the link.
React component CorrelationMatrix, data through props. How variables move together: correlation, density and many dimensions at once. Tags: correlation, matrix, heatmap, clustering, assets, portfolio, risk.
Install
npm i klar-charts
import 'klar-charts/styles.css'
import { ThemeScope, CorrelationMatrix } from 'klar-charts'
# or copy the source:
npx shadcn@latest add https://klar.run/r/fin-correlation.json
Usage
<CorrelationMatrix className="mt-5" assets={corrAssets} matrix={corrMatrix} order={order} shape={shape} window="1Y daily" height={452} />
Related correlation matrix charts
- Scatter plot: Two measures plotted against each other and coloured by group, with median lines, named quadrants and labelled outliers.
- Bubble chart: A scatter plot with a third measure as bubble area and a fourth as colour, with a size key and names that never overlap.
- Candlestick with volume: Daily OHLC candles over a shared-axis volume pane, with moving averages, an optional Bollinger band and a crosshair readout of every…
- Order book depth: Cumulative bids and asks stepping away from the mid, so you can read the spread, the walls and what a sweep to any price would cost.
- Yield curve: The term structure today against a month and a year ago, with inversion against the 3M yield shaded and the 2s10s spread called out.
- Volatility surface: Implied volatility by strike and expiry as a banded contour grid, linked to the smile of any expiry and the at-the-money term structure.