QFEX Risk-Balanced Portfolio strategy report
Updated by the Circuit team
Summary
Hold 3 assets, no leverage. Venue: QFEX · USDC on Arbitrum One. Run this agent on Circuit
The agent holds 3 perps in one QFEX account: the S&P 500, long-term US Treasury bonds and gold. It gives each about the same risk, holds perps worth 0.98 times its equity, and does not borrow.
The return comes from the prices of the 3 assets and the bond fund's dividends, less QFEX funding and fees. In a replay from 2005 to 13 Nov 2026, the rule made 7.13% a year after costs, with a largest fall of −23.3%. The S&P 500 alone made 8.68% a year, with a largest fall of −57.1%.
On QFEX's own prices from 3 Mar to 13 Nov 2026, the rule lost 4.48%; the gold perp fell 24.0%. No figure here is a promise of return.
- First half, a year: 7.09%
- Second half, a year: 7.11%
- Volatility, a year: 8.76%
- S&P 500 volatility: 19.25%
- Worst 21 trading days: −11.3%
- Losing calendar years: 4
- Year 2008: +6.1%
- Year 2022: −17.3%
- QFEX prices, 2026: −4.48%
- Fund prices, same days: −4.08%
- Legs a year: 8.0
- Gross, lowest to highest: 0.887 to 0.993
- Data window: 2005 to 13 Nov 2026
- Minimum allocation: 75 USDC
Agent rule with QFEX fees and funding, on fund prices in place of the perps, with no size steps. First half: 2005 to 2015; second half: 2016 to 13 Nov 2026. QFEX prices: the same rule on QFEX perp prices and hourly funding, 3 Mar to 13 Nov 2026 (179 days of data). Fund prices, same days: the rule on fund prices for those days. Gross: the perps as a multiple of the equity.
Main risks
- The 3 assets can fall together. In 2022 the rule lost 17.3%, and its largest fall was −23.3%.
- One asset can fall far. From 3 Mar to 13 Nov 2026 the gold perp fell 24.0%, and the rule lost 4.48% on QFEX prices.
- QFEX is the only venue. It matches orders off-chain and holds the USDC margin. A halt or a fault at QFEX can block orders or freeze the USDC margin.
- Longs pay QFEX funding each hour. At QFEX's mean rates since March 2026 funding cost 0.997% a year; higher rates lower the return.
Headline result
Yearly return in the backtest*: 8.35%. Agent rule before fees, book cost and funding, 3 Jan 2005 to 13 Nov 2026
- Agent rule: 7.13%
- S&P 500 alone: 8.68%
- Equal thirds: 6.80%
- Trend guard: 4.82%
Bars: after QFEX fees, book cost and funding. Largest fall: agent rule −23.3%, S&P 500 alone −57.1%, equal thirds −23.5%, trend guard −17.1%.
Illustrative net return*: 7.11% to 7.13%
- Before costs, a year: +8.35%
- QFEX funding, a year: −0.997%
- Fees, a year: −0.065% to −0.047%
The cost rows are the costs paid in the replay, a year, as a share of the mean equity. The return rows are compounded. Costs also change which scheduled rebalances trade: 108 with costs, 114 without. So the rows do not add to the net. Low end: a fee of 0.10% on every trade. High end: QFEX taker fees, 0.05% for US500 and GOLD and 0.10% for TLT. The fee row includes a book cost of 2 bps a trade. Both ends use the same QFEX funding.
* Illustrative backtest of the agent rule, 3 Jan 2005 to 13 Nov 2026, on fund prices in place of the QFEX perps. The large figure is before costs; the bars and the net range include QFEX fees, book cost and funding. Not a forecast.
Strategy
Stocks, long-term US Treasury bonds and gold respond to different events. In the 2008 crisis, the S&P 500 alone lost 38.8% in the replay, and the agent rule gained 6.1%. The agent holds the 3 assets as QFEX perps and gives each about the same volatility, so each asset adds about the same risk.
Illustration. The price moves of the S&P 500, Treasury bond and gold perps change the open result of each leg. The open result settles into QFEX USDC when a leg closes. The bond perp pays the fund's dividends to the long. QFEX funding and the fees with the book cost come out of the same account. In the replay they cost 0.997% and 0.047% a year.
Weights
Each leg gets a target weight in proportion to 1 / its volatility, so the less volatile asset gets a larger weight.
- On the day of each scheduled rebalance, the agent reads the daily reference closes of the 3 assets from QFEX (Price source). A reference close is QFEX's reference price at 16:00 New York, the US close of a full trading day.
- It uses the closes of NYSE trading days and computes the volatility of the last 60 daily returns (Volatility look-back).
- It sets each target weight in proportion to 1 / volatility, and the 3 weights add up to 1 (Weight rule).
- Until the TLT reference has 61 closes, on 18 Dec 2026, it uses the fixed weights: US500 33.2%, TLT 37.4%, GOLD 29.4%.
- Each leg's target is its target weight times 0.98 times the equity (Gross target).
| Leg | Volatility, a year | Inverse volatility weight, 13 Nov |
|---|---|---|
| US500 | 14.7% | 33.6% |
| TLT | 10.7% | 46.0% |
| GOLD | 24.1% | 20.5% |
Inverse volatility weights from 60 daily returns of the fund prices to 13 Nov 2026. The agent uses this rule from 4 Jan 2027.
Rebalance
A rebalance brings the legs back to their targets. It is the only rule that moves money between legs.
- On the first NYSE trading day of each month, a scheduled rebalance is due (Rebalance calendar).
- The scheduled rebalance trades a leg only when its weight gap is 5 pp or more (Weight band).
- A leg trades only when its change is one QFEX minimum size or more; a smaller change waits.
- The agent sends the reductions first, then the buys that fit below a gross of 0.98.
- When the gross falls below 0.88, for example after added money, a top-up buys the legs back to target (Top-up trigger).
- When the gross rises above 1.05, a cap rebalance reduces the legs (Gross cap).
- A top-up or a cap rebalance waits 5 NYSE trading days after the last rebalance (Drift trigger and wait).
Orders and the trade window
The agent sends rebalance orders only in US market hours, when the QFEX books are deep.
- The agent runs once an hour, on the hour (Run interval).
- It sends rebalance orders only from 11:00 to 12:30 New York time on NYSE trading days (Trade window).
- Before each order it reads the book, and a leg with a spread above 38 bps waits for a later run (Spread limit).
- Each order is an immediate-or-cancel order at the midpoint plus or minus 0.19% (Order slippage).
- A rebalance that does not complete continues in the next trade-window run, at most 2 rounds a day (Rounds a day).
- After 3 runs in a row with a refused order in one market, that market goes into the stop state (Refusals before the stop state). The agent then tries at most one order a trading day in that market.
Income and costs
The account gains or loses with the prices of the 3 perps. The bond perp also pays the fund's dividends to longs.
- The US500 perp follows the S&P 500 index; it pays no dividends.
- The TLT perp follows the fund of US Treasury bonds with 20 or more years to maturity, and pays its dividends to longs.
- The GOLD perp follows the price of gold.
- Each hour longs pay or receive funding. QFEX's mean for longs since March 2026: US500 0.24%, GOLD 3.23%, TLT −0.12% a year.
- Each order pays the QFEX taker fee: 0.05% for US500 and GOLD, 0.10% for TLT.
Stop and close
The agent has no unwind setting. After Stop, the user closes the 3 perps through Ask Circuit, and the agent's money stays as USDC on QFEX.
- The user presses Stop. The session ends, and the 3 perps stay open.
- The user closes the 3 perps through Ask Circuit. Ask Circuit offers one reduce-only order for each perp, and the user confirms each.
- The USDC then stays in the user's QFEX account.
- The user withdraws the USDC through Ask Circuit.
Key facts
- Holds: S&P 500, bond and gold perps
- Venue: QFEX
- Money: USDC on Arbitrum One
- Leverage: None, gross 0.98
- Gross cap: 1.05
- Weights: Inverse volatility, 60 days
- Rebalance: Monthly, 5 pp weight band
- Trade window: 11:00 to 12:30 New York
- Costs: Fees 0.05% to 0.10%, funding
- Run interval: Each hour
- Minimum allocation: 75 USDC
- On unwind: USDC on QFEX
- Not for: New users in the US or UK
Source: the agent's card and code. QFEX does not accept new users from the US, the UK and some other countries. The user moves USDC on Arbitrum One into QFEX through Ask Circuit. To unwind, the user presses Stop, then closes the 3 perps through Ask Circuit. The USDC then stays in the user's QFEX account.
Parameter choices
The selection rule sets the assets, the weight rule, the look-back, the calendar, the weight band and the drift trigger. The replay splits 2005 to 13 Nov 2026 into a first half, 2005 to 2015, and a second half, 2016 to 13 Nov 2026. On the first half, the value with the best return per unit of volatility wins. Values within 0.02 of it count as equal, and of these the value with the fewest legs traded a year wins. A winner other than the first value must pass a check on the second half. Its return can be at most 0.3 pp a year lower, and its largest fall at most 2 pp deeper.
Assets
US500, TLT and GOLD. The Nasdaq 100 perp in place of US500 scored 0.928 against 0.836 on the first half. On the second half its largest fall was −26.4% against −23.0%, 3.4 pp deeper; the selection rule allows 2 pp. So the S&P 500 stays.
- Legs: US500, TLT, GOLD
| Assets | Return / volatility, first half | Return a year, second half | Largest fall, second half |
|---|---|---|---|
| US500, TLT, GOLD | 0.836 | 7.03% | −23.0% |
| US100, TLT, GOLD | 0.928 | 7.73% | −26.4% |
US100: QFEX's Nasdaq 100 perp. Its funding for longs was 1.62% a year, against 0.24% for US500. QFEX lists no other perp of this kind. Each value is tested on the same rule with the other values at their first values: weight band 1 pp, drift trigger 10 pp.
Weight rule
Inverse volatility. It gave the highest return per unit of volatility on the first half: 0.836, against 0.717 for fixed weights and 0.671 for equal thirds. It also led on the second half.
- Weight rule: Inverse volatility
- When price reads fail: Fixed weights
Return per unit of volatility, first half and second half: inverse volatility 0.836 and 0.760; fixed weights 0.717 and 0.700; equal thirds 0.671 and 0.732. The agent uses inverse volatility.
1/vol: inverse volatility. Equal: equal thirds. Fixed: the median inverse volatility weights of 2005 to 2015, US500 33.2%, TLT 37.4%, GOLD 29.4%. Each value is tested on the same rule with the other values at their first values: weight band 1 pp, drift trigger 10 pp.
Volatility look-back
60 trading days. It gave 0.836 on the first half, against 0.773 for 20 days and 0.805 for 120 days. On the second half the 3 look-backs were within 0.02 of each other: 0.746 to 0.760.
- Look-back: 60 trading days
Return per unit of volatility, first half and second half: 20 days 0.773 and 0.746; 60 days 0.836 and 0.760; 120 days 0.805 and 0.751. The agent uses 60 days.
Days: the look-back in NYSE trading days. Each value is tested on the same rule with the other values at their first values: weight band 1 pp, drift trigger 10 pp.
Price source
QFEX's daily reference closes on NYSE trading days, at least 61 for each asset. Each reference close is QFEX's reference price at 16:00 New York, the US close of a full trading day. The reference is the price of the real asset, and NYSE trading days and US closing prices match the replay. 61 closes give the 60 returns of the look-back.
- Prices: QFEX reference closes
- Closes needed: 61
- Backup: Circuit's QFEX price history
- Until then: Fixed weights
- TLT has 61 closes: 18 Dec 2026
When the QFEX read fails or is older than 4 days, the agent reads Circuit's QFEX price history. QFEX's TLT reference history starts on 24 Sep 2026. The first rebalance with inverse volatility weights is on 4 Jan 2027.
Rebalance calendar
Monthly. It gave 0.836 on the first half, against 0.807 for quarterly and 0.739 with no calendar. It also led on the second half: 0.760.
- Calendar: Monthly
- Rebalance day: First NYSE trading day
Return per unit of volatility, first half and second half: monthly 0.836 and 0.760; quarterly 0.807 and 0.688; no calendar 0.739 and 0.685. The agent uses monthly.
1 mo: monthly; 3 mo: quarterly. None: no calendar, only the 10 pp drift trigger and the gross cap start a rebalance. Each value is tested on the same rule with the other values at their first values: weight band 1 pp, drift trigger 10 pp.
Weight band
5 pp. On the first half it scored 0.853 against 0.836 at 1 pp, equal by the selection rule. It traded 9.3 legs a year against 26.6, and fewer legs mean lower fees. On the second half it made 7.11% a year against 7.03%, with a largest fall 0.3 pp deeper, within the check.
- Weight band: 5 pp
| Band | Return / volatility, first half | Legs a year, first half | Return a year, second half | Largest fall, second half |
|---|---|---|---|---|
| 0 pp | 0.832 | 36.1 | 7.04% | −23.1% |
| 1 pp | 0.836 | 26.6 | 7.03% | −23.0% |
| 2 pp | 0.833 | 19.5 | 7.10% | −22.8% |
| 5 pp | 0.853 | 9.3 | 7.11% | −23.3% |
A scheduled rebalance trades a leg only when its weight gap is the band or more. A top-up or a cap rebalance has no band. Each value is tested on the same rule with the other values at their first values: weight band 1 pp, drift trigger 10 pp.
Drift trigger and wait
No drift trigger, and a wait of 5 NYSE trading days. Triggers of 5, 10 and 15 pp scored 0.848, 0.836 and 0.836, against 0.836 with none: equal by the selection rule. No trigger, 10 pp and 15 pp traded the fewest legs, 26.6 a year, against 27.4 at 5 pp. At 10 and 15 pp the trigger never fired in 22 years. So no trigger, the simplest rule, wins. On the second half it equals the 10 pp rule: 7.03% a year and a largest fall of −23.0%, so it passes the check. The 5-day wait keeps a top-up or a cap rebalance at least one trading week after the last rebalance.
- Drift trigger: None
- Wait, top-up or cap: 5 NYSE trading days
| Trigger | Return / volatility, first half | Legs a year, first half | Trigger rebalances, 2005 to 2026 |
|---|---|---|---|
| None | 0.836 | 26.6 | 0 |
| 5 pp | 0.848 | 27.4 | 3 |
| 10 pp | 0.836 | 26.6 | 0 |
| 15 pp | 0.836 | 26.6 | 0 |
A drift trigger starts a rebalance between rebalance days when a weight gap reaches the trigger. Each value is tested on the same rule with the other values at their first values: weight band 1 pp, drift trigger 10 pp.
Trend guard
Off. With the guard the rule made 4.82% a year, against 7.13% without it. The guard cut the largest fall from −23.3% to −17.1%, and its return per unit of volatility was lower: 0.644 against 0.814. On the first half it also scored lower: 0.802 against 0.836.
- Trend guard: Off
| Guard | Return a year | Volatility | Largest fall | Return / volatility |
|---|---|---|---|---|
| Off | 7.13% | 8.76% | −23.3% | 0.814 |
| On | 4.82% | 7.49% | −17.1% | 0.644 |
Trend guard: an asset below its 200-day average goes to USDC. Agent rule with QFEX fees and funding, 3 Jan 2005 to 13 Nov 2026.
Trade window
11:00 to 12:30 New York time. The start is the earliest hour within 10% of the lowest tracking difference. 11:00 had 13.3 bps against 13.0 at 12:00, and 10:00 had 16.6 bps. A low tracking difference means the perp trades close to its asset's price. A start at 11:00 keeps 2 runs in the window. The end, 12:30, comes before NYSE's early closes at 13:00.
- Start: 11:00 New York
- End: 12:30 New York
- Runs in the window: 11:00 and 12:00
Mean absolute tracking difference, summed over the 3 perps, in bps, by New York hour: 10:00 16.6; 11:00 13.3; 12:00 13.0; 13:00 13.2. The window starts at 11:00.
Weekday hours of QFEX perp prices against their reference prices, to 14 Nov 2026. Data from 3 Mar for US500, 1 Mar for GOLD and 24 Sep for TLT. NYSE closes early at 13:00 on 27 Nov and 24 Dec 2026.
Order slippage
0.19% from the midpoint. In the trade window, the largest 99th-percentile book cost of a 1,000 USD order was 6.24 bps, for a TLT sell, in 5 weekdays of QFEX book data. The slippage is 3 times that book cost, so the order can fill. The slippage is below half of QFEX's narrowest price band, ±1% for TLT. The band is around the reference price, so the order stays inside every band while the perp's midpoint is within 0.81% of the reference price. In the trade window hours, 11:00 and 12:00, the 99th-percentile size of the tracking difference of each perp was at most 25.4 bps (GOLD at 11:00).
- Slippage: 0.19%
- QFEX price band, TLT: ±1%
- QFEX price band, US500, GOLD: ±3%
Price bands read on 14 Nov 2026. Book data: 55 books for each leg from 11:00 to 12:59 New York, 16 to 20 Nov 2026.
Spread limit
38 bps. In the trade window, the largest 99th-percentile spread was 7.56 bps, for TLT, in 5 weekdays of QFEX book data; no book in the window was wider than 10 bps. The limit is 5 times that spread. A leg with a wider spread waits for a later run. Next to the window, at 10:00, 10:30 and 14:00 New York, weekday TLT spreads of about 500 bps came, with a peak of 504 bps. If such a book comes in the window, the limit keeps the order out.
- Spread limit: 38 bps
When the book read fails, the leg trades with the order slippage only.
Minimum allocation
75 USDC. It is the smallest allocation whose highest gross stays at or below 1.00 and whose mean largest weight gap stays at or below 6 pp. 6 pp is the weight band plus 1 pp, so with size steps the legs stay close to the band. At 75 USDC these were 0.982 and 4.81 pp; at 50 USDC the gap was 8.58 pp.
- Minimum allocation: 75 USDC
- US500 gap after entry, at most: 4.54 pp
| Allocation | Highest gross | Mean largest weight gap |
|---|---|---|
| 50 USDC | 0.983 | 8.58 pp |
| 75 USDC | 0.982 | 4.81 pp |
| 90 USDC | 0.981 | 4.64 pp |
| 100 USDC | 0.983 | 4.31 pp |
| 150 USDC | 0.983 | 3.84 pp |
| 250 USDC | 0.986 | 3.29 pp |
Replay of 13 Nov 2023 to 13 Nov 2026 with QFEX size steps and the agent's sizing rule, gross target 0.98. One US500 size step is worth 7.52 USD. Entry check: 2,001 US500 prices from 7,000 to 8,000; every entry at 75, 90 and 100 USDC completed.
Gross target
0.98. It is the largest tested target whose highest gross at 100 USDC stayed at or below 1.00. So in the replay the perps never exceeded the equity. 0.98 gave 0.983; 1.00 gave 1.0007.
- Gross target: 0.98
| Target | Highest gross at 100 USDC |
|---|---|
| 0.95 | 0.961 |
| 0.98 | 0.983 |
| 1.00 | 1.0007 |
Replay of 13 Nov 2023 to 13 Nov 2026 with QFEX size steps and the agent's sizing rule. Gross: the perps as a multiple of the equity.
Gross cap
1.05. Above it a cap rebalance reduces the legs. In the full replay the highest gross was 0.993, and the cap never acted.
- Gross cap: 1.05
- Highest gross, 2005 to 2026: 0.993
- 99th percentile gross: 0.991
Top-up trigger
Gross below 0.88, that is 0.10 below the target. The lowest gross was 0.887 in the full replay and 0.894 at 75 USDC. So the trigger would not have fired in the replays and does not change their results. It acts mainly when the user adds money.
- Top-up below gross: 0.88
- Lowest gross, 2005 to 2026: 0.887
- Lowest gross, 75 USDC: 0.894
Added money of about 10% or more of the equity, with the added money counted in the equity, starts a top-up. A top-up buys only legs below their target and has no weight band. The 75 USDC figure is from the replay of 13 Nov 2023 to 13 Nov 2026.
Run interval
Once an hour, on the hour. The trade window then holds 2 runs a day, at 11:00 and 12:00, with one round each. So a part fill, or a leg that waits on its spread, gets a second run. A scheduled rebalance is due once a month, so 2 runs a day are enough.
- Run interval: 60 minutes
Rounds a day
2. Each trade-window run can do one round, so a rebalance with a part fill at 11:00 continues at 12:00.
- Rounds a day, at most: 2
Data age limit
4 calendar days. It covers a weekend and one holiday. When the newest close is older, the read counts as failed. The agent then uses Circuit's QFEX price history, else its stored weights, else the fixed weights.
- Data age limit: 4 days
Fetch timeout
10 seconds for each read of QFEX's public data, as in the Uniswap and Metric agents.
- Fetch timeout: 10 s
Refusals before the stop state
3 runs in a row with a refused order of one market, or at once when QFEX refuses the connection. 3 runs in a row span 2 trading days, so one bad hour does not stop a market. In the stop state the agent tries at most one order of that market a trading day. For a refused connection it tells the user to reconnect.
- Refused runs: 3 in a row
- Refused connection: At once
Weight age limit
45 days from the read that made them, one and a half months, so the weights of one missed monthly rebalance stay in use. When both price reads fail, the agent keeps its stored weights up to this age, then uses the fixed weights.
- Weight age limit: 45 days
Risks
- Joint fall. Stocks, bonds and gold can fall together. In 2022 the rule lost 17.3%. Its largest fall was −23.3%, and its worst 21 trading days −11.3%.
- Fall of one asset. From 3 Mar to 13 Nov 2026 the QFEX perps moved: US500 +10.9%, GOLD −24.0%, and TLT −9.2% (fund price before 24 Sep). The rule lost 4.48% on these prices.
- Single venue. QFEX matches orders off-chain and holds the USDC margin. A halt, a fault or a change of rules at QFEX can block orders or freeze the USDC margin.
- Shared margin. One QFEX account can share its margin across all its sessions, so another agent on the same account can use the same margin.
- Funding. Longs pay funding each hour. At QFEX's mean since March 2026 it cost 0.997% a year of the equity in the replay. The gold leg paid 3.23% a year of its notional. Higher rates lower the return.
- Perp price against the asset. A perp can trade above or below its reference price. On QFEX prices the rule lost 4.48%, against a loss of 4.08% on fund prices for the same days.
- Liquidation. The agent holds perps worth 0.98 times its equity and does not borrow. A liquidation needs a gross above 22, because the maintenance margin is about 4.5% of the notional at the weights of 13 Nov.
- Thin books. Outside US market hours the books can be almost empty: on Saturday 14 Nov the TLT spread was 1,235 bps. A close through Ask Circuit is an immediate-or-cancel order within 1% of the price, so at such an hour it can cost up to 1% or not fill.
- Open perps after Stop. Stop does not close the 3 perps. Until the user closes them through Ask Circuit, they gain or lose with the prices and pay funding, and no rule of the agent acts on them.
- Costs. Each order pays the QFEX taker fee, 0.05% or 0.10%, and accepts up to 0.19% from the midpoint. At small allocations a size step is coarse: one US500 step is worth 7.52 USD.
Glossary
Terms
- QFEX: An exchange for perps on stocks, indices and commodities. It matches orders off-chain and holds margin in USDC.
- USDC: A token that is worth 1 US dollar. QFEX takes it on Arbitrum One, a blockchain network.
- Perp: A futures contract with no end date. Its price follows a reference price through funding.
- Reference price: The price of the real asset, for example the S&P 500 index. Its price at 16:00 New York, the US close of a full trading day, is a reference close.
- Leg: One of the 3 perp positions of the agent: US500 (the S&P 500), TLT or GOLD.
- TLT: A fund of US Treasury bonds with 20 or more years to maturity, and the QFEX perp that follows it.
- Long: A position that gains when the price rises. This agent holds only longs.
- Notional: The value of a position: its size times the price.
- Allocation: The USDC that the user gives the agent at the start.
- Equity: The value of the session now: its QFEX USDC plus the open result of its perps.
- Open result: The gain or loss of an open position since its entry.
- Gross: The sum of the notionals of all legs, divided by the equity.
- Leverage: Positions worth more than the equity.
- Target weight: The share of the gross that the rule sets for a leg. The 3 target weights add up to 1.
- Weight gap: A leg's target weight times 0.98, less its notional divided by the equity, in percentage points (pp).
- Weight band: The smallest weight gap at which a scheduled rebalance trades a leg.
- Volatility: How much a price swings: the standard deviation of daily returns, as a yearly percentage.
- Inverse volatility weights: Target weights in proportion to 1 / volatility.
- Fixed weights: The median inverse volatility weights of 2005 to 2015: US500 33.2%, TLT 37.4%, GOLD 29.4%.
- Equal thirds: One third of the gross in each leg.
- Rebalance: The orders that bring the legs back to their targets. A round is one run's set of these orders.
- Scheduled rebalance: The rebalance of the month, on the first NYSE trading day or the next trade-window run.
- Top-up rebalance: A rebalance that buys after the gross falls below 0.88.
- Cap rebalance: A rebalance that reduces after the gross rises above 1.05.
- Forced rebalance: A rebalance that a test build of the agent starts outside the calendar. The agent has none.
- Drift trigger: A rule that starts a rebalance between rebalance days when a weight gap reaches a set size. The agent has none.
- Trend guard: A rule that holds an asset only while its price is above its 200-day average, and holds USDC while the price is below it. The agent has none.
- NYSE trading day: A weekday that is not a holiday of the New York Stock Exchange.
- Trade window: 11:00 to 12:30 New York time on NYSE trading days. The agent sends rebalance orders only in it.
- Funding: A payment each hour between longs and shorts. On QFEX it comes from the premium of the perp over its reference price.
- Taker fee: The fee for an order that trades at once.
- Size step: The smallest change of a position size. The minimum size is the smallest order.
- Price band: QFEX refuses an order whose price is outside a band around the reference price.
- Spread: The difference between the best buy and the best sell order, in bps of the midpoint.
- Slippage: The largest distance from the midpoint that an order accepts.
- Book cost: The cost of an order against the book, beyond the midpoint.
- Tracking difference: The perp price divided by its reference price, less 1, in bps.
- bps: Hundredths of a percent.
- pp: Percentage points.
- Replay: A backtest: a test of the rule on past prices with this report's own script.
- Fund prices: Past daily prices of the funds SPY, TLT and GLD, used in place of the QFEX perps in the replays.
- First half, second half: The replay periods 2005 to 2015 and 2016 to 13 Nov 2026. Each value is chosen on the first half and checked on the second.
- Return per unit of volatility: The return a year divided by the volatility.
- Largest fall: The largest drop of equity from a high to a later low.
- Worst 21 trading days: The largest drop of equity over any 21 trading days.
- Legs a year: The count of leg orders in a year of the replay.
- Stop state: The state of one market, or of the account, after repeated refused orders. The agent then tries at most once a trading day.
- Session: One use of the agent by one user, with its own allocation.
- Unwind: Closing the 3 perps after Stop, through Ask Circuit, so that the agent's money is only USDC on QFEX. The agent has no setting for it.
Replays
| Replay | Window | Prices | Sizing |
|---|---|---|---|
| Parameters | 3 Jan 2005 to 13 Nov 2026 | Fund prices | No size steps |
| Size steps | 13 Nov 2023 to 13 Nov 2026 | Fund prices | 50 to 250 USDC |
| Entry check | One entry | 2,001 US500 prices | 75, 90, 100 USDC |
| QFEX prices | 3 Mar to 13 Nov 2026, 179 days | QFEX perps | No size steps |
| Tracking | 1 Mar to 14 Nov 2026 | QFEX perps, hourly | Not used |
Model
- (E) A daily model of the rule: each rebalance trades at the close of the day the agent decides it.
- (V) SPY uses the price only, because the US500 perp pays no dividends. TLT includes its dividends. GLD pays none.
- (E) Each trade pays the QFEX taker fee, 0.05% or 0.10%, plus a book cost of 2 bps.
- (V) Funding for longs at QFEX's mean since March 2026: US500 0.24%, GOLD 3.23%, TLT −0.12% a year (TLT since 24 Sep 2026).
- (E) Selection rule: the best return per unit of volatility on the first half wins. Values within 0.02 of it count as equal; of these, the one with the fewest legs a year wins.
- (E) A winner other than the first value must pass a check on the second half. It makes at most 0.3 pp a year less, and falls at most 2 pp deeper.
- (V) The size-step replay uses QFEX's minimum sizes and size steps of 14 Nov 2026 and the agent's rule for buys that do not fit.
Model assumptions and validation scope
E: Estimate from a replay, a model or arithmetic.
V: Verified from a source file, the venue's documents or a test record.
(E) The replays of 2005 to 13 Nov 2026 use fund prices for all days. They use fund prices also after the QFEX perps started in 2026: US500 on 3 Mar, GOLD on 1 Mar, TLT on 24 Sep.
(E) QFEX's mean funding since March 2026 applies to all years of the replay.
(E) QFEX's contract specification states that the TLT perp pays the fund's dividends to longs. The replay credits the fund's full dividend. No position has received one yet.
(E) The replays use a book cost of 2 bps a trade, an estimate made before the book data. In the book data of 16 to 20 Nov 2026, the largest 99th-percentile book cost of a 1,000 USD order in the trade window was 6.24 bps, for a TLT sell. No replay has used this 6.24 bps yet.
(E) The first values of each parameter come from an earlier study of the full period, so the tests start from a choice made with hindsight.
(E) The tie margin of 0.02 return per unit of volatility is set by design.
(E) The second-half check, 0.3 pp a year and 2 pp of fall, is set by design. The trade-window margin, 10% of the lowest tracking difference, is set by design.
(E) Set by design: the minimum-allocation limit of 6 pp mean weight gap, and the top-up trigger of 0.10 below the gross target.
(E) Each parameter was tested alone, with the others at their first values; the final rule was then run as one.
(E) The weight band of 5 pp is the widest band in the test.
(E) The replays use inverse volatility weights from the start; the agent uses the fixed weights until 4 Jan 2027.
(E) Order slippage 0.19% and spread limit 38 bps come from 5 weekdays of QFEX book data, 16 to 20 Nov 2026. Their multiples, 3 times the book cost and 5 times the spread, are set by design. No order on QFEX has used them yet: the hosted paper session and the real-money test used 0.25% and 20 bps. Only the scenario test runs them.
(E) On NYSE early-close days, 27 Nov and 24 Dec 2026, the agent reads QFEX's reference price at 16:00, 3 hours after the 13:00 close; the replay uses the fund's 13:00 close.
(E) The trade window start comes from 8 months of tracking data, TLT from 24 Sep 2026. No book-cost check of the trade window hours has used the book data of 16 to 20 Nov 2026 yet.
(E) Set by design, to be calibrated with live data: price source, trade window end, gross cap, run interval and rounds a day.
(E) Set by design, to be calibrated with live data: data age, fetch timeout, refusals, weight age and the 5-day wait.
(E) The replays have no top-up rule. Their lowest gross was 0.887, and 0.894 at 75 USDC, so a top-up at 0.88 would not have fired.
(E) Circuit's documents state that a hosted run can read QFEX's public data and the New York clock. In the real-money test of 20 Nov these reads worked, and the agent sent orders only in the 11:00 and 12:00 New York runs. A hosted paper session runs the code of 16 Nov, which does not yet read the reference closes at 16:00 New York. It checks the clock and the calendar over a weekend, Thanksgiving and 1 Dec.
(E) If those reads fail, the agent uses Circuit's QFEX price history or its stored or fixed weights. It also uses its own holiday list and trades with the order slippage only.
(E) The QFEX price replay covers 179 days; its TLT leg uses the fund price before 24 Sep 2026.
(E) A model sets the liquidation level from QFEX's largest leverage for each market. A check on QFEX will confirm the level.
(E) Circuit's code shows that the sessions of one QFEX account share margin. A check on QFEX will confirm it.
(E) Hero: 8.35% is the replay with no fees, no book cost and no funding. The net range is the replay with all costs: 7.11% at 0.10% on every trade, 7.13% at QFEX taker fees.
(E) Hero bars: the S&P 500 alone is the US500 perp at a gross of 1.00, with funding and fees.
(E) Equal thirds and the trend guard change only that rule of the agent.
Tests of each rule
| Rule | Scenario test | Real money |
|---|---|---|
| Entry at the target weights | Yes | Passed: 75 USDC, 20 Nov |
| Scheduled rebalance and weight band | Yes | Forced: 75 USDC, 20 Nov |
| Top-up and cap rebalance | Yes | No |
| Trade window | Yes | Passed: 75 USDC, 20 Nov |
| Stop state | Yes | No |
| Unwind through Ask Circuit | No | Passed: 75 USDC, 20 Nov |
Scenario test: 42 scenarios run the agent's code with a recorded fake of Circuit and QFEX, and all pass. Real money: one test with 75 USDC on 20 Nov 2026 passed. It covered the entry, a forced rebalance, Stop and the close of the 3 perps through Ask Circuit. The withdrawal returned 74.68 USDC; the test cost 0.32 USDC. A hosted paper session runs to 2 Dec 2026 on the code of 16 Nov, which does not yet read the reference closes at 16:00 New York. It checks the clock and the calendar, with the scheduled rebalance of 1 Dec.
