r/algotradingcrypto • • 22h ago

November month so far with our fully automated system

Post image
21 Upvotes

r/algotradingcrypto • • 16h ago

Open-sourced our copy trading execution engine for Hyperliquid, Binance and Bybit (Go + Wails)

4 Upvotes

Hi everyone!

Full disclosure first: I'm one of the devs behind Miroir, a copy trading tool for Hyperliquid traders. We just open-sourced the client that does the actual trading, and I'm posting here because this sub is probably the best place to find people who will read the code, tell us what's wrong with it, and maybe build something with it.

Repo: github.com/getmiroir/trading-service (EUPL-1.2)

Why we open-sourced it

A copy trading client holds your exchange API keys and places real orders on your accounts, usually while you're not watching. I don't think anyone should run that kind of software on trust alone. So everything that runs on the user's machine and touches keys or positions is now public: you can read it, check it does only what it says, and build and run it yourself.

What it does

It mirrors the positions of Hyperliquid addresses onto your own Binance, Bybit or Hyperliquid account (including Hyperliquid subaccounts and Bybit regions). Every loop it reads the source address's positions from the public Hyperliquid API, reads your account's state from your exchange, computes the target size for each symbol and places the orders to get there.

A few parts that might be interesting even if you don't care about copy trading:

  • Order execution: large orders split into fractions, minimum notional handling, optional websocket order routing on Binance and Bybit.
  • Concurrency: accounts are synced concurrently, then each symbol within an account concurrently.
  • SL/TP: placed automatically and readjusted as positions and prices move. Stop losses are sized so that if all of them trigger at once, the total loss stays within a configurable fraction of your equity above a minimum equity floor. Position sizes aren't touched.
  • Auto close-out: all copied positions are closed if equity drops below the floor, or if account or source data can't be read.
  • Rate limiting: per-exchange limits, retries with exponential backoff and jitter.
  • Secrets: exchange keys live in the OS keyring (Keychain, Secret Service on Linux, DPAPI-encrypted store on Windows), never leave the machine and are redacted from logs.

Plugging in your own logic

The client doesn't decide what to copy by itself. It asks a control API for a few things and handles everything else locally:

  • targets: which Hyperliquid address each account follows, with exposure, minimum equity, leverage overrides and excluded symbols
  • normalization: the sizing ratio between your account and the source
  • symbol mapping: Hyperliquid symbols to Binance/Bybit symbols

By default that's our API, which isn't open source. But the URL is configurable (control_api.url), and the README documents every endpoint the client calls and what goes in and out. So if you want to run this fully on your own, you can fork it and swap those calls for your own logic, or point it at your own server that serves the same endpoints. Pick the addresses you want to follow, your own sizing model, your own symbol mapping, and let the engine handle execution, SL/TP and risk.

The headless binary (cmd/copy-service, also used by the Docker image) is probably the easiest starting point for that.

Stack

The service is written in Go, and the desktop app uses Wails (Go backend + React/TypeScript frontend). We went with Wails because a single Go codebase gives us both a headless binary for Docker and a native desktop app for Windows, macOS and Linux. The background service is actually the same binary as the GUI, started with a flag and installed as a systemd user unit, a launchd service or a Windows service. Curious if anyone here has gone the same route, or regretted it.

Where we'd love help

It handles real money on real accounts, so the more eyes on it, the better. In particular:

  • the order execution and SL/TP placement logic, and any edge cases you think we're missing
  • how we handle exchange errors and rate limits
  • anything that looks off security-wise around key handling

And if you end up forking it and plugging in your own control logic, I'd genuinely love to hear what you build.

How to reach us

The repo is a read-only mirror of our internal one, published at each release, so GitHub issues and PRs are closed for now. Instead:

  • Bugs, questions, code review comments: reply here, DM me, or email contact@getmiroir.xyz.
  • Security issues: please report them privately to contact@getmiroir.xyz and don't disclose them publicly before they're fixed. SECURITY.md in the repo has the details. And please never send your own keys in a report.

Also curious how you all handle symbol mapping and rate limits when your bots trade across several exchanges.


r/algotradingcrypto • • 17h ago

I almost shipped a selection-biased backtest. Here's the honest number — and why single-market "certification" is mostly self-deception.

2 Upvotes

I run a fairly strict overfitting gate on my strategies — deflated Sharpe (Bailey & López de Prado), PBO/CSCV, an effective trial count (correlation-deduped, not raw config count), walk-forward, and a cross-session log of every hypothesis I've ever tested on the data so I can't quietly re-roll the dice. I spent today stress-testing it on BTCUSD 4h (Kraken, Nov 2016–Sep 2026, ~21,700 bars, 7 bps/side). Posting the process because the mistake I made mid-way is one I think a lot of us make without noticing.

First pass: exactly one system cleared my 0.95 deflated-Sharpe bar — a 120-bar momentum long, net Sharpe 1.08, DSR 0.9726. But it passed by a hair and collapsed under any extra multiple-testing charge (raw trial count → 0.80; a 2-variant exit search → 0.94). A single survivor sitting right on the line is a red flag, not a win.

My "fix" (the mistake): BTC trend-following is a real, well-documented edge, so I figured — don't cherry-pick the best config, trade the whole trend family equal-weight. I pulled the family, averaged them, and got net Sharpe 1.017, DSR 0.959. Clean pass. Felt great.

The catch: I'd quietly filtered the family to members with Sharpe > 0.5 — i.e., I kept the winners. That's textbook selection bias, the exact thing the deflated Sharpe exists to catch. I'd smuggled it back in through the data-prep.

The honest redo — all 42 trend/breakout members, winners and losers, no filter, equal weight:

  • Net Sharpe: 0.868 (not 1.017)
  • DSR: 0.997 @ 1 trial, 0.970 @ 3, 0.938 @ 5 (fail), 0.899 @ 8
  • Split-half Sharpe: first half 1.31, second half 0.21

So it only "certifies" if you pretend you did almost no searching (n ≤ 3), and the edge has largely decayed as the market matured.

What I took from it:

  1. Equal-weight ensembling is correct (1/N tends to beat optimized weights out-of-sample — DeMiguel et al. 2009), but the family has to be pre-registered. The moment you define "the family" after seeing which members worked, you're overfitting again, just one level up.
  2. If you don't deflate for the number of things you tried, a 0.80 looks like a 0.97. The raw Sharpe is almost meaningless once you've tested dozens of configs.
  3. Single-market certification is close to self-deception. A 0.87-Sharpe, decaying single-instrument sleeve is exactly what it looks like in isolation. The reason trend-following is credible at all is breadth — AQR's time-series-momentum work runs one uniform rule across 50–70 markets over decades. That cross-sectional evidence is where the statistics come from, not one hero backtest.
  4. BTC trend is real but modest and fading — a small sleeve in a diversified multi-market trend book, never a standalone strategy.

Not advice, and obviously in-sample in the sense that I chose the family and the cost assumption. But the general lesson stands: the most dangerous overfitting isn't in the strategy, it's in the data prep you don't think of as a decision.


r/algotradingcrypto • • 17h ago

Pump.fun memecoin competition on Kaggle: clean on-chain data and a daily forward-test, if anyone here wants to try their strategy

2 Upvotes

We host a Kaggle competition on pump.fun tokens and thought some of you might find it useful as a testing ground, so here is what it gives you and you can judge for yourself.

The decision it tests: one minute after a token migrates to a DEX, buy or skip, and at what multiple to take profit.

What you get:
- Clean data you don't have to index yourself: every bonding-curve trade of each migrated token (wallets, sizes, reserves, exact ordering), updated daily.
- A forward test you can't fool: your code is rerun every day on that day's new tokens, scored as PnL with a 30% cost per trade.
- A look-ahead check for free: the code is rerun on a truncated day and has to make the same decisions.
- A benchmark: you see how your strategy ranks against a couple of hundred others on the same tokens.

What it costs: some Python/LLM and a notebook. There are starters to begin from.

It's called "Memecoins: Pump or Dump? Predict Pump.fun Launches on Solana" on Kaggle. $5,000 in prizes, submissions close December 1.

If you have questions about the data or the cost model, ask away.