The research daemon
The autonomous background loop: the strategy-creation loop writes ideas and builds strategies, the pipeline jobs drive them through the gauntlet into paper, and the process daemon keeps prices and risk live underneath.
The research daemon is Forven's autonomous background loop. While Forven runs in Auto mode, the Strategy Developer writes ideas and builds strategies from them, scheduled jobs drive those strategies through the gauntlet, losers are archived, and survivors reach paper — without you clicking anything.
Everything it does is governed by the system mode, the scheduler and the promotion gates. Nothing it produces reaches real capital without surviving the full pipeline and your typed GO LIVE.
Forven is a research tool. Surviving the gauntlet is not a prediction of future results, and nothing here is financial advice.
Two things called "daemon"
- The research loop — the subject of this page. It isn't one process: it's a set of scheduled jobs — strategy creation, the gauntlet workflow, the testing cycle, paper graduation, learning and maintenance — plus the agent runs they queue.
- The process daemon (
daemon.py) — the long-running loop that keeps live state alive: the price feed, the risk cycle and exchange reconciliation. The backend hosts it in-process by default (a separateSTART_DAEMON=1process takes over if you run one). See below.
The research loop never trades. It writes ideas, tests strategies and changes their stage. Trading is the scanner's job:
| Research loop | Scanner | |
|---|---|---|
| Purpose | Invent and test strategies | Trade strategies that passed the gates |
| Acts on | Ideas and strategies in quick screen and the gauntlet | Strategies in paper and live_graduated |
| Touches capital | No | Paper: simulated. Live (unsupported): yes |
| Output | Ideas, backtests, verdicts, stage changes | Entry and exit signals, orders |
| Governed by | Autonomy modes | The risk controls |
The research loop, step by step
idea → quick_screen → gauntlet → paper → live_graduated- Idea. In Auto, the
forven-strategy-creationjob queuesgenerate_strategiesruns for the Strategy Developer — up to the in-flight limit, within the daily budget (40 a day on the default Balanced preset). Ideas you submit in The Forge queue the same kind of run in any mode. See Ideas & strategy creation. - Build and register. The agent writes the idea — thesis, mechanism, what would disprove it — implements a strategy, and registers it linked to the idea. Registration backtests it on its own market and timeframe.
- Quick screen. By default it judges a fair sample: the whole window, widened (up to four years, data permitting) until it holds enough trades, with the out-of-sample slice only required not to lose badly. Terminal failures (a duplicate, a merit reject) archive it with no retry; a strategy that can't be fairly tested (no trades, fewer than about five a year, a data problem) is archived as untestable, which isn't a merit verdict.
- Gauntlet. The gauntlet workflow sweeps timeframes, optimizes, applies the best parameters if they hold up out of sample, confirms, and runs the validation suite (walk-forward, parameter jitter, cost stress, Monte Carlo, regime split). Its steps are claimed across scheduler ticks.
- Promotion to paper. By default the gauntlet → paper gate is the research door: a strategy that isn't broken or clearly losing goes to paper, and the deflated Sharpe and the other selection-bias checks are recorded there, to be enforced at paper → live. Promotion is automatic by default. When the paper pool is full (40 strategies by default), a passing strategy waits in a queue ranked by its recorded evidence. Paper is simulation only.
- Paper graduation.
forven-paper-graduationchecks paper strategies against the strict paper → live gate: by default 20+ closed paper trades and 30 days, then a sequential test of the forward record against the backtest, the checks the door recorded, the breadth test and the one-shot held-back test. Passing it never takes a strategy live: that needs your GO LIVE with a per-asset notional ceiling. - Retirement and learning. Every hour
forven-paper-pool-tickretires paper strategies that are clearly losing, in drawdown, idle or contradicting their backtest. Strategies that decay or fail are archived with a reason, and the quant skills that shaped them lose a little confidence. The diversity guard feeds which families keep failing back into the next ideas — see Evolution.
Every threshold comes from the stance preset in Settings → Lab; treat numbers as illustrative, not guarantees.
The brain and the agents
The brain orchestrates: it evaluates gates, decides stage transitions and dispatches work to the agents — the Strategy Developer writes ideas and strategy code, the Simulation Agent validates, the Risk Manager oversees risk, the Quant Researcher writes post-mortems, and the Full-Stack Engineer diagnoses faults. The scheduled jobs are the heartbeat that triggers the work on time.
Agents never task each other, and agents cannot place, size or close positions.
Controlling the loop
The loop's reach is set by the system mode, not by an on/off switch:
- Manual (the fresh-install default) — every scheduled job is paused, and the process daemon's market loop pauses too. Only what you start yourself runs.
- Semi — no new ideas from the agents; your submitted ideas and existing strategies are worked through the pipeline, and the scanner trades paper strategies forward.
- Auto — the full loop, including strategy creation within the daily budget.
How fast it goes is set by the throughput preset in Settings → System → Throughput — Trickle, Conserve, Balanced or Max — which sets the daily creation budget and the agent cadences together. See cost controls.
Steps: turn on autonomous research
- Connect an AI provider in Agents → Setup → Providers, and make sure the Strategy Developer has a model under Agent models. See Agents.
- Pick a throughput preset that fits your provider's limits — Conserve if it rate-limits you.
- In the control strip, switch to AUTO and confirm. (SEMI builds only the ideas you submit.)
- Leave the app running.
What you'll see: creation runs under Agents → Runs; new strategies in The Forge, each with an Idea chip; their progress on the Pipeline board; and promotions into paper in The Forge's activity feed.
Manual triggers
You don't have to wait for the schedule:
# Submit an idea (same as The Forge's + Submit idea; runs in any mode)
Invoke-RestMethod -Method Post -Uri "http://127.0.0.1:8003/api/ideas" `
-ContentType "application/json" -Body '{"text": "…"}'
# Run any scheduler job once, now
python -m forven scheduler run forven-gauntlet-step-loopRunning forven-strategy-creation by hand still respects the mode and the budget: outside Auto, or with today's budget spent, it queues nothing. These routes are operator-gated; see the API reference.
The process daemon (daemon.py)
The research loop runs on top of the process daemon, which keeps live state healthy:
- Price feed — a live feed for the markets in play (Binance by default for paper, Hyperliquid for live), falling back to polling every ~15 s. It publishes a shared price snapshot for the scanner, and a mark watcher fills stops and take-profits at the touch.
- Risk cycle — recomputes real-capital equity against the high-water mark. If drawdown reaches
max_drawdown_pcton three consecutive readings, the kill switch trips and flattens all live positions without asking. Passingmax_daily_loss_pcttriggers the daily-loss halt. Paper is never halted. - Liquidation watch — about every 60 s it measures each live position's distance to liquidation and alerts at a warning (
< 15%) or critical (< 7%) band. - Reconciliation — about every 600 s it compares exchange positions with the local books; on a mismatch it blocks new entries and alerts you. A single empty read is never treated as "everything closed".
- Freeze detection — if its own heartbeat goes stale past
daemon_tick_max_stale_seconds(default 600), it goes red and alerts.
In Manual mode the market loop itself pauses (status paused_manual): no price feed, so the per-tick checks that ride on it don't run either. Don't leave live positions open in Manual. The strip's Daemon ACTIVE light shows the process is up, not that the market loop is running.
These controls act without waiting for you. See risk & safety for how to read and respond to them.
Caveats
- Paper is the supported mode. Live is unsupported and at your own risk, and promotion into live always needs your confirmation.
- The loop needs an AI provider to create anything; without one, creation runs queue and wait.
- Daemon health shows in health monitoring through the heartbeat; if it goes stale, see troubleshooting before assuming the loop has stopped.
Related
Settings
The Settings hub at /settings — Home, Data, Lab, Trading, Portfolio, HyperLiquid, Notifications, System and Danger Zone — plus the save bar, the typed LIVE confirmation, range captions, the setup wizard, factory reset, approval modes and the operator profile.
Evolution & recalibration
How Forven advances surviving strategies through the pipeline, keeps the agents from minting the same idea over and over, and re-tunes parameters when the market regime shifts — only when a backtest proves the change is better.