Backtest a crypto long/short strategy on the head universe with daily bars (1d)

Backtest a crypto long/short strategy on the head universe with daily bars (1d) from 2025-01-01 to 2026-10-20, leverage 2. Factor: score = pct_cs(close / max(high, 30)) + pct_cs((close / delay(close, 14) - 1) / std(close / delay(close, 1) - 1, 14)). Rebalance every 10 days (only on daily bars whose date ordinal is divisible by 10). Rank coins with a valid score; skip the rebalance if fewer than 10 coins have one. Go long the top 5 coins at weight +0.1 each and short the bottom 5 at weight -0.1 each. Report fees and funding costs, and compare them with the same strategy rebalanced every 5 days.
3 tools

I'll load the strategy instructions first, then set up the backtests.

I'll run both backtests, the 10-day and the 5-day rebalance, with identical code apart from the interval.

I ran both versions on the head universe with daily bars, 2025-01-01 to 2026-10-20, at 2x leverage.

10-day rebalance5-day rebalance
Net return+528.5%+800.3%
Annualized return177%238%
Sharpe1.832.15
Max drawdown46.7%40.8%
Fees−21.0%−38.1%
Funding−71.5%−91.6%
Gross return before costs (net + fees + funding)≈ +621%≈ +930%
Trades9791,589
Benchmark (equal-weight hold)−73.2%−73.2%

All cost figures are shares of the 10,000 starting capital. Average exposure was about 97–98% long and 96–97% short in both versions.

Fees

  • The 5-day version trades about 62% more (1,589 fills against 979), so fees rise from 21% to 38% of capital.
  • That is roughly 1.8 times the fees, not 2 times, because turnover per rebalance is lower when you rebalance more often.

Funding

  • Funding is the larger cost in both versions, at −71.5% and −91.6%.
  • It does not halve with the slower rebalance, because funding depends on how long positions are held, not on how often you trade.
  • The strategy is always about 100% long and 100% short at 2x leverage. Funding costs the 10-day version about 0.09% of capital per day.
  • The funding drag is probably structural: the long leg tends to hold coins with strong momentum, and those often carry positive funding.

Net result

  • The 5-day rebalance is better on every measure, even after its higher fees. Gross return rises by about 310 percentage points, which is far more than the extra 17 points of fees and 20 points of funding.
  • The signal decays within about 10 days, so waiting for the 10-day rebalance leaves a lot of the edge unused.
  • Both versions fell in the same months (March 2025, January and March 2026), but the 10-day version fell harder in January 2026 (−20.8% against −2.5%).
  • The 5-day version had one deep month, August 2026 at −26.7%, probably a reversal where last month's losers rallied. The 10-day version lost only 6.1% that month.

Caveats

  • Both runs come from one 22-month sample.
  • Each leg holds only five coins at about 20% of equity each, so a single squeeze can hurt.
  • The ordinal-divisible-by-10 rule fixes the rebalance dates. The 10-day result could shift if you started on a different offset, so you could test other offsets (for example % 10 == 3) to check how stable it is.

I can test volatility-scaled weights or a funding-aware filter next, to bring the funding drag down.

AI-generated content. For reference only, not investment advice.