S&P 500 & NASDAQ-100 3D Clustering
This experiment clusters S&P 500 USD and NASDAQ-100 constituents using density-based spatial clustering.
The constituents are represented by spheres and their location in a 3D space spanned by 3 data dimensions: USD close price, 24H USD volume, and 24H change (%). Hulls surround the identified clusters. Gray spheres without hulls do not belong to any cluster.
Regression planes visualize how each of the 3 dimensions is predicted by the other 2 dimensions. The axis and axis label of the predicted dimension and the corresponding regression plane share the same color.
Please note that some of the features described in the following are only available in the full-screen UI of the cube experiment and not in the preview at the bottom.
The mouse, touch, or trackpad can be used to orbit and zoom in on the cube.
The spheres representing the S&P 500 or NASDAQ-100 constituents can be hovered over to reveal more information in the top left corner of the screen. When hovering over them, lines appear that indicate the distance from the sphere to the sides of the cube and to the regression planes. The greater the distance from the regression planes, the more of an outlier the market is.
Settings
- Dataset
- Selects the S&P500 or NASDAQ100 constituents as the dataset.
- Price, 24H Volume, 24H Change (Log-Transform Data)
- Toggles log-scaling per axis. Disabling log-scaling for the change axis can be reasonable, but it is less so for price and volume given their distributions.
- 24H Change (Zero-Center Data)
- Zero-centers the change axis so that a 0% change sits at the midpoint of the cube, making it easier to distinguish positive from negative changes at a glance.
- Compute Clusters
- Enables density-based spatial clustering of the constituents.
- Render Hulls
- Toggles the convex hull overlay drawn around each cluster.
- Cluster Radius
- Controls the neighborhood radius used when forming clusters: lower values find more, smaller clusters; higher values find fewer, larger ones. A higher value is generally better suited for NASDAQ100 than for S&P500. Can also be controlled with Cmd/Ctrl + ↓/↑.
- Min Elements
- Specifies the minimum number of constituents required to form a cluster.
- Render Planes
- Toggles the regression planes.
- Compute Intercept
- Controls whether the regression is fitted with or without a free intercept term.
- Show Correlations
- Enables the correlation display in the bottom left corner.
- Confidence Interval (%)
- Controls the width of the confidence interval. The effect of different values is more apparent for the NASDAQ100 dataset, given its smaller size.
- Render Labels
- Displays labels below the spheres.
- MAG7 Only
- Restricts labels to the Magnificent Seven constituents only.
- Render Cube
- Toggles the wireframe cube that frames the 3D space.
- Cybernetic Bloom
- Enables a post-processing bloom glow effect.
Technical Details
To improve performance and save battery power, the cube scene is rendered only when the camera is used, a sphere is hovered over, settings are changed, or new data is received, rather than being rendered in a constant animation loop, as in most Three.js examples.
Display Note
To experience the cube experiment in full detail, it is recommended to view it on a high-DPI device (e.g., Retina Display).
The material on this website is for informational purposes only and does not constitute investment advice or a recommendation to buy/sell any security.