Without engineered features or class balancing, this paper's hybrid Transformer-LSTM barely matches a plain LSTM on the next hourly Bitcoin candle: 0.68 accuracy against 0.69 in the ablation table. Restoring the 32 features takes the hybrid to 0.86.

The features account for most of the improvement. Only with them does the hybrid pull ahead by about ten points.

Four candle shapes and 32 inputs

The trading premise comes from chart reading: certain candle shapes signal possible entries, so forecasting the next hour's shape could help time a trade. The authors call this candlestick type prediction, classifying the next hourly bar by its shape. They use hourly BTC/USDT bars from the TradingView feed covering 15 May 2018 to 18 June 2023. Four TA-Lib rule functions assign labels for Doji, Hammer, Hanging Man and Marubozu. A domain expert then reviewed the labels visually, correcting or removing borderline cases.

Doji means the open and close are nearly equal. Hammer and Hanging Man each have a lower shadow at least twice the body; Hammer follows a downtrend and Hanging Man an uptrend. Marubozu has a full body and little or no shadow. The reported counts are 5,094 Doji, 992 Hammer, 930 Marubozu and 648 Hanging Man.

The model receives 32 inputs per row. Alongside OHLCV, these include a 7-bar close MA, ATR(14), a 21-bar volume MA with a volume growth ratio, and calendar fields. Further inputs measure red-candle shares over 7 and 21 bars, consecutive red or green candles (NSR, NSG), and PCT, each pattern's frequency over the last 5 and 13 bars. NDCT is the target: the next candle's type, drawn from four classes.

Data are split chronologically, 70/15/15, and scalers are fitted only on training data. The headline model is HTL. It places a 128/64-unit LSTM branch alongside one four-head Transformer encoder layer, concatenates their outputs, then feeds dense layers of 128 and 64 units into a four-way softmax.

HTL records 0.86 accuracy and 0.81 F1 on the test split. Accuracy is 0.76 for the LSTM and 0.69 for XGBoost. Random forest falls from 0.96 in training to 0.61 on test. Against the LSTM, McNemar's test reports b = 410, c = 41, p < 0.0001.

Which Bitcoin hours are behind the 86%?

The stated class counts total 7,664 candles across five years of hourly bars. CDCT, the feature for current-candle type, ranges from 0 to 4 and includes "other types". The target ranges from 0 to 3. We did not find an explanation of what happens to hours whose next candle fits none of the four patterns. Dropping them would condition the test set on the next bar belonging to a selected shape. Traders watching a live feed have no such filter.

Even this subset is dominated by Doji: 5,094 of 7,664 candles, or about 66%. Elsewhere, the balancing section gives a pre-undersampling count near 7,300, about 74% of roughly 9,870 four-class candles before undersampling. Validation and test retain the natural class mix. We found neither an always-Doji baseline nor a persistence baseline in Table 3, leaving 0.86 without a floor for comparison.

The prior work cited by the paper offers some scale. Its best conditional probability of next-day direction given candle type was below 64%. The tasks differ, but a gap this large needs a baseline before it can be interpreted.

Most of the gain comes from engineered features

The ablation table tells us more than the headline comparison. With unbalanced training, expanding the inputs from 5 to 32 lifts HTL accuracy from 0.68 to 0.86 and F1 from 0.56 to 0.81. The LSTM moves from 0.69 to 0.76. In those unbalanced rows, the hybrid's ten-point advantage (0.86 vs 0.76) emerges only after the engineered features enter.

Balancing changes the comparison. Using OHLCV alone, HTL already beats the LSTM by 0.45 to 0.26. Adding the features raises HTL from 0.45 to 0.85. These balanced rows deserve the most attention because the paper identifies undersampling as its final regime.

The authors make the same point about features. Their abstract says the ablation validates "the significant contribution of the newly engineered features". The SHAP section describes the improvement as "primarily attributable to the additional engineered features". Its ranking supports that reading: Price Change, the percentage change in close from the preceding bar, leads for all four classes. ATR(14) comes second or third. Raw OHLC reaches no higher than sixth, with mean |SHAP| at or below 0.0084.

The conclusion makes a broader claim: "both model architecture and feature engineering play critical roles in predictive performance." Evidence for the architecture rests on HTL scoring 0.86 against the LSTM's 0.76. In the balancing regime described as final, the LSTM instead records 0.72 and HTL 0.85. Both figures come from a single fixed chronological split.

Before relying on the feature ranking, an implementer needs to check alignment. The authors explain Price Change's 0.2095 attribution for Marubozu by referring to "strong directional price movements and relatively large candle bodies". That description fits the candle receiving the label. For a target at t+1, however, Price Change belongs to the preceding bar; volatility persistence would be a plausible interpretation. The target must be shifted explicitly, with a check that every feature excludes the bar being predicted.

One timestep leaves little for attention to do

The paper is explicit: "the input data is formatted with timesteps = 1, meaning each sample contains only the features of the current candlestick." In the HTL equations, the input is reshaped to T = 1 and attention operates along that axis. Softmax over a single token returns 1. The attention block therefore reduces to a projection.

The general Transformer section gives a different construction. It embeds each scalar feature as a token, allowing attention across the 32 features. An implementer has to choose between these descriptions. We would use feature attention, the only version in which attention can do work, and flag that decision as ours.

The authors acknowledge that the LSTM and attention "serve primarily as nonlinear feature representation learners rather than sequence modelers." Rolling indicators supply the history. The network learns nothing across a sequence, leaving the claim about the Transformer capturing long-range dependencies untested.

Why does the LSTM score 0.76 in Table 3 and 71.98% elsewhere?

Table 3 reports LSTM accuracy of 0.76; the McNemar discussion in Section 4.4 gives 71.98%. The conclusion itself uses the range "0.86 vs 0.72-0.76". The ablation offers a possible explanation. With every feature included, the LSTM records 0.76 under unbalanced training and 0.72 under balanced training. HTL's headline 0.86 accuracy and 0.81 F1 correspond to its unbalanced row. Balanced HTL records 0.85 and 0.79.

Yet the paper says its final results rely solely on undersampling. Taken literally, the McNemar comparison pits the unbalanced hybrid against the balanced LSTM. This choice moves the results substantially: balancing takes the OHLCV-only LSTM from 0.69 down to 0.26.

Our rebuild substitutes automated TA-Lib labels

Our rebuild is an automated-label variant rather than a test of the paper's method. OHLCV cannot recover the expert's corrections, so we replace them with deterministic TA-Lib labels. Our bars may also differ from TradingView's BTC/USDT feed in quote currency, volume convention and date coverage. We check those differences before making comparisons. Our evaluation includes every hour in the timeline, with trade eligibility never conditioned on the pattern that subsequently appears.

Half the target classes also lack direction. Under the paper's reversal interpretation, Hammer is bullish after a downtrend and Hanging Man bearish after an uptrend. The four-class label gives Marubozu no color, while Doji denotes indecision. A directional rule can consequently trade only predicted Hammer or Hanging Man. Together, those classes account for 1,640 of the 7,664 labelled candles. Whether their signals survive depends on costs and risk limits, which the paper's single fixed split does not address.

The authors acknowledge that "even high classification accuracy does not directly translate into guaranteed financial gain" and leave trading evaluation outside their scope. In that same passage, they say the model "provides informative market structure signals that can support trading decisions when integrated into a comprehensive and properly designed trading framework". The paper never tests "informative". It offers no majority-class baseline to clear and no trading evaluation of any kind.

We are left with 0.86 accuracy on a dataset of four labelled patterns. The treatment of the remaining hours is unstated, and there is no always-Doji floor against which to judge the score.