PatternX research · Pre-registered — data not yet analysed
Cup and Handle Across Crypto Markets
By the PatternX team · Published
Research question
Do the outcomes of PatternX's production cup and handle detections, replayed on completed bars and measured as the share that reach the cup-depth target before the handle-low stop and as net R-multiples, differ between crypto market segments: BTC and ETH versus other actively traded coins, one exchange versus another for the same coins, and perpetual futures versus spot markets?
No results yet. This page publishes the study design before any data is analysed, so the method can’t be adjusted to fit the outcome. Results will appear here — with sample size, period and confidence intervals — once the analysis is complete.
| Markets | Crypto only. Liquidity tiers on Binance USDT-margined perpetuals, re-ranked monthly by trailing 30-day volume: BTC and ETH; the other coins in the top 20; and those ranked 21 to 50. Venue contrast: the same coins on Bybit and OKX perpetuals. Spot contrast: BTC and ETH on Bitstamp and Gemini. |
|---|---|
| Timeframes | All eight PatternX timeframes (1m to 1d) are replayed; the three pre-specified contrasts use 1h and 4h, where an 80-bar cup spans days rather than hours. |
| Period | To be fixed before analysis |
| Sample size | Reported with the results |
| Data source | PatternX's deterministic detectors replayed over historical exchange candles, using the production rules |
Methodology
This is a pre-registered design: the segments, contrasts and tests below are fixed before any cup and handle outcome is computed, and any deviation will be published with the results.
- Replay. Each series is stepped bar by bar through the production CUP_AND_HANDLE detector, which receives the 200 most recent bars ending at bar t; bar t must already be complete. The detector's swing highs need three bars on each side, so a rim becomes usable three bars after it forms. Because the detector never sees bars after t, the replay inherits that delay exactly as a live scan does. Tier ranks for each month use only the previous 30 days.
- Filters. Breakout direction, the 1.2× breakout-volume rule, ATR% ≥ 0.05 and the reward:risk floor of 1 apply as in production. Spread, order-book and liquidity-score filters stay neutral, because candles cannot reconstruct them.
- Simulation and costs. Entry at the next bar's open plus 0.03% slippage; exits at the frozen stop or target less 0.03%, or at the open when a bar gaps through; a bar touching both levels is a stop. Fees are 0.05% per side on every venue. Funding of 0.01% per 8 hours is charged on perpetuals only; unlike the in-app backtest, which always charges it, spot trades pay none.
- Matched controls. Each detection gets ten random long entries on the same series and in the same month, with identical stop and target distances. Segments are compared on excess R (detection minus control), so a segment that simply rose more during the period does not look better for that reason.
- Cross-venue events. Arbitrage keeps prices on large venues close, so a cup on BTC tends to form on several exchanges at once. The venue contrast therefore uses matched events: the same coin and timeframe detected within one bar on two venues. Detections found on one venue only are counted, as a measure of how sensitive the detector is to venue data.
- Splits and statistics. One calendar cut leaves the first 70% in-sample and the last 30% out-of-sample. The three contrasts (tier, venue, perpetual versus spot) are tested once, out-of-sample, two-sided at the 5% level after Holm adjustment. Hit rates carry 95% Wilson intervals; mean, median and percentiles of net R carry week-block bootstrap intervals; R histograms are shown per segment and per calendar year. All other cuts are exploratory and labelled as such.
- Reproducibility. Results carry the detector's commit, a hash of every detector, filter and cost parameter, per-venue candle checksums and the bootstrap seed.
How success is defined
Primary outcome. A detection succeeds when price reaches the target before the stop within 80 bars of entry, the length of the detector's own window.
- Target: the entry reference (the signal bar's closing price) plus the cup depth, the distance from the rim to the cup low.
- Stop: the handle low, with production's 0.2% buffer.
- Ties and time-outs: a bar touching both levels counts as a stop. If neither is reached within 80 bars, the trade closes at that bar's closing price and is not a success.
Net R-multiple. R is the distance from the entry fill to the stop. The result in R is the net profit or loss after fees, slippage and, for perpetuals, funding, divided by R.
Quantity compared between segments. For each contrast, the difference in mean excess R (detection minus matched control) between the two segments, with a 95% bootstrap interval. The difference in hit rate is reported beside it, together with each segment's matched-control hit rate.
Secondary outcomes.
- Production defaults: target at the nearer of +10% and the cup depth, stop at the tighter of −5% and the buffered handle low, reward:risk below 1 dropped. Cup depths of up to 50% are allowed, so the measured-move target can sit far beyond the 10% default; this shows how much the cap changes outcomes.
- Cross-venue agreement: the share of detections with a matching detection on another venue within one bar.
- Excursions: maximum favourable and adverse excursion within 80 bars, in R.
Sensitivity. Horizons of 40 and 160 bars; a stop without the 0.2% buffer; doubled fees and slippage.
Pattern and strategy criteria
Production rules for CUP_AND_HANDLE, a bullish pattern PatternX trades long. The cup and handle page explains the shape.
- Window: the detector reads the last 80 bars. A cup that began earlier is not seen.
- Swing points: a bar is a swing high when its high is the highest within three bars on either side, so swing points are confirmed three bars late.
- Left rim: the highest swing high in the first half of the 80-bar window.
- Cup low: at least 5 bars after the left rim; cup depth between 2% and 50% of the rim price.
- Right rim: at least 97% of the left rim, and at least 3 bars after the cup low.
- Handle: at least 2 bars, with a low no deeper than 50% of the cup depth.
- Breakout: a fresh close above 0.999 × the rim on the latest bar.
- Levels: stop at the handle low; target at entry plus the cup depth. Live trading then applies the user's take-profit and stop-loss limits and drops setups with reward:risk below 1.
- Universal filters: the breakout candle's close in the trade direction; breakout-bar volume ≥ 1.2× the 20-bar average; ATR% ≥ 0.05; liquidity score ≥ 30; spread ≤ 0.25%; order-book imbalance against the trade no worse than −0.5; 24-hour volume ≥ $3M on crypto venues.
- Not part of the rule: no cup-specific volume test and no prior-trend requirement. The geometry score is capped at 85, and the detector returns at most one match per scan.
In this replay, the geometric, breakout and level rules run unchanged, together with the direction, volume, ATR% and reward:risk filters; liquidity score, spread and order-book imbalance are neutral. How the detectors behave on perpetual contracts generally is covered in perpetual futures pattern trading.
Exclusions
- Instruments without a meaningful chart: stablecoins, other pegged or wrapped assets, leveraged tokens and index contracts.
- Liquidity floor: detections where the trailing 24 hours of candle volume, valued at closing prices, is below $3M, approximating production's 24-hour volume rule.
- New and changing contracts: a contract's first 7 days after listing; bars around redenominations or contract-size changes; any period after a delisting notice.
- Spot scope: the spot contrast is limited to BTC and ETH, fixed in advance so that the spot and perpetual sets hold the same coins.
- Timestamp mismatches: venues whose candles cannot be aligned to common UTC bar boundaries are left out of the venue contrast.
- Overlap: one open cup and handle trade per series; later detections on that series are skipped until it resolves, and counted.
- Data faults: missing bars inside the 200-bar window or the 80-bar outcome window, zero-volume bars, and venue outages.
- Untradeable or censored: detections whose next bar opens beyond a level, and detections fewer than 80 bars before the end of the data. Both are counted and reported.
Limitations
- The detector's cup, not the textbook's. Cups wider than 80 bars are invisible to the detector, so on daily charts the study covers only cups that form within 80 days. Conclusions apply to this definition, not to every shape a chartist would call a cup.
- Venues are not independent markets. Because arbitrage ties their prices together, venue differences will mostly reflect how each venue builds candles and reports volume rather than different price action.
- A narrow spot comparison. Two spot venues and two coins. Spot volumes differ from perpetual volumes, so the 1.2× volume rule and the 24-hour floor interact differently with their data.
- Lower tiers churn. Ranks 21–50 change often and can include coins that were later delisted. If a venue no longer serves their candles, the lowest tier tilts toward survivors.
- Correlation with BTC. Most coins move with BTC, so detections in different tiers often fall in the same market swings. Matched controls and week-block resampling reduce this dependence but do not remove it.
- Replay versus live. Completed bars only, neutral market context, and no scan interval, approval delay, signal expiry or risk engine.
- Flat costs. One fee and slippage schedule for every venue and tier; real costs differ by venue, account tier, liquidity and market conditions, and real funding varies.
- Period dependence. Crypto market structure has changed quickly over a short history, so segment differences found in one period may not persist. How outcomes change with bar size is covered by the timeframe study.