# Arnav's Round 1 Winning Algorithm

Public learning brief for the builderr Trading Agent Challenge.

Round 1 was finalized from the July 2, 2026 US market close.

Full submitted Python file:

https://builderr.ai/trading-round-1-arnav-winning-agent.py

## Result

- Rank: 1
- Return: +5.91%
- Final account: $105,911
- Live window: 16 trading days
- Trades: 37
- Round 2 benchmark: beat Arnav's forward return

This is an educational challenge note, not investment advice.

## One-Line Summary

Arnav's bot was a concentrated leader-momentum strategy with a regime state machine. It bought strong market leaders when the market was healthy, added a small 2x ETF sleeve only in the strongest regime, and moved to cash quickly when trend or volatility broke.

## State Machine

The bot had three operating states:

1. CASH
   - Holds no target risk.
   - Triggered by index trend breaks, fast QQQ drawdowns, or high short-term volatility.
   - After entering cash, the bot waits for a clean reclaim before re-entering.

2. NEUTRAL
   - Holds a leader basket without the 2x ETF sleeve.
   - Used when the market is tradable but not clean enough for full aggression.

3. FULL
   - Holds the leader basket plus a measured QLD/SSO sleeve.
   - Requires SPY and QQQ to clear trend filters, healthy breadth, and contained QQQ volatility.

## Universe

The ranker looked at a fixed liquid leader pool:

- Large-cap tech and AI/chip names: NVDA, MSFT, AAPL, META, AMZN, GOOGL, AVGO, AMD, MU, MRVL, and similar leaders.
- Broad and sector ETFs: QQQ, SPY, SMH, XLK, XLC, XLY, XLF, XLI, XLE, XLV, XLP, XLU, XLRE, DIA, IWM, SOXX.
- Leveraged sleeve candidates: QLD and SSO only.

It did not use network calls, external files, APIs, LLM calls, or future data.

## Ranking Logic

Each candidate needed enough recent bars and had to be above its own 50-day moving average.

The score combined:

- 42-day momentum
- 21-day momentum
- Gap above the 50-day moving average

The bot selected up to the top five positive-score names. Weights were rank-linear: the strongest name received the largest target weight, subject to the position cap.

## Exposure Logic

Important parameters from the submitted bot:

- Top names: up to 5
- Per-name target cap: 26%
- Drift trim: around 28%
- Concentration rule limit: 30%
- FULL core budget: about 67%
- NEUTRAL core budget: about 85%
- FULL 2x sleeve budget: about 33%, split across QLD and SSO if available
- Beta-adjusted gross cap: 1.45x
- Rebalance cadence: every 3 trading days, unless derisking or drift forces action sooner
- Minimum trade size: about 3% of equity

The leveraged sleeve was not always on. QLD and SSO were used only in FULL mode.

## Risk Controls

The bot's edge was not just picking winners. Its controls mattered.

1. Market brakes
   - If SPY or QQQ broke below the slow trend band, the bot moved to CASH.
   - A sharp 3-day QQQ drop or high 10-day QQQ volatility also triggered a brake.

2. Hysteresis
   - After moving to CASH, the bot required a clean reclaim before returning to risk.
   - This reduced churn around the moving average.

3. Momentum-thrust re-entry
   - A strong 10-day QQQ rebound could move the bot from CASH back to NEUTRAL.
   - This did not override the hard brake and did not jump straight to FULL.

4. Drawdown taper
   - Around -6% drawdown from the bot's own equity peak, exposure was cut roughly in half.
   - Around -10%, exposure was reduced to roughly one-quarter.

5. Trailing stops
   - Individual holdings had an 8% trailing stop.
   - Stopped names had a short cooldown before they could be bought again.

6. Sell-before-buy order flow
   - The bot sold stale or overweight holdings first.
   - It then bought target positions with the updated cash estimate.

## Why It Worked In Round 1

Round 1 favored concentrated exposure to the right leaders. Arnav's bot captured that, but it did not simply maximize leverage. It stayed under the contest caps, avoided 3x products, controlled name concentration, and had multiple exits for bad regimes.

The important pattern was:

```text
If market healthy:
  rank leaders
  hold strongest names
  add small QLD/SSO sleeve only in FULL mode
else if market uncertain:
  hold leader basket without sleeve
else:
  go to cash
```

## What Builders Can Improve

To beat Arnav in Round 2, a new bot can try to improve:

- Faster but less noisy regime detection
- Better breadth or volatility filters
- More adaptive position sizing
- Better recovery after drawdowns
- A differentiated universe that still respects the caps
- Cleaner handling of market chop, where momentum strategies tend to give back gains

The core question for any competing bot:

> When should the bot be aggressive, and what exactly forces it to stop being aggressive?

## Competition Reminder

Round 2 runs from July 7, 2026 through the September 4, 2026 market close. Prize money and builder points require beating Arnav's Round 2 forward return.
