Classifying Forex Candlesticks with K-Means Clustering
Summary
This article demonstrates an unsupervised approach to grouping GBP/JPY candles by their shape. It represents each candle using the high, low, and close relative to the open, then applies k-means clustering with six groups. The assigned cluster labels are aligned with the price series and used to reorder candles in a chart, making it possible to inspect the visual forms gathered in each group.
The example illustrates a way to derive candle categories from data instead of defining named patterns by hand. It does not connect clusters to future returns, set out an entry or exit rule, or report a trading test. The choice of features and number of clusters is fixed for this demonstration, and the article gives no evidence that the resulting groups are stable or predictive. Its contribution is exploratory classification rather than a validated trading strategy.
Key ideas
- Candle shape is represented by high, low, and close differences from the open.
- K-means assigns the observed GBP/JPY candles to six groups.
- Plotting candles by cluster helps inspect the shapes represented in each group.
- The example does not test whether cluster membership predicts returns or supports profitable trades.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.