r/algotradingcrypto • • 18h ago

Does your crypto bot trade the same way on weekends?

3 Upvotes

Weekends in crypto can feel like a different market. Order books get thinner, spreads can widen, and BTC sometimes drifts into a level that becomes a CME gap by Monday.

Curious how people handle this with bots:

  • Same rules all week, or separate settings for Saturday and Sunday?
  • Smaller size, wider stops, or just switch it off?
  • If you backtest, do you split the results into weekday and weekend?

Would like to hear what actually changed once you looked at it.


r/algotradingcrypto • • 17h ago

I tested 3 textbook 5m crypto spot rules across 10,000 Binance candles on BTC, ETH & SOL with 2x slippage — 0 of 9 survived (open-source reproducer + Bonferroni calculator)

2 Upvotes

Every week someone posts a 5-minute crypto breakout or EMA pullback backtest showing a smooth equity curve. Almost every time, two things are missing: realistic round-trip execution friction and a strict out-of-sample holdout with zero parameter tuning.

I froze 3 standard 5m spot-long rules with zero post-hoc optimization and ran them head-to-head across 10,000 closed 5m Binance candles (~35 days: warm-up + 20-day development reference + 10-day blind holdout) on BTCUSDT, ETHUSDT, and SOLUSDT.

Frozen Rules & Cost Model

  1. 20-Bar Breakout (Control): 5m close > 20-bar high on >= 1.5x 20-bar volume, EMA20 > EMA50 rising.
  2. Post-Breakout Retest: Within 60m after breakout, price pulls back to [-0.5 ATR, +0.25 ATR] of breakout level and reclaims it on a green bar.
  3. EMA20 Trend Pullback: Pullback <= EMA20 within 1 ATR in rising trend, reclaiming on green bar (>= 1.0x volume).
  • Fees & Slippage: 0.10% taker fee + 0.05% baseline slippage per side (0.30% round-trip), stressed at 2x slippage (0.10% per side = 0.40% round-trip).
  • Exits: Structural stop (0.4%–2.5% risk), net 2R target, 6h max hold. No parameter optimization.

10-Day Blind Holdout Results (Verified Across 9 Symbol x Rule Cells)

SymbolStrategyHoldout TradesWin Rate1x Slip Mean Net2x Slip Mean NetVerdict
BTCUSDT20-Bar Breakout825.0%-0.251%-0.351%Negative + low N
BTCUSDTPost-Breakout Retest250.0%-0.244%-0.344%Insufficient sample
BTCUSDTEMA20 Pullback633.3%+0.030%-0.070%Flips negative at 2x
ETHUSDTAll 3 rules combined22—-0.052% to -0.174%-0.152% to -0.274%All negative
SOLUSDTAll 3 rules combined21—-0.056% to -0.193%-0.156% to -0.293%All negative

Three Findings Worth Remembering Before Deploying 5m Trend Bots

  1. The margin is thinner than 1 bps of slippage: Only BTC EMA20 Pullback stayed barely positive (+0.030% / trade), and doubling slippage by 0.05% flipped it negative (-0.070%).
  2. Sample starvation on strict filters: Even across 10,000 closed 5m bars, 8 of 9 cells failed to reach >=30 closed holdout trades.
  3. Multi-pair scanning inflates luck (m * 0.05): Scanning 100 coins at a naive 95% cutoff yields ~5 lucky "winners" by chance alone unless you apply Bonferroni tightening (1 - 0.05/m = 99.95%).

Free interactive tools to reproduce or test your own numbers (zero login, zero API keys, zero custody):

Full zero-dependency Node.js reproduction script & MCP server (MIT, run npm run reproduce locally): https://github.com/574710939lb-design/holdoutradar-mcp


r/algotradingcrypto • • 1d ago

Any experience selling bots or algos?

0 Upvotes

Hello all,

I have been developing deterministic logic engines for a few years and have found some success building out software that trades crypto with a reliable, statistically significant edge. In preparation for an eventual IP sale I have also been keeping meticulous databases and have been accumulating soak time on my project. I feel that I now have a compelling package for a private individual or quant desk sale.

Does anyone know where I can advertise my software or how I can connect with parties who may be interested in purchasing my IP? Thanks in advance for any help!


r/algotradingcrypto • • 1d ago

Any webhook trading options left for EU users?

1 Upvotes

Hey everyone! ☺️

I used to do algo trading on Bybit, connecting my TradingView Pine Script strategies to the exchange via webhooks. But it looks like this is no longer available to EU customers on Bybit or other MiCA-regulated exchanges. 😒

Ideally, I’d like to connect my Pine Script strategy directly to an exchange without relying on third-party services. I’ve already tried OKX Europe futures and Bybit EU, but neither offers native webhook integration for my account.
Are there any exchanges that still offer this to EU customers? If not, what alternatives, including third-party services, would you recommend?

Thanks in advance for your help❣️


r/algotradingcrypto • • 1d ago

Crypto falls together and rises apart: Hong, Tu & Zhou's asymmetry test on 20 altcoins and BTC–Nasdaq, and the spot ETF didn't change it (pre-registered)

1 Upvotes

- The question: do altcoins move with BTC as much on the way up as on the way down? Hong, Tu & Zhou (2006, "Asymmetries in Stock Returns") give a clean way to ask it: compare the correlation on days when both went up with the correlation on days when both went down.

- Altcoins vs BTC (2021–Oct 2026, daily): on shared down days the median correlation is 0.72. On shared up days it's 0.41. All 20 coins lean the same way, and the test rejects symmetry for 19 of them (THETA is the exception, p 0.08).

- BTC vs Nasdaq-100 (2019–Oct 2026): 0.36 on shared down days, 0.10 on shared up days (p 0.04). The direction holds in 6 of 8 calendar years, but the significance depends on 2022, and the gap halves without 2020 and 2022.

- The spot ETF (locked test): one year before vs one year after Jan 11, 2024, the gap didn't change beyond ordinary year-to-year swings. Altcoins went from −0.26 to −0.26, BTC–Nasdaq from −0.10 to −0.00 (+0.5 sd from typical). Power was limited, and I said so before running.

- Side check (not pre-registered): the gap is in the sensitivity. Altcoins fall 1.32× BTC's move on BTC's down days and rise 0.81× on its up days. BTC's move size is the same on both sides, and so is the coins' own noise.

The measure

For two return series, standardized within the window:

- ρ⁺ = correlation on the days both returns were above their average (roughly: both up)

- ρ⁻ = correlation on the days both were below their average (roughly: both down)

Looking at only part of the data lowers a correlation. ETH's full-sample correlation with BTC is 0.82, while its ρ⁺ is 0.61 and its ρ⁻ is 0.84. So you can't compare ρ⁺ or ρ⁻ with an ordinary correlation. The paper's point is that the slicing lowers both sides equally when the distribution is symmetric, so **ρ⁺ = ρ⁻ under symmetry**, and the gap Δ = ρ⁺ − ρ⁻ is a fair comparison. Negative Δ means falling together more than rising together. Their test (a J statistic with a Bartlett-kernel variance) needs no model of the returns.

A lesson about the test itself. Before running anything real, I ran the test on simulated data that is symmetric by construction, where a 5% test should reject 5% of the time. My first version of the variance estimate, using a small-sample weighting, rejected 12.5% of the time, and 7.5% with volatility clustering. The paper's basic formula rejected 1.7–3.5% (0.5% with clustering). That's on the cautious side and close to the ~2% the paper reports in its own simulations. It still caught a clear asymmetry (0.85 vs 0.35, 400 days) 94% of the time. I used the basic one. If I'd skipped the simulation, the 19/20 count would have been inflated, and I wouldn't have known.

Setup

- Data: Binance spot, daily UTC closes from 4h candles, log returns. 20 altcoins with uninterrupted data since 2020 (ETH, BNB, XRP, ADA, DOGE, LINK, LTC, ATOM, ETC, TRX, BCH, HBAR, XLM, ALGO, VET, CHZ, THETA, NEO, KAVA, ZEC). For the Nasdaq comparison, BTC is taken at 20:00 UTC (the NY close in summer, an hour early in winter) against the Nasdaq-100 close from FRED.

- ETF windows: one year before vs one year after Jan 11, 2024 (the first day of spot ETF trading), the same windows as my earlier ETF post.

- Reference ("typical"): the same before/after comparison at every month start whose two windows don't touch the ETF years: 34 dates for the altcoins, 58 for BTC–Nasdaq. "sd from typical" = (ETF value − mean of those) / their sd.

- Locked in advance: the statistic, the panel, the ±2 sd gates (for the altcoins also "at least 60% of coins move the same way"), a power check, and both my research partner's prediction and mine. The full-period numbers were listed as descriptive.

Results

Full period (descriptive):

| | shared up days ρ⁺ | shared down days ρ⁻ | Δ | symmetry rejected (5%) |

| 20 altcoins vs BTC, 2021–Oct 2026 (median) | 0.41 | 0.72 | −0.28 | 19 of 20, all down-leaning |

| BTC vs Nasdaq-100, 2019–Oct 2026 | 0.10 | 0.36 | −0.25 | p 0.04 |

The most lopsided are HBAR (0.29 vs 0.67), XRP and XLM. The least lopsided are THETA, VET and NEO, but even they sit at about −0.2.

The ETF (locked):

| | Δ before → after | vs typical | verdict |

| Altcoins vs BTC (median of 20) | −0.26 → −0.26 | −1.1 sd | no change shown |

| BTC vs Nasdaq-100 | −0.10 → −0.00 | +0.5 sd | no change shown |

In the single-year windows the test rejected symmetry for 9 of 20 coins before the ETF and 6 of 20 after, all down-leaning. One year is about 250–365 days, so fewer rejections are expected. The size of the gap didn't change. BTC–Nasdaq looks more symmetric after the ETF, but a move that size is ordinary for this pair. At 80% power, the test could only have detected a shift of about 0.26 for the altcoins and 0.51 for BTC–Nasdaq.

Side checks (after the result, not pre-registered)

Where does the gap come from? I split days by BTC's direction only and fit a slope on each side (median of 20 coins):

| | BTC up days | BTC down days |

| spread of BTC's daily move (sd) | 2.2% | 2.2% |

| altcoin sensitivity to BTC (beta) | 0.81 | 1.32 |

| altcoins' own noise (residual sd) | 3.8% | 3.9% |

| correlation | 0.42 | 0.58 |

The gap isn't BTC moving more on down days, and it isn't up days being full of coin-specific pumps (up-day residuals are more right-skewed, but no bigger). It's the slope. Down beta is higher for all 20 coins, and in every calendar year from 2021 to 2025 (19–20 of 20 coins). 2026 so far is weaker (11 of 20). Dropping any single year leaves the median Δ between −0.23 and −0.30, still negative for all 20 coins.

BTC–Nasdaq is more fragile. The biggest shared-down days are March 2020 and May–June 2022. Without 2022, Δ is −0.22 but p rises to 0.15. Without both 2020 and 2022, Δ is −0.12 (p 0.12). The yearly Δ is negative in 6 of 8 years, about −0.35 in 2019 and 2020 and −0.06 to −0.14 in the other negative years. So "BTC crashes with tech stocks but doesn't rally with them" is a fair description of the whole period, and it rests mostly on two stress episodes.

Limits

- The test asks whether the joint distribution is symmetric. It doesn't say why. A higher down beta fits forced selling, deleveraging or shared liquidity, but nothing here tests those.

- The 20 coins share the same market episodes, so 19 of 20 isn't 19 independent results. It's one strong pattern that shows up coin by coin.

- c = 0 only. I'd also listed a multi-threshold version (0, 0.5, 1, 1.5 sd) as descriptive, but in one-year windows the higher thresholds have fewer than 10 shared days.

- One event, one year on each side. 2024 also had the halving and the start of rate cuts.

- Predictions: my research partner expected both pairs to become more symmetric after the ETF (the BTC–Nasdaq direction was right, the size wasn't unusual). I expected "no change shown" for both (0.75 and 0.85).

Takeaways

- An ordinary correlation between altcoins and BTC hides the asymmetry. On BTC's down days altcoins move with it far more tightly (0.72) than on its up days (0.41).

- Holding several altcoins diversifies less on down days than the average correlation suggests. This describes the past and isn't a forecast.

- The spot ETF didn't measurably change this, at least not by an amount a one-year window can detect.

- Run your test on fake data where you know the answer before you trust its p-values.

Curious whether others see the same down-beta gap in perps or at intraday horizons. And is there a clean way to separate "forced selling" from "shared information" as the cause?


r/algotradingcrypto • • 2d ago

Which part of your crypto trading do you automate first: entries, exits, or neither?

Post image
2 Upvotes

An alert can tell you when to enter. It won’t decide how much to buy, where to take partial profits, or what to do if the trade goes against you. Those are rules you have to set yourself.

Disclosure: This is a post from QuenTrade. We built it to let traders automate one part of their workflow without handing over the whole strategy:

• Signal Bot turns TradingView alerts or custom webhooks into orders.

• SmartTrade lets you plan partial take-profits and stop-loss rules for one trade.

• DCA Bot adds to a position at configured levels. GRID Bot places buy and sell orders across a price range.

• Terminal is for manual orders. Public Presets give you a starting configuration.

If you already run a bot, what’s one thing you still refuse to automate, and why?

Crypto trading involves risk. Automation doesn’t guarantee returns.


r/algotradingcrypto • • 2d ago

Did the spot BTC ETF change how crypto moves together? With Forbes & Rigobon's volatility correction: altcoins didn't decouple, and the BTC–Nasdaq link rose, but no more than in an ordinary year (pre-registered)

2 Upvotes

- The trap: correlation depends on how volatile the source market is. Forbes & Rigobon (2002, "No Contagion, Only Interdependence") showed that when the source gets more volatile, correlation rises even if the underlying link doesn't change. So "correlation went up after X" can be pure volatility.

- Setup: one year before vs one year after Jan 11, 2024. I measured the link itself (beta) and the volatility-adjusted correlation, and compared each with the same before/after comparison at ordinary split dates that don't overlap the ETF years.

- Altcoins vs BTC (20 coins): sensitivity to BTC didn't change (+2%, right at the typical year-to-year change). BTC's variance was 38% higher in the post-ETF year, which should have pushed correlation up. Raw correlation barely moved because altcoins' own noise rose too.

- That "own noise" signal: adjusted for BTC's volatility, correlation fell (−3.0 sd vs typical). It came from a side look, so I locked a re-test on 40 different altcoins. Same direction, same decomposition, about half the size (−1.2 sd). It didn't pass.

- BTC vs Nasdaq-100: adjusted correlation went from 0.19 to 0.34, and beta roughly doubled. That looks like "BTC became a tech stock", but changes that big are ordinary for this pair (+0.4 sd). Power was low, and I said so before running: only a jump of about 0.43 would have stood out.

- The paper's point holds in crypto: at the ordinary split dates, the volatility adjustment shrinks year-to-year correlation swings by a quarter to a third.

Why correlation alone misleads

The paper's example: Mexico's market takes 20% of each Nasdaq move, always. When the Nasdaq is calm, the correlation is 0.10. When the Nasdaq gets 10× more volatile, it's 0.71. The link never changed; only the source's volatility did. Their correction holds the source's variance fixed:

ρ = ρ* / √(1 + δ(1 − ρ*²)), where δ is the relative change in the source's variance.

Beta (how much y moves per unit of x) doesn't have this problem in their model, so it's the cleanest "link" measure. Correlation changes can then be split into three parts: the source's variance, beta, and y's own noise.

Setup

- Data: Binance spot, daily UTC closes from 4h candles, log returns. For the Nasdaq comparison, BTC is taken at 20:00 UTC (the NY close in summer; an hour early in winter). Nasdaq-100 and S&P 500 from FRED.

- Windows: one year before vs one year after Jan 11, 2024 (the first day of spot ETF trading).

- Panels: 20 altcoins with uninterrupted data since 2020 (ETH, BNB, XRP, ADA, DOGE, LINK, LTC and others). The replication used 40 different coins chosen by a fixed rule (data since mid-2021, top 40 by turnover, none from the first test).

- Reference ("typical"):the same statistic at every month start whose two windows don't touch the ETF years: 34 dates for the altcoin panel, 17 for the replication panel, 58 for BTC–Nasdaq. "sd from typical" = (ETF value − mean of those) / their sd. Every before/after comparison shows *some* change, so the ETF has to stand out from ordinary years, not from zero.

- Locked in advance: statistics, panels, the ±2 sd gates, a power check, and both my research partner's prediction and mine.

Results

| | before → after | vs typical | verdict |

| Altcoin beta on BTC (median, 20 coins) | +2% | 0.0 sd | no change shown |

| Volatility-adjusted correlation, same coins (side look) | −0.075 | −3.0 sd | candidate |

| Same, 40 other altcoins (locked re-test) | −0.041 | −1.2 sd; 72% of coins down | not replicated |

| BTC–Nasdaq-100, volatility-adjusted correlation | 0.19 → 0.34 | +0.4 sd | no change shown |

What moved inside the altcoin correlation (median, both panels look alike): higher BTC volatility added about +0.06, altcoins' own noise subtracted about −0.06 to −0.09, and beta added almost nothing (+0.01). So the raw correlation stayed flat for two opposite reasons.

BTC–Nasdaq: the S&P 500 and two-day returns tell the same story (+0.20 to +0.21). The direction is up. The size is what this pair does in a normal year. Think of 2020, or 2022.

Limits

- One event, one year on each side. 2024 also had the halving and the start of rate cuts, so even a clear change couldn't be pinned on the ETF alone.

- The coins in each panel share the same market episodes, so 20 or 40 coins aren't 20 or 40 independent tests.

- The correction assumes no common shock and no feedback between markets. Crypto has a strong common factor, and the paper itself says the correction overcorrects when there's feedback. That's one more reason to treat the −3.0 sd as a side look and not a finding.

- Daily closes, spot only. For the Nasdaq comparison BTC is taken at 20:00 UTC, an hour before the Nasdaq close in winter.

- **Predictions:** my research partner expected a stronger link in both questions (the Nasdaq direction was right, the size wasn't unusual) and expected the re-test to replicate. I expected "no change shown" for both (0.60 and 0.75) and gave the re-test 0.35.

Takeaways

- "Altcoins decoupled from BTC after the ETF": not in sensitivity. They react to BTC as much as before.

- "BTC became a tech stock after the ETF": the link did rise, but by an amount this pair often moves in a year. One event can't settle it.

- If you compare correlations across a calm and a volatile period, adjust for the source's volatility first, or compare betas.

Curious how others would identify this better. For BTC–equities, would event days (FOMC, CPI) give a cleaner test than calendar years? And for altcoins, is there a good way to separate "own noise" from a common shock the model can't see?


r/algotradingcrypto • • 2d ago

The honest math on prop pass rates: why buying 10 accounts doesn't stack your odds, and the only lever that actually works

0 Upvotes

I got tired of the "I passed in 3 days" screenshots and the "just buy 10 accounts bro" advice, so I built a Monte Carlo simulator and ran ~80k paths on a real strategy (a diversified trend book, Sharpe ~0.7, 12% vol — nothing exotic). FundedNext Stellar 1-Step box (10% target / 3% daily / 6% max loss, static DD). Here's what actually held up.

1. The base rates are brutal and worth repeating. Across ~100k traders in the public data: ~14% ever get funded, ~7% ever receive a single payout. That's the pool you're competing in.

2. Single-attempt pass probability is capped by your edge — you can't size your way around it. At Sharpe ~0.7 a single honest attempt lands ~45–60% depending on sizing. Getting to 90% in one attempt would need a Sharpe around 2.5, which essentially doesn't exist net of real retail costs. If someone's selling a 90% one-shot method, that's the tell.

3. "Buy 10 accounts, only need one to pass" is the lie that sounds like math. 1−(1−p)^N only works if the attempts are independent. Run the same strategy across 10 accounts in the same week and they see the same market — they pass or blow up together. Ten correlated accounts ≈ the odds of one (and most firms ban cloned/copy-traded accounts anyway). The math only stacks if the attempts are in different time windows (sequential) or genuinely uncorrelated strategies.

4. The one lever that genuinely helps: a hard daily stop. This surprised me. If you cap each day's loss at a fixed small amount (I used ~60% of the daily limit, so ~−1.8%/day) but let winning days run, your daily P&L becomes convex — small capped losses, uncapped gains. A breach then requires ~4 capped down-days in a row, while a pass needs one or two good days. In the model, that lets you size up and a single attempt climbs to ~84% in a median ~15 trading days.

5. Here's the part I want people to poke holes in — that 84% is an UPPER BOUND. The sim runs on daily bars, so it assumes you halt perfectly at your stop. Reality = gaps, slippage, overnight moves that blow straight through it. The higher the leverage, the more optimistic the model gets — i.e., the number looks best exactly where it's least trustworthy. My honest discount puts the real figure closer to ~70%.

What I actually concluded works:

  • Sane leverage (~3–4×) + a real, enforced daily stop.
  • Sequential attempts, not parallel clones — trade one, stop the moment you're funded. Two independent tries ≈ ~90%, three ≈ ~97%, expected cost ~$680 because you usually don't need more than one or two.
  • Pick static-drawdown, no-consistency-rule boxes (trailing DD cuts pass rates 30–40%).

Methodology, for anyone who wants to tear it apart: fixed-block bootstrap of daily returns (preserves drawdown clustering), per-path check of daily-loss and max-DD breach vs the box, target = +10% with the min-trading-days rule, 40–80k paths. Biggest known weakness is the daily-bar resolution (no intraday path), which makes every pass-prob an optimistic ceiling.

Genuinely curious where others land on two things:

  • Has anyone with intraday fill data measured how much a daily stop actually degrades once you account for slippage/gaps?
  • For those who've passed multiple accounts — did you actually run them decorrelated/staggered, or same-strategy-same-window (and did the firm flag it)?

r/algotradingcrypto • • 3d ago

My frozen flow-vs-depth curve failed live on all 7 perps. My research partner said "the curve itself moved, refit it on the last few weeks." The rolling version passed 17/17 in the archive and 2 of 3 live (pre-registered)

Thumbnail bitdataview.com
1 Upvotes

- The curve: for each minute on a Binance perp, φ = net taker flow ÷ the book depth within 0.2% on that side. The curve gives the chance that the minute's extreme reaches 0.2% in the flow's direction. It comes from my hidden-liquidity post.

- Frozen, it broke. Fit once on Jan 15 – Jun 8, 2026, then checked live on Nov 3–17: **0 of 7 perps calibrated.** In the low bins, breaks came 1.2–3.2× as often as it said.

- It wasn't our depth feed. Swapping our live depth for the archive's own snapshots gave the same failure on all 7, with almost the same errors. The curve had shifted.

- My partner's fix: refit every week on the previous 4 weeks, then forecast the next week. In a locked archive test it passed **17 of 17** (frozen: 12 of 17), and **14 of 17** since October (frozen: 6 of 17).

- Live, locked before the first row: two weeks on the 3 perps that passed everything. **APT and NEAR pass, ETC fails.** ETC breaks more often than the rolling curve says.

The curve

From the earlier post. Data: data.binance.vision USDT-M perps, 30-second book snapshots (the ±0.2% level exists from Jan 15, 2026) and 1-minute candles.

- Per minute: φ = net taker flow ÷ depth within 0.2% on the flow's side, at the start of the minute.

- Outcome: did the minute's extreme reach 0.2% in the flow's direction?

- Fit: a probit with a floor, since some breaks come from news rather than flow.

- Calibration check: minutes with φ ≥ 0.1, grouped by the curve's *forecast probability* into bins with edges 0.05 / 0.10 / 0.20 / 0.40 / 0.60 / 0.80 / 1.00. Only bins with at least 100 minutes count. A perp **passes** with ≥ 3 filled bins, mean bin error ≤ 0.05 and largest error ≤ 0.10. (The bins are forecast probabilities, not φ, which is why a 0.05–0.10 bin can appear even though every minute has φ ≥ 0.1.)

What it is and isn't.It's a same-minute association: how often a minute with this much one-sided flow, relative to the book, also moved 0.2%. Readers pointed out last time that much of a heavy minute's flow arrives *after* the break. So this is not a forecast of the next minute, and not a causal impact model.

Step 1: the frozen curve, live (locked Nov 19, before any live row was read)

7 perps (APT, SOL, UNI, NEAR, XRP, DOT, ETC), Nov 3–17. BTC was left out because our live snapshot doesn't reach ±0.2% on its book. Two questions:

- Does our live depth match the archive's definition? 5 of 7 perps matched within the locked tolerance (UNI and DOT didn't).

- Is the frozen curve calibrated live? 0 of 7. Mean bin errors ran from 0.065 (ETC) to 0.24 (SOL). Every filled bin of every perp missed the same way: more breaks than forecast.

- Control: the same minutes with the archive's snapshots instead of our live depth also failed 7 of 7, with nearly identical errors. So the failure wasn't our feed.

Predictions: I gave the live calibration 30%. My co-researcher didn't give one.

Step 2: the rolling curve, archive (locked Nov 19)

My co-researcher's sentence that day: "The curve itself has shifted. Can we refit it on the last few weeks and forecast the next one?"

- Method: for every test week from Mar 2, refit the same model on the previous 4 weeks (at least 200 minutes with φ ≥ 0.1 and 10 breaks), then forecast that week. The 8-week window was secondary, and the frozen curve was scored on the same minutes.

- Data: 17 perps, Jan 15 – Oct 31, plus 9 perps for Nov 3–17. Sep 3–11 was dropped, when the archive's ±0.2% depth is visibly broken.

| | passes, whole period | passes, since Oct 1 | median mean bin error (whole / since Oct) |

| **rolling, 4 weeks** | **17 / 17** | **14 / 17** | **0.015 / 0.031** |

| rolling, 8 weeks | 16 / 17 | 12 / 17 | 0.020 / 0.033 |

| frozen | 12 / 17 | 6 / 17 | 0.030 / 0.060 |

The frozen curve's 12 of 17 is flattered: its fit window (Jan 15 – Jun 8) overlaps the test weeks up to June. Since October there's no overlap, and it passes 6 of 17.

Predictions: me "rolling calibrated" 35%, "partly" 40%. My co-researcher: "let's do it."

Step 3: the rolling curve, live (locked Nov 19, before the job wrote a single row)

- Perps: the 3 that passed the archive test in both periods *and* matched our live depth: APT, NEAR, ETC.

- Chain: every Monday 06:00 UTC, a refit on the last 28 days of archive data. Every hour, a forecast for each minute of the previous hour, from live depth and live 1-minute candles.

- Window: Nov 19 – Dec 3 00:00 UTC: 328 hours, three parameter versions.

| perp | verdict | mean bin error | largest | filled bins | minutes with φ ≥ 0.1 |

| APT | **pass** | 0.024 | 0.051 | 5 | 3,785 |

| NEAR | **pass** | 0.017 | 0.026 | 5 | 7,946 |

| ETC | fail | 0.091 | 0.144 | 4 | 1,864 |

ETC is under-forecast in most bins: 0.48 forecast vs 0.61 observed in the 0.40–0.60 forecast bin, and 0.09 vs 0.23 in the 0.05–0.10 forecast bin. In training it also had relatively few minutes with φ ≥ 0.1 and a fit that leaned hard on depth. Whether the miss comes from parameters lagging or from noise in live depth is still open.

Predictions: I first put ETC at 50%. My co-researcher called a 50% a dodge (fair), so I sharpened all three before reading a row: APT 60%, NEAR 60%, ETC 35%. All three landed. My co-researcher didn't give one.

What happens with it

- Product: our depth card can now show, for APT and NEAR only, how often recently a minute with a given flow-to-depth ratio also moved 0.2%. It would be labeled as the perp book and described as a recent frequency, not as the effect of placing an order. Not for ETC.

- The bigger lesson: a curve that passed in the archive can still break live, and here the fix was refitting on recent data, not a richer model.

- Same caveat as before: this is about microstructure, not a strategy.

Limits

- Two live weeks, three perps, one exchange. Each perp's top bins hold only 130–1,100 minutes.

- The three live perps were chosenbecause they passed everything before. Their live pass is on new data, but it says nothing about the 14 others.

- A 4-week refit lags fast regime changes by up to a week. That may be part of ETC's miss.


r/algotradingcrypto • • 3d ago

Partial fill left my Freqtrade positions without a stop for ~20 minutes. Here’s the fix I used.

1 Upvotes

Running a futures strategy live, I found two trades open 18–20 minutes with no stop. Cause: stop only placed after full fill. A limit order that fills 60% and waits leaves the filled part naked. Fix: in check_entry_timeout, cancel the unfilled remainder as soon as there’s a partial fill so the position is complete and the stop goes on immediately. Also added a fallback stop when calculation returns nothing. Happy to share the exact code if useful. How are others handling partial fills on futures?


r/algotradingcrypto • • 4d ago

How do you decide if a limit order would have filled in your backtest?

1 Upvotes

Backtesting a bot that enters with limit orders gets messy at the fill logic. If price only touches the level, did it fill or not?

Curious how you handle it:

  • Do you count a touch as a fill, or wait for price to trade through it?
  • Do you add a volume or queue check, or keep it simple?
  • How far off were the backtest fills once the bot ran live?
  • Did anyone just switch to market orders to skip the whole problem?

Not after a perfect answer, just how you deal with it.


r/algotradingcrypto • • 4d ago

Our 80% volatility band held 80% overall and 64% on Saturdays. The obvious fix got Saturday to 75% but failed one of its own locked gates (crypto, pre-registered)

Thumbnail bitdataview.com
1 Upvotes

- What:our site shows an 80% band for each coin's realized volatility tomorrow, for 144 Binance coins. Over five years of test days it holds 79.7% of the time. That number looked perfect.

- Split by the day being forecast, it isn't: Saturday 63.8%, every other day 80–85%. On Saturdays, 30% of coin-days came in *below* the band; the target is 10%.

- Weekend vs weekday:72.9% vs 82.4% pooled over all coin-days. The locked statistic, the mean weekly gap, is −10.0 points (block t −10). Same sign in 5 of 5 time slices, on both sides of the spot ETFs, and in 129 of 129 coins with at least 100 weekend test days.

- The obvious fix (day-of-week terms in the model) lifts Saturday to 75.1% and improves the forecast loss (block t 3.25). But Saturday still swings between 67% and 79% across time slices, so it failed the one locked gate that asked for stability.

- So the card is unchanged for now. Three versions now run side by side on live data until 24 March, with the decision rule written down in advance.

Why we looked

A 1992 paper on daily commodity futures (Yang & Brorsen, *American Journal of Agricultural Economics*) finds volatility differs by day of the week (higher on Mondays and after holidays). It also checks calibration separately from fit. Our card's model has no day-of-week term, and its band comes from forecast errors pooled across all days. A pooled 80% can hide one day at 64% and the others at 84%.

Crypto weekends being quieter is well known. What I wanted to know was whether that breaks a calibrated band, and where.

Setup

- The band, exactly as the live card computes it:

- The forecast is a log-HAR regression for tomorrow's realized variance (sum of squared hourly returns), using the 1-, 5- and 22-day components. It's refitted daily on the last 1,250 days, with a Duan correction.

- The band is the forecast times the 10th and 90th percentiles of *that coin's own* forecast errors over the last 365 days (at least 200 errors, all realized before the forecast day).

- The card shows the square root as a typical daily move in %. Coverage is the same either way.

- Data: the 144 coins on the card, Binance spot, test days Sep 2021 – Oct 2026, 123,605 coin-days. Days are UTC. "Saturday" means the UTC Saturday being forecast.

- Statistic: for each week, coverage on Saturday + Sunday minus coverage on Monday–Friday. 13-week block bootstrap.

- Verdict rule (locked): a "weekend deviation" needed all of the following:

- a gap of at least 5 points, with the block t past the critical value;

- the same sign in at least 4 of 5 time slices;

- the same sign before and after the spot ETFs;

- the same sign in at least 60% of coins, counting coins with at least 100 weekend test days. That's 129 of the 144. The other 15 have shorter histories. The model needs 1,250 days of data plus 200 past errors before its first band, so their test days only start between Nov 2025 and Mar 2026 (67–97 weekend days each).

- Power, checked before the lock: a placebo that labels two random *weekdays* as "weekend" each week gives a gap with sd 1.3 points.

Results

| day being forecast | Mon | Tue | Wed | Thu | Fri | Sat | Sun |

| inside the band | 80.3% | 83.7% | 84.6% | 82.0% | 81.6% | 63.8% | 82.0% |

| below (quieter than forecast) | 3.8% | 7.0% | 6.7% | 7.2% | 7.3% | 30.0% | 9.1% |

| above (louder than forecast) | 15.9% | 9.3% | 8.7% | 10.8% | 11.2% | 6.2% | 8.9% |

- Weekend − weekday, mean weekly gap: −10.0 points (t −10.0; the pooled gap is −9.5, because every week counts equally, including early weeks with fewer coins). By time slice: −11.6, −11.4, −7.4, −9.9, −9.7. Before the ETFs −10.1, after −9.9.

- It's Saturday, not the weekend. Sunday is normal (82.0%).

- **Monday misses the other way:** it has the highest share above the band of any day (15.9%).

- The same Saturday gap shows on 29 coins outside the card: 64.6% (descriptive only, not part of the lock).

Why Saturday and not Sunday

The day profile fits a simple story about the model's one-day lag:

- Saturday is forecast from Friday, a normal trading day. Saturday is quiet, so the forecast is too high and realized volatility lands below the band. On the median Saturday, realized volatility came in about 25% lower, relative to the forecast, than on the median weekday.

- Sunday is forecast from Saturday. The quiet day is already in the 1-day component, so the forecast comes down, and Sunday is quiet too. Coverage is fine.

- Monday is forecast from quiet Sunday, but Monday isn't quiet. Hence the most misses above the band.

The pooled band averages these three errors away. So does the per-coin hit rate the card shows, because it's pooled over days too.

Predictions (locked before the run):

- My co-researcher: weekend deviation.

- Me: deviation 30%, small difference 45%, equal 25%. I expected the 1-day lag to absorb most of it. It absorbs Sunday, not Saturday.

- I did call the side effects (weekend misses below the band > weekday, 85%; Monday has the most misses above, 50%). Both happened.

The fix, and why it isn't on the card

A second locked test added six dummies for the target weekday to the same log-HAR, with the same window and the same band rule. A known-answer check came first:

- on synthetic coins with a planted Saturday effect, the rule passed the fix;

- on synthetic coins without one, it rejected it (the six extra parameters cost a little forecast accuracy).

| | card | with day terms |

| Saturday coverage | 63.8% | 75.1% |

| other days | 80.3–84.6% | 79.0–81.5% |

| overall | 79.7% | 79.4% |

| mean log band width | 1.909 | 1.814 |

| forecast loss (QLIKE), card − new | | +0.0131, block t 3.25 |

Six gates, all locked. It passed five:

  1. ✓ every day 75–85% (Saturday only just: 75.1%);
  2. ✓ overall 77–83%;
  3. ✓ better forecast loss (block t ≥ 2);
  4. ✓ band no more than 5% wider (it got narrower);
  5. ✗ Saturday 75–85% in at least 4 of 5 time slices, and before and after the ETFs;
  6. ✓ at least 80% of coins at 70% or more on Saturdays, counting coins with 100+ Saturday test days (91 of the 144): 93%.

Gate 5 failed. Saturday coverage by slice: 66.9%, 71.1%, 76.2%, 79.2%, 72.6%. Before the ETFs 74.3%, after 75.2%.

What's left after the fix:

- The average shift is gone: misses below the band on Saturday fell from 30.0% to 13.1%.

- But Saturday now misses on both sides (13.1% below, 11.8% above). Saturday errors are more spread out than other days' errors, so the band should be *wider* on Saturdays, not just shifted.

- Outside the card (29 coins): Saturday went from 64.6% to 72.5%. The loss gain wasn't significant (t 0.47), and Monday got worse (80.2% → 76.1%).

My co-researcher predicted the fix would pass. I gave it 60% and named gate 5 as the most likely failure. It was.

What runs now

The fix was judged on the same coins and period where the problem was found. There is no clean holdout in this data, so the next step is live data.

From 3 December, a daily job on our server computes three 1-day bands for all 144 coins, side by side:

- old: the card as it is;

- day terms:the fix above;

- day terms + Saturday width: on Saturdays only, the band edges shift by the gap between the day-terms model's Saturday errors and its errors on all days (pooled over the 144 coins, last 365 days).

It reads the card's own data. At the opening it also checks that its "old" band matches what the card actually showed each day.

Decision rule, locked before the first record:

- A version passes if all of these hold:

- Saturday coverage is 70–90%, and at least 5 points above the old band's Saturday;

- every other day is 72–88%;

- overall is 75–85%.

- If none passes, the card stays as it is.

- If both pass, the one whose Saturday is closest to 80% wins.

- It opens on 24 March 2027 and covers about 110 forecast days, including 15 Saturdays.

The ranges are loose on purpose. With only 15 Saturdays, a few unusual dates can move Saturday coverage by several points. So this is an honesty check on new data, not proof.

Predictions: my co-researcher says day terms + Saturday width. Me: that version 45%, day terms alone 30%, neither 25%.

Until then the card shows the old band. On Saturdays it holds about 6 in 10, not 8 in 10. Swapping in a version that failed one of its own gates would trade a known error for an unchecked one.

Limits

- No clean holdout for the fix (said in the lock); the live comparison is the real test.

- UTC days only. A different day boundary could move the effect. Not tested.

- Only the 1-day band. The 5- and 20-day bands always span a weekend, so I'd expect much less there, but that's untested.

- One exchange, spot only.

What I take from it

An overall coverage of 79.7% looked perfectly calibrated, and the per-coin hit rates looked fine too. Neither was split by anything the model can't see.


r/algotradingcrypto • • 4d ago

Has anyone compared Binance Futures demo fills with what you'd really get on mainnet?

1 Upvotes

I'm about to paper trade a small strategy on the Binance Futures demo account and I'm not sure how much to trust the fills.

From what I can see, demo orders don't touch the real order book. So there's no queue position, no partial fills, and no slippage from your own size. Some demo books also look a lot deeper than the real ones on the same symbol. If that's right, the demo is basically a best case, and a strategy that only works there might not work at all.

What I'm planning to do is log the real mainnet best bid and ask at the moment each demo order fills, and compare the two afterwards. Has anyone done something like this? How big was the gap for you, and did it get worse on thinner symbols?


r/algotradingcrypto • • 4d ago

We simulated 224 Supertrend (10, 3) flips on BTC & ETH over 12 months. Here is what actually happened.

2 Upvotes

Every YouTube trading channel has a video claiming the Supertrend is an "infinite money glitch" on crypto.

We wanted to see what happens when you strip out the curve-fitting and run the classic Supertrend (10, 3) on 1-hour bars across a full 12-month window with realistic fees and conservative stop execution.

Here is the exact setup and the verified simulation numbers.

---

The Setup ("Alla Scrumptious")

* Indicator: Supertrend (ATR Period: 10, Multiplier: 3.0)

* Timeframe: 1-Hour (1H) bars

* Test Window: Oct 1, 2025 – Sep 30, 2026 (12 months)

* Entry: Long on the close of the bar where Supertrend flips from Red to Green.

* Exit Rules:

* Stop Loss: 2.5%

* Take Profit: 5.0% (1:2 Risk-to-Reward)

* Time Stop: 30 bars max hold (exits at market close if neither TP nor SL is hit)

* Realism & Friction Model:

* Crypto Fee: 0.10% per trade (round-trip friction)

* Equity Fee: 0.05%

* Conservative Intra-Bar Ordering: If both SL and TP price levels are touched within the same bar, SL is evaluated first.

---

The Results [SIM]

| Asset | Timeframe | Closed Setups | Win Rate | Profit Factor | Net Move % | Max Drawdown |

| :--- | :--- | :--- | :--- | :--- | :--- | :--- |

| BTCUSDT | 1H | 112 | 44.6% | 0.96 | -6.9% | -27.0% |

| ETHUSDT | 1H | 112 | 41.1% | 0.95 | -10.0% | -27.8% |

| SPY (Control) | 1H | 28 | 46.4% | 0.66 | -8.8% | -13.5% |

| AAPL (Control) | 1H | 24 | 58.3% | 1.91 | +18.4% | -11.5% |

---

Key Takeaways

  1. Crypto Chop Kills Trend-Following Flips: Across 224 total setups on BTC and ETH, the strategy lost money (Profit Factor < 1.0 on both) and suffered brutal ~27% drawdowns.
  2. Lag Into Exhaustion: Because the Supertrend requires a 3× ATR move before flipping green, the entry often fires after a massive expansion candle — right into local liquidity exhaustion, triggering the 2.5% stop on the subsequent pullback.
  3. Equities Behave Differently: On an individual trending equity (AAPL), the same parameters produced a 58.3% win rate and a 1.91 profit factor (+18.4% net move). Strong institutional momentum trends follow through; crypto mean-reversion ranges chop it to pieces.

If you trade Supertrend flips on crypto, you need a regime filter (e.g. ADX > 25 or higher-timeframe EMA alignment) before taking raw signals.

What rules or filters do you use to stop indicator flip whipsaws?

Edits: Ran the experiment on a completely fresh, out-of-sample year (calendar 2024 on Binance 1H klines) and benchmarked against 300 Monte Carlo random-entry runs with the exact same exits (2.5% SL, 5% TP, 30h max hold, 0.10% fees, SL evaluated first).

Here’s what happened:

  1. Raw Flips vs Random Entries:
  • BTCUSDT Raw Flips: 96 setups, 43.8% WR, 0.81 PF, -21.3% net move, -30.5% MaxDD.
  • BTCUSDT Random Entry Baseline: ~98 setups, 47.3% WR, 1.06 PF, -21.9% MaxDD.

Raw flips literally underperformed random entries. Buying a 3× ATR expansion candle into resistance consistently gets penalized by the stop.

2. Testing Candidate Rules Out-of-Sample:

  • 200 EMA Filter (Price > 200 EMA): Cut the trade count nearly in half (54 on BTC, 50 on ETH). On BTC, MaxDD dropped from -30.5% to -9.5% (PF 1.06). On ETH, Win Rate jumped from 47.9% to 60.0% and flipped net return from -7.2% to +32.7% (PF 1.69).
  • First Retest Entry (Structural Stop): Dropped trades to ~30. On BTC, it generated a 1.40 PF with just a 7.4% max drawdown by anchoring the stop to the Supertrend line instead of a static 2.5%.
  • ADX > 25: Virtually useless (PF 0.78 on BTC, 0.99 on ETH). By the time the Supertrend flips, ADX is already elevated.

r/algotradingcrypto • • 5d ago

How do you size a basket when half the names have almost no book?

1 Upvotes

I'm testing a small long-short basket across a few dozen thin instruments. Some of them have maybe 15–20k on each side within half a percent of mid, and a few are worse than that.

What I can't decide is how to size it. If I size by the thinnest name, the whole basket ends up tiny. If I size by average depth, the thin ones get hit on every entry and exit, and that slippage probably eats whatever the edge is.

Depth also isn't symmetric. The bid side can be twice the ask side on the same name, and it flips around during the day. Do you size each leg by the side you actually trade, or use some average and live with the error?

If you've run anything on thin books for real, I'd like to hear how far live slippage ended up from what you planned.


r/algotradingcrypto • • 5d ago

Crypto.com US Perps: API

1 Upvotes

UPDATE: Solved, thanks all for the help
Turns out perp instrument names are in the form XXX-YYY-PERP (SOL-USD-PERP rather than SOLUSD-PERP, as the documentation led me to believe). I actually CAN access those via the public instrument endpoint but you need to append the query string: https://api.crypto.com/fcm/v1/public/get-instruments?inst_type=PERPETUAL_SWAP

Hi all, I've been trying to execute buy/sells for US crypto perps via API. I can trade on the web UI no problem, my derivatives account is funded and has sufficient collateral. I have created a FCM API key with the proper permissions.

Following the API docs I can see the US WebSocket endpoint for user.order is at wss://stream.crypto.com/fcm/v1/user but I get an error, "Unknown symbol". I can try the /exchange/ endpoint but then I get the USER_NO_DERIV_ACCESS error (understandably so, because that's not the FCM endpoint)

Digging a little deeper even checking the https://api.crypto.com/fcm/v1/public/get-instruments endpoint I don't see anything with perps on there, they show up in the /exchange/ endpoint but, as I observed, I obviously can't trade there.

Much appreciate any pointers.


r/algotradingcrypto • • 5d ago

Khresmos: plataforma para probar estrategias de trading algorítmico (beta cerrada, feedback bienvenido)

Post image
1 Upvotes

Para quienes quieran explorar el trading algorítmico, les comparto un proyecto nuevo: Khresmos (khresmos.trade).

Está en fase beta (v0.9) y por ahora el acceso es libre para grupos pequeños de usuarios que quieran probarlo. Es una plataforma de simulación sobre cotizaciones reales, sin dinero real ni conexión a exchanges.

Una aclaración importante: el foco es la operación por bots algorítmicos, no el trading manual. La idea es armar una estrategia con una plantilla de parámetros, ponerla a prueba contra datos reales y medir si le gana a simplemente comprar y mantener.

Todavía falta mucho por desarrollar, y por eso busco feedback: fallas que encuentren, cosas que no se entiendan y funciones que les gustaría ver. Pueden escribirme a [email protected].

Si el proyecto llega a una etapa comercial, los 100 usuarios que más feedback aporten tendrán acceso sin cargo.

¡Gracias a quienes se animen a probarlo!


r/algotradingcrypto • • 6d ago

In risk units, Bitcoin has no bull and bear regimes. It has rallies, and everything else is flat.

Thumbnail bitdataview.com
6 Upvotes

I wanted to know whether a "bull/bear" label on Bitcoin can work in principle. A recent

paper on sliding-window regime detection (Pambukyan & Nersisyan, arXiv 2611.34905) shows that

any window label is wrong for about half a window after every regime switch. The best window

then depends on a single number: how often regimes switch, relative to how clearly their drifts

differ. So first I measured whether BTC has drift regimes at all, and what shape they have.

Every test below was locked before it ran: design, decision rule, power check, and both my

research partner's prediction and mine. Daily BTC, Aug 2017 – Sep 2026.

Setup

- Returns: daily log returns divided by a trailing EWMA volatility (λ 0.94), clipped at ±4σ.

So drift is measured in risk units: "how many σ per day".

- Model: a two-state hidden Markov model with the **same variance** in both states, so it can

only split on drift, not volatility. Each state's expected stay is at least 30 days.

- What this lens can and can't see: it asks "is there a regime in risk-adjusted drift?" Volatility

regimes are deliberately left out: they're obvious in crypto and weren't the question. But that

choice shapes the answer, and it matters most for bear markets (section 4).

- Null: a GARCH(1,1)-t with constant mean, fitted to the same series and run through the same

pipeline, 200 simulations. Then the same with **GJR-GARCH-t** (volatility rises more after

drops), because asymmetric volatility could fake a regime.

1. There is a regime, but it's a rally, not bull/bear

| | likelihood ratio | GARCH-t null 95% | GJR null 95% |

| BTC | 12.3 | 7.0 | 5.4 (p 0.015) |

| 9-coin equal-weight index | 9.4 | 6.8 | 7.3 |

| ETH | 7.2 | 5.4 | 8.2 (p 0.07, borderline out) |

The two states in BTC aren't "up" and "down":

- Rally state: +0.32σ per day, lasts ~37 days, about 17% of the time (the model's long-run

share; in hindsight, 412 of 3,260 days, or 12.6%, have rally probability above 0.5).

- Everything else: −0.03σ per day, flat. Bear markets don't separate from flat in risk units.

Eight rallies in nine years: late 2017, spring 2019, Oct 2020 – Jan 2021, Jan 2023, Oct–Dec 2023,

Feb–Mar 2024, Oct–Nov 2024, Aug 2026. Nothing in 2018, 2022 or 2025. ETH is the exception: it

splits more symmetrically into bull and bear.

Leverage asymmetry doesn't explain it. The fitted GJR asymmetry coefficient for BTC is 0.005

(for equity indices it's typically 0.1 or more).

Why "price above its moving average" fails

The core of most regime labels is "price > EMA". In a world simulated from the fitted model:

- The window length of a 4h EMA200 (~33 days) is close to the best possible window.

- The threshold is wrong. "Above the EMA" means zero drift, so it calls the flat 83% "bull"

half the time. Its error is **0.42**. Always saying "no rally" errs only **0.17**.

- Even the optimal Bayes filter, with the true parameters, only gets to **0.148** against that

0.171 base rate. Calling a rally in real time is close to hopeless. Rallies are obvious only

in hindsight.

3. One statement that does work, in one direction only

My research partner's idea: "there's no rally outside the trend." We tested it against the trend

structure our site already shows: a 4h ATR trailing stop (4×ATR "fast", 6×ATR "calm"), using

the state known at the start of each day. Rally days come from the model, in hindsight.

Locked threshold for "supported": at least 80% of rally days inside the uptrend, and rally

probability outside it at most 5%.

| | rally days inside uptrend | rally probability outside uptrend |

| **fast trend (4×ATR)** | **87%** [82–92] | **3.7%** [1–7] |

| calm trend (6×ATR) | 94% | 1.7% |

| base rate (share of rally days) | | 12.6% |

Supported. Outside an uptrend, a rally day is a third as likely as on average.

But how much of that is mechanical? Both the trend and the rally are built from the same price

rises, so some overlap comes free. I ran the same definitions on simulated prices **without** any

regime (GJR at 4h, keeping paths whose "rally" share looked like BTC's):

| | inside uptrend | outside uptrend |

| regime-free world | 73% | 7.5% |

| world with BTC's rally regime | 87% | 4.0% |

| **real BTC** | **87%** | **3.7%** |

Real BTC matches the rally world almost exactly. Against the regime-free reference, the fast

trend sits at the 94th percentile (borderline) and the calm trend at the 100th.

It only works one way.80% of uptrend days are *not* rally days. The bear years 2018 and 2022

hold only a quarter of those; the rest are ordinary up-drifts that never become a rally. "No

uptrend → rally unlikely" is supported. "Uptrend → rally" is not. In 4 of the 8 rallies the fast

trend was already up on day one; in the other 4 it was 1–6 days late.

4. Falls don't show up as a drift regime

So is there a "down rally"? I fit a three-state model (down / flat / up), same lens, against BTC's

own two-state rally world.

Before running, I checked power: a planted down-rally of −0.2, −0.3 or −0.45σ per day is found

only 6%, 17% or 29% of the time. A realistic one is smaller still. The 2018 bear market lost ~80%

in a year, but at ~4% daily volatility that's only ~−0.1σ per day. So a null result would mean

"couldn't measure", not "doesn't exist", and I wrote that down first.

Result: likelihood ratio **0.005**. The three-state fit simply reproduced rally + flat. Same in

the index; ETH split its up state instead. A post-lock check with more optimizer starts found a

better fit, but its third state covered **four days**: Nov 8–9 2022 (FTX) and Jun 1–2 2026. That's

two crash clusters, not a drift.

The way I read it, **in risk units, up is a regime and down is an event.** Rallies are calm and

persistent, so their drift stands out. Falls are violent, so dividing by volatility shrinks their

drift. This is partly the lens: the signature of a bear market is high volatility plus negative

drift, and I removed the volatility on purpose. A model that lets variance switch too would very

likely find a bear state, but it would be defined mainly by volatility. The open question is

whether that high-volatility state also carries a negative drift you could detect. I haven't run

that test yet. So this is not "falls aren't regimes"; it's "falls don't separate in risk-adjusted

drift, and with this much data we couldn't have seen it if they did."

5. Bubble tests may be measuring the same thing

Almansour et al. (2026, IJFS 14/323) show that pointwise GSADF bubble tests raise alarms in

**98%** of samples generated from a regime-switching drift model with no bubble at all. Their BTC

bubble episodes (late 2017, Nov 2020 – Jan 2021, Feb–Mar 2024, Nov 2024) all overlap my rally

periods. The HMM also finds 2019, early 2023 and late 2023, and it ends the 2020–21 rally in mid-Jan

2021 where GSADF runs to April. In risk units, the high-volatility rise of Feb–Apr 2021 looks flat.

This comparison is an unlocked look, and both methods are defined from price, so it isn't

independent confirmation. But "bubble" and "rally state" may be one object.

Limits

- Mainly one asset and ~8 rallies. The rally labels are in-sample hindsight.

- The two-state, equal-variance model is a choice, and it hides volatility regimes by design. The

nulls are parametric (GARCH-t, GJR-t).

- I also tried to make a live "rally probability" usable. Even in a perfect simulated world, a

calibrated probability would pass a ±5-point check only 34% of the time on 2023–2026 data (five

rallies). So I didn't run it on real data. Instead it will log live in a shadow and be tested on

future data.

- Predictions: my partner called the robustness result, the trend statement and the mechanical

overlap; I'd guessed "partially" on the trend. On the down-rally, my partner expected one and I

didn't.

What I'll do with it

On the site's regime card, one descriptive line under the trend, and only in the direction that

held: "Fast trend is down. Since 2017, only ~4% of days in this state were rally days (12.6%

overall)." That's P(rally | trend down), the question a reader actually has, not P(trend down |

rally), which is 13% and easy to misread. No "rally now" claims, no live probability.

Happy to hear where this breaks. Especially: is there a better way to see down-moves as a regime

than drift in volatility units? And for a joint drift + volatility model, what would convince you

that a high-volatility state has a real negative drift, and not just fat left tails?


r/algotradingcrypto • • 6d ago

Market-neutral funding carry on 28 Binance perps: Sharpe 0.9, β≈0… and why I'm not trading it

1 Upvotes

Perps pay funding — crowded-long coins pay positive funding, unloved coins pay little/negative. So a simple cross-sectional idea: each day rank the universe by trailing funding, short the top quartile (collect funding + fade the crowd), long the bottom, equal-weight, dollar-neutral. 28 Binance USDⓈ-M perps, daily rebalance, ~7 yrs, vol-targeted to 15%.

The headline looks great:

  • Sharpe ~0.90
  • BTC-beta −0.02 (genuinely neutral, not disguised long-crypto)
  • Median universe funding +10%/yr on offer

If I stopped here I'd have a tidy "market-neutral crypto alpha" post. Two checks kill it:

1) Deflation. I pre-registered the rule (3d signal, 25% quantile, daily rebalance) and deflated the Sharpe for the variants I considered (DSR). Deflated → ~0.80, below my 0.95 bar. After honestly accounting for my search, I can't rule out luck.

2) Cost. Daily rebalance = brutal turnover. Cost ladder, per side:

  • 2 bps (maker): Sharpe +0.90
  • 7 bps (taker): +0.43
  • 15 bps (taker + alt spread): −0.31

It only "works" at maker cost. Cross the spread on the thinner alts and it's gone.

And the decomposition: only ~40% of the P&L is the actual funding carry — the majority is the price leg (mean-reverting the crowded names). So it's less "harvest carry," more "fade the crowd," which is the more fragile thing to lean on.

Takeaways I think generalize:

  • A neutral-looking Sharpe means nothing until you (a) deflate for your search and (b) run a cost ladder, not one optimistic number.
  • Daily-rebalanced crypto books are a cost mirage — gross edge real, net edge often isn't.
  • β≈0 is necessary but not sufficient; check where the P&L comes from.

Not giving up on it — two untested levers: more breadth (28 coins is thin for cross-sectional), and combining it with an equally-weak-but-uncorrelated momentum sleeve (two weak neutral edges can clear a bar neither clears alone).

Questions for the room:

  • Anyone running cross-sectional funding/crowdedness at scale — does breadth (50–100+ coins) actually rescue the DSR, or does cost scale with it?
  • For daily-rebalanced neutral books, are you actually getting maker fills, or is 7bps+ the honest number?

That's the "honest results" angle. The alternative, broader-reach framing is a PSA: "Your daily-rebalanced crypto backtest is lying to you about cost — a worked example" — same content, but the cost-mirage lesson is the headline instead of the funding book. That one tends to pull more upvotes because it's useful even to people not doing carry.


r/algotradingcrypto • • 6d ago

Tested Fear & Greed, funding, breadth and volume filters on 5 coins out of sample. 18 of 20 lost money

1 Upvotes

These filters get recommended a lot, so I tested them properly on my long-only spot strategy (ETH, SOL, BTC, AAVE, TRX). The filter could only skip a buy, nothing else changed. 1m Binance data Oct 2024 to Sep 2026, fees included.

For each coin I searched ~80-100 rules per filter, then ran it walk-forward: best rule picked on the previous 6 months, used blind on the next quarter, 6 quarters.

Result vs no filter ($300 per coin):

Fear & GreedFunding / OIBreadthVolume
ETH-$66-$15-$45-$1
SOL-$47-$12-$39-$57
TRX-$9+$1-$6-$39
BTC-$18-$23-$7+$1
AAVE-$31-$29-$42-$53

Why I think they failed:

  • The average loss never changed. It's set by the stop. Filters changed how often a coin lost, not how much, so skipping buys mostly skipped winners.
  • Every great-looking rule was one episode. SOL's extreme-greed skip was all Nov-Dec 2024.
  • Rules don't transfer. I moved the 12 best rules to other coins unchanged, 1 of 12 still worked.

Only ~2 years of data and long-only spot, so maybe it's different for perps or shorts.

Has anyone found a sentiment or funding filter that actually held up out of sample?

Code and reports: https://github.com/zulfi011/z-bot


r/algotradingcrypto • • 6d ago

if you're looking for a platform that's open to bots

0 Upvotes

if you are looking for a platform that's open to bots, you are welcome to use trading bots on ours. We do use Cloudflare to protect against attacks but have tried to set it be bot friendly. Let me know if you have any issues.

You can play with free money for free. I've temporarily removed the name of the site due to a comment. If there's something wrong with this or it's not allowed let me know.


r/algotradingcrypto • • 6d ago

3commas v1 alternatives?

1 Upvotes

had two DCA bots on 3commas since 2022, about 30k in btc and eth. v1 shut down in september and now my positions are just sitting there. the whole thing made me not want to give api keys to some platform again. looking for a DCA bot or anything automated where I can keep funds in my own account. fine with moving exchanges if needed. what did you guys switch to?


r/algotradingcrypto • • 7d ago

Do you backtest perp bots on spot candles or perp candles?

1 Upvotes

Free history is easiest to get for spot, so a lot of backtests seem to run on spot candles even when the bot trades perps. But perp price can drift from spot in fast moves, and some exchanges trigger stops on mark price instead of last price, depending on settings.

Curious how people here handle it:

  • Spot data, perp data, or candles from the exact exchange you trade on?
  • Did your signals change when you switched the data source?
  • Last price or mark price for stops in the backtest?

Not looking for a perfect setup, just what you actually do. Thanks in advance.


r/algotradingcrypto • • 8d ago

what do you think about learning cryptotrading with chatGPT?

0 Upvotes

i want to learn cryptotrading but idk how, so i started learn it with chatGPT. what do you think about it?


r/algotradingcrypto • • 9d ago

Building my first crypto algo bot. How do you go from backtest to a strategy that holds up live?

Thumbnail
gallery
29 Upvotes

Hi all, I'm working on an algorithmic trading bot for crypto and want to sanity-check my approach before risking real money.

What I have so far:

  • Market: BTC/ETH/XRP/SOL/ADA perpetuals on Binance
  • Timeframe: 15m / 1h
  • Strategy idea: trend-following with EMA crossover + ATR stop / mean reversion on RSI
  • Tools: Python, backtrader / vectorbt / freqtrade, ccxt
  • Backtest results: 2 years of data, X% return, Sharpe Y, max drawdown Z%, N trades

My questions:

  1. How do you avoid overfitting? Do you use walk-forward testing, out-of-sample periods, or something else?
  2. How realistically do you model fees, slippage and funding rates? My results drop a lot once I add them.
  3. What kinds of edges still work in crypto for retail traders (trend, mean reversion, funding/basis, volatility), and which are mostly arbitraged away?
  4. How long do you paper trade or run small size before you trust a strategy?
  5. Any mistakes you wish you'd known about early (lookahead bias, survivorship bias, data quality)?
  6. What to expect 1:1 or 1:2 RR ?

I'm not asking anyone to share their secret sauce. I'm just trying to learn the right process. Thanks!