Trading agents — $2,000 bounty · winner's code trades a real $100k Nasdaq book. Two ways in: the challenge (the rules, the prize, how to enter) or the build guide (strategies, tools, and code). Challenges rotate; this is the one running now.
Build guide · current challenge
Build a winning trading agent.
A starting set of strategies, open-source projects, and reading for the challenge running now — not a recipe. Skim it, follow whatever clicks, and form your own view. No finance background needed. (When the live challenge changes, so do these resources.)
A public or private repo URL (or an endpoint), and the orders your decide() returns.
No brokerage login, deposits, real money, or API keys — and we never take ownership of your code. It stays yours.
An admission result, a robustness profile, and your spot on the live leaderboard.
What you're optimizing for — and what this is NOT
Forget the Wall-Street, blinking-terminals image. This isn't about speed or trading the most — it's about a calm, risk-adjusted strategy that survives, the kind you'd actually trust with real money.
- High-frequency or latency-sensitive — decisions are daily, and a 60-second min hold + 50 trades/day cap mean your servers and reaction speed don't matter.
- “Trade the most” or predict every tick — churning doesn't help you.
- Max-leverage YOLO — the 1.5× cap auto-flattens you.
- A spending race — a fixed compute box, no API budget to game.
- Ranked by Calmar (return ÷ worst drawdown) — make money without a deep hole.
- A real strategy: a risk-off switch, sane position sizing, survive the bad weeks.
- The same data and fills for everyone — the idea wins, not the machine.
- Robust enough to hold up live for 30 days, and on windows it never saw.
Why these rails? So the winner is the best idea— not the fastest box or the biggest wallet — and so the winning bot is something a person could genuinely run with real money. That's the whole design.
The whole contract, in one function
You implement decide(market_state, portfolio_state, cash) and return a list of orders. You get ~220 trading days of daily bars per ticker (about 10 months, enough for a 200-day SMA); you return [{"ticker": "SMH", "side": "buy", "quantity": 40}]. That's it. We run it across hidden historical regimes (admission) then live for 30 days — Round 1, June 2 – July 2 (the ranking).
Fork the template → — it ships with 4 working reference bots you can read, run, and beat.
Building with an AI assistant? Paste the build brief into Claude / ChatGPT / Cursor and describe your idea — it has the contract, rules, and goal baked in, so your AI writes a valid bot with you.
Your first 30 minutes (zero to an admitted bot)
The whole loop, copy-pasteable. No install, no keys, ~5 minutes to your first admitted bot:
git clone https://github.com/builderr-ai/builderr-trading-template cd builderr-trading-template cp baseline.py agent.py # rename: a valid, admittable bot python preview.py # runs locally in ~10s, prints PASS/FAIL
- Fork the template and open it. Don't write anything yet.
- Rename
baseline.pytoagent.py— that alone is a valid, admittable submission. Runpython preview.pyand watch it clear the safety bar in ~10 seconds (no install, no keys). - Now read example_sector_rotation.py— it's the heavily-commented version of exactly the bot most people build (momentum + risk-off). Copy its ideas into your
agent.py. - Re-run
python preview.pyafter each change. Green safety bar = very likely admitted. - Push, email the link, done. You can revise up to 4 times during Round 1 — we run your latest. Your first try isn't your last.
You do not need an LLM. All 4 reference bots are plain Python with zero API calls — and they all clear admission. Skip the LLM for your first bot; it only adds keys, latency, and ways to fail. You can always add one later.
What's “Calmar”, in one line: return ÷ your worst drop. +10% with a −2% drawdown beats +30% with a −25% drawdown. The goal isn't the biggest bet — it's making money without a deep hole.
Not sure what to build? Steal one of these
The blank page is the hard part. Pick a thesis you believe in, paste it into your AI along with the build brief, and you've got a working bot in minutes — then improve it. (Markets move; none of these is a sure thing.)
Want the full breakdown? Anatomy of a strong bot → — plain English: what a strong bot actually does, the one rule that matters, and a complete copy-paste recipe you can hand to your AI.
Bet on the AI / chip names — hold the strongest, step aside if they roll over.
Holds: NVDA · AMD · MU · MRVL · AVGO · SMH
The one rule: Each day, hold the 3–4 strongest by 3-month return — but only while they're above their 50-day average. Otherwise, cash.
Paste into your AI ↓
Write a decide() that each day ranks NVDA, AMD, MU, MRVL, AVGO, SMH by 3-month return, holds the top 4 equally (max 20% each) — but only the ones above their 50-day average; rest in cash.
Own the index when it's trending up; go to cash when it isn't. Simple — and it dodges the big drops.
Holds: QQQ (or SPY)
The one rule: Hold QQQ when it's above its 100-day average; move fully to cash when it drops below.
Paste into your AI ↓
Write a decide() that holds QQQ when its latest price is above its 100-day moving average, and holds 100% cash otherwise.
Hold whichever sectors are hottest right now; skip the laggards.
Holds: XLK · XLF · XLE · XLV · XLI · XLY · XLP · XLU · SMH
The one rule: Each week, hold the top 3 sector ETFs by 3-month return (equal weight). If none are positive, go to cash.
Paste into your AI ↓
Write a decide() that every 5 trading days ranks XLK, XLF, XLE, XLV, XLI, XLY, XLP, XLU, SMH by 3-month return and holds the top 3 equally — only if positive, else cash.
Ride the market in calm times; hide in safe stuff when it drops.
Holds: QQQ → XLP · XLU · XLE + cash
The one rule: Hold QQQ while it's calm and rising; switch to staples / utilities / energy + cash when QQQ falls more than ~5% in a week.
Paste into your AI ↓
Write a decide() that holds QQQ when it's above its 50-day average, but switches to an equal mix of XLP, XLU, XLE and cash whenever QQQ's 5-day return is below -5%.
A little leverage only when markets are quiet; dump it the moment they're not.
Holds: TQQQ / QLD + QQQ
The one rule: Small TQQQ/QLD in calm uptrends; drop to plain QQQ/cash when volatility spikes. Keep total leverage under 1.5× and each name under 30%.
Paste into your AI ↓
Write a decide() that holds ~25% QLD + 25% QQQ in calm uptrends (QQQ above its 100-day average, low recent volatility) but sells the leverage into QQQ/cash when volatility spikes. Keep beta-adjusted gross under 1.4x and every position under 25%.
Still not sure which to pick? Drop your idea in the Discord → and someone will help you shape it.
Strategies people use — skim, then dig into what clicks
A few directions builders take. None is “the answer” — each links to a working example in the repo or some reading. Borrow what makes sense and make it your own.
Momentum / dual momentum
beginner-friendlyHold what's been strongest by trailing return — but only while it's also beating cash. That second filter sidesteps bear markets, which is exactly what a risk-adjusted score rewards. Simple, and hard to overfit.
See a working one →Sector rotation + a risk-off switch
popular pickRank the sector ETFs by momentum, hold the top few, and step to cash when SPY falls below its 50/200-day average. That risk-off switch is the best-documented drawdown reducer in retail systematic trading.
Commented example →Volatility targeting
Size positions inversely to recent volatility — calmer names get more capital — and scale the whole book down when vol spikes. Lifts risk-adjusted return without predicting direction.
Commented example →Keep it dead simple
underratedGenuinely fine. A boring, diversified, no-leverage bot already clears admission — fewer knobs means fewer ways to fool yourself. Start here, and only add complexity if it earns its keep.
The simplest admitted bot →Borrow a thesis from people who research it
no quant neededYou don't need your own edge. Pick a theme you believe in — AI infra, nuclear, semis — or follow someone who researches it (e.g. Brian Feroldi's “AI Industrial Stack”), turn their picks into your universe, and out-execute on timing and risk. A macro view works too: lean defensive when rates are rising.
Free macro data (FRED) to back a view →Mean-reversion (RSI-2) — the tempting trap
learn from itBuy oversold, sell the bounce. Wins ~75% of trades, which feels amazing — then a couple of brutal drawdowns wreck your Calmar. The real lesson is why win-rate ≠ a good score. Study it; don't submit it raw.
RSI & 100+ indicators (pandas-ta) →Tools to test an idea before you submit
You don't have to fly blind. Backtest locally, sweep parameters, sanity-check — then submit. A few well-worn, free tools:
- awesome-quant — a curated index of basically every quant library worth knowing. Start here.
- backtrader / vectorbt — backtest a strategy on years of data; vectorbt is fast for parameter sweeps (just don't overfit on them).
- pandas-ta — 100+ technical indicators in one import, if you want signals beyond moving averages.
A few things worth knowing
- Change every parameter ±20%. If performance collapses, you overfit — it won't survive the live test or the rerun.
- A risk-off switch beats a clever entry. A 50/200-day SMA gate does more for your score than any fancy signal.
- Size by volatility, not fixed dollars. Cut size as vol rises; lean in (within the 1.5× cap) when calm.
- Leveraged ETFs decay in chop. TQQQ/SOXL reset daily — −10%/+10% nets a loss, and TQQQ hit −82% in 2022. Tactical only, never buy-and-hold.
- Keep it simple. Fewer parameters = fewer ways to fool yourself.
- The prettiest backtest is usually the most overfit. Distrust perfection.
Common traps (good to know going in)
- Lookahead bias — using data your bot couldn't have had in real time. We catch it (code review + held-out rerun) and it's an instant DQ.
- Curve-fitting — tuning until history looks perfect. Dies live.
- Over-leverage — sizing for max return, not survival. The 1.5× cap auto-flattens you.
- No drawdown management — no risk-off, no vol scaling. One bad regime ends your run.
- Ignoring costs & fills — a frictionless backtest lies. We model slippage; so should you.
Starter repos worth reading
- alpacahq/alpaca-backtrader-api — official Alpaca ↔ Backtrader bridge; backtest then paper-trade the same code.
- Alpaca + VectorBT tutorial — fast vectorized backtesting over years of data (and the overfit trap it creates).
- Quantopian Lectures (archived) — the canonical free quant curriculum: momentum, mean-reversion, bias avoidance.
Stuck? Join the Discord → (fastest — ask anything, see what others are building) or email inquiries@builderr.ai. We want you to succeed.