> For the complete documentation index, see [llms.txt](https://docs.byreal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.byreal.io/byreal-agent-stack/realclaw/scheduled-macro-trading.md).

# Scheduled Macro Trading

**byreal-scheduled-macro** is a macro trading skill available in RealClaw. When a scheduled US macro release is coming up, you can ask your agent about it and it will build the full trade plan: which asset to watch, which direction to take, entry conditions, TP/SL, and when to exit. You confirm with "Arm it" and the agent handles the rest.

***

## What It Does

The skill monitors the **first 60 seconds of price action** immediately after a macro release. If the routed detection asset confirms a directional move above the signal threshold, it enters a Hyperliquid perp position with take-profit and stop-loss already attached. It exits automatically 4 hours after the release or sooner if TP/SL is hit.

You do not need to watch the release. You arm it in advance, and the agent executes.

***

## Supported Events

| Event             | Status       | Notes                                                            |
| ----------------- | ------------ | ---------------------------------------------------------------- |
| CPI               | Core         | Rate-sensitive. Routes HOOD (hawkish) or MSTR (dovish)           |
| PPI               | Core         | Routes HOOD (hawkish) or COIN (dovish)                           |
| PCE               | Core         | Routes MSTR in both directions                                   |
| NFP               | Core         | Routes CL (dovish miss) or SILVER (hawkish beat)                 |
| FOMC              | Core         | Routes from first-minute MSTR reaction; presser check at T+35min |
| ISM Manufacturing | Experimental | Routes MSTR on beat only. Use with caution.                      |
| Jobless Claims    | Not routed   | No reliable causal edge established                              |
| Retail Sales      | Not routed   | Moves too small and inconsistent                                 |

***

## How It Works

{% stepper %}
{% step %}
**You ask about the upcoming release**

Tell RealClaw what is coming up:

> "CPI releases next week. What's the play here?"

RealClaw loads the event from its macro calendar, checks consensus, and builds the full trade setup: detection asset, signal threshold, route, sizing, TP, SL, and time exit. It presents this as a structured plan and asks if you want to arm it.
{% endstep %}

{% step %}
**You confirm**

Review the plan and reply:

> "Arm it."

RealClaw locks in the plan, checks that your Hyperliquid perps account has sufficient margin, and schedules three automated wake-ups: Entry (T-60s), Data Confirmation (T+5min for non-FOMC), and Cleanup (T+4h).
{% endstep %}

{% step %}
**Entry at T-60s**

One minute before the release, RealClaw wakes up and takes a baseline price snapshot of the detection asset. From T-0 through T+60s, it polls the price every second.

If the detection asset moves more than 0.5% in the signal direction within that 60-second window, RealClaw enters the position immediately with TP and SL attached.

If the move is below 0.5%, no position is opened (non-FOMC events are marked inline and closed out; FOMC defers to the presser check).
{% endstep %}

{% step %}
**Data confirmation at T+5min**

For CPI, PPI, PCE, and NFP, RealClaw fetches the actual release number 5 minutes after the event. If the data contradicts the direction of the trade (e.g., the number came in dovish but the position is short), RealClaw closes the position immediately.

For FOMC, there is no release number to check. Instead, RealClaw runs a presser-reversal check at T+35min using the first 5 minutes of press conference reaction.
{% endstep %}

{% step %}
**Automatic exit at T+4h**

If the position is still open 4 hours after the release, RealClaw closes it at market. TP and SL are enforced by Hyperliquid throughout — if either triggers before the 4-hour mark, the position closes without waiting.
{% endstep %}
{% endstepper %}

***

## Detection Logic

The skill uses **price-first entry**. It does not trade the headline number directly. It watches a pre-mapped rate-sensitive asset for a confirming first-minute move, then enters in that direction. The release data is used only to verify the trade after the fact.

| Event | Detection asset | Hawkish signal     | Dovish signal    |
| ----- | --------------- | ------------------ | ---------------- |
| CPI   | HOOD + MSTR     | HOOD drops >0.5%   | MSTR rises >0.5% |
| PPI   | HOOD + COIN     | HOOD drops >0.5%   | COIN rises >0.5% |
| PCE   | MSTR            | MSTR drops >0.5%   | MSTR rises >0.5% |
| NFP   | CL + SILVER     | SILVER drops >0.5% | CL rises >0.5%   |
| FOMC  | MSTR            | MSTR drops >0.5%   | MSTR rises >0.5% |

For large surprises (move >1.0% in 60s), the skill may route a basket position across two assets with weighted sizing.

***

## Risk Controls

All positions are opened on **Hyperliquid perps** using `xyz:` symbols.

| Parameter                | Default                                                      |
| ------------------------ | ------------------------------------------------------------ |
| Base notional            | $72.73                                                       |
| Max per event            | $1,000 or 25% of account NAV, whichever is smaller           |
| Stop loss                | 2% (standard surprise), 3% (large), 4% (extreme)             |
| Take profit              | 1.5-2.5% depending on event and route (TP1 attached at open) |
| Time exit                | 4 hours after release                                        |
| Minimum signal threshold | 0.5% first-minute move                                       |

{% hint style="warning" %}
All P\&L figures and backtest results are gross of taker fees, spread, slippage, and funding. Past performance on 11 backtested trades does not guarantee future results. Macro markets carry real financial risk.
{% endhint %}

{% hint style="info" %}
The skill will not open a position if your Hyperliquid perps account has insufficient free margin for the planned trade. It will notify you and skip the event rather than opening a partial or over-leveraged position.
{% endhint %}

***

## FOMC Specifics

FOMC does not have an actual release number to check (no surprise metric). The skill handles it differently:

* **First-minute window (2:00 PM ET):** If MSTR moves >0.5%, RealClaw enters immediately using the first-minute bucket.
* **Post-presser window (2:30 PM ET):** If the first-minute move was below 0.5%, RealClaw defers. At T+35min it checks MSTR against the pre-presser price (T+29min baseline). If the presser drove a qualifying move, it enters then.
* **Presser reversal:** If RealClaw entered on the first-minute window but MSTR has reversed by >0.5% versus the entry snapshot at T+35min, it closes the position.

***

## How to Arm an Event

You do not need to know the exact syntax. Ask your agent naturally:

* "CPI is next Tuesday. Can you prep a trade for it?"
* "What would you do for the FOMC release next week?"
* "Arm the NFP trade."

RealClaw will confirm the event details, build the plan, and ask for your approval before scheduling anything. If you want to cancel before the entry fires:

* "Disarm the CPI trade."
* "Cancel the FOMC arm."

Once a position is open, use Phase 4 explicit close language:

* "Close my CPI trade now."

***

## Notes

* byreal-scheduled-macro is available only for Hyperliquid perps (via `byreal-perps-cli`). Spot trades are not supported.
* ISM is experimental. The backtest shows positive results, but the causal relationship between ISM surprises and MSTR price action is not fully established.
* RealClaw will not route Jobless Claims or Retail Sales regardless of surprise size. These events are explicitly excluded.
* If ForexFactory (the calendar source) is unavailable when you ask about an event, RealClaw will not arm a new trade automatically. It will tell you the calendar is unavailable.
* The skill stores event state locally in your RealClaw workspace. If you switch devices, previously armed events may not be visible on the new session.
