How the agent works
Quawd’s agent is a small set of tools wired together by a loop: it builds, tests, probes, and discovers. The agent doesn’t think for you — it makes the slow parts cheap so you can think about more strategies, faster.
Here’s what each tool does, and when the agent reaches for it.
Thesis → Event study → Build → Backtest
Before any of the tool families below, there’s a loop. Most trading ideas don’t have edge — the research workflow kills the bad ones cheap so deep work only goes into the survivors.
- Thesis
Describe an idea in plain English — the universe, the condition, the horizon you care about.
- Event study
run_strategytests whether the condition has forward-return edge in seconds. Four scalars, one verdict. - Build
Reliable ideas flow into the strategy builder — same condition becomes the entry, then add exits, sizing, and risk.
- Backtest
Full historical validation with trade-level results, walk- forward across regimes, and the probe tools that explain every entry.
Every step lives inside a research project so nothing falls through the cracks.
Build
The agent takes a sentence like “buy SPY when RSI(2) is oversold in an uptrend” and assembles it into typed, composable cards.
create_strategy— start a strategy or clone an existing one
add_rule— save a condition and optionally use it as an entry, exit or gate; compose inline
get_strategy— read the document, version, allocation and readiness
edit_strategy— change configuration, conditions, rules, anchors and zones at versioned paths
Every time you describe a strategy in plain English, or ask for a tweak to an existing one.
Strategies are made of small typed pieces. Turning intent into cards means every edit is local, every backtest is reproducible, and the same strategy can run in backtest, walk-forward, and live validation without translation.
Test
Once a strategy exists, the agent runs it. A single tool call gets you a backtest. Pass a list of values in the same call and it becomes a sweep. Walk-forward is a sibling tool with the same calling shape.
run_backtest— simulate a saved strategy or portfolio; use settings.grid for supported parameter sweeps
walk_forward— sequential windows, each window’s stats reported separately
compare_backtests— diff two runs side by side
After every meaningful edit. When you want to know what would happen if the entry threshold were different. When you want to know if the edge holds across regimes.
A single backtest is one data point. Sweeps and walk-forward make probing the parameter space and time dimension almost free — and they share the same kernel as the single backtest, so the numbers are comparable.
Probe
After a backtest produces a number, the agent can explain how it got there. These tools answer “why did this trade fire?” and “is this signal real or curve-fit?”
explain_bar— why did (or didn’t) a trade fire on this bar? returns the conditions that were true and the ones that blocked it
get_condition_timeline— per-condition truth values over time
get_backtest_research_evidence— inspect recorded research iterations, exclusions and sensitivity evidence
compare_backtests— compare recorded performance across backtest runs
When a result is surprising. When you want to trust a strategy before sizing up. When a tweak doesn’t change the headline number but you want to know if it changed the trade selection underneath.
A backtest that can’t tell you why it took a trade isn’t worth running. The Probe family is what makes the agent’s output auditable.
Discover
Event studies measure historical forward returns after entry conditions fire across the selected instruments.
run_event_study— measure historical forward returns after a strategy’s entry conditions fire
get_run— pull results using an event_study run ID
list_runs— see prior event studies in a project
When you want to test whether a condition predicts forward returns before simulating entries and exits.
Event studies separate the historical behavior of a signal from portfolio sizing and exit rules.
See the loop in action
Watch a real strategy go from a one-line idea to a battle-tested edge across five years and multiple regimes — one chat message at a time.