NECTAR / THE EXPERIMENT
Learning needs evidence.
Can independently adapting agents improve decisions through shared observations and carefully assigned rewards? That is the question this system tests.
One market. Several decision-makers.
Conventional scouts form the control. Synthetic fly-inspired networks form the treatment. Each neural agent keeps a private simulated book; unmuted votes form an aggregate treatment position. Both lanes see the same market, but performance comparisons remain observational.
Per-fly books remain simulated even when one aggregate lane is explicitly connected to an exchange. The unmuted majority is a coordination mechanism, not evidence of accuracy.
Reward the action that took the risk.
Net equity changes include holding profit or loss, fees, funding and exit costs. Credit follows the policy and eligibility state that owned the position. A profitable short reinforces the short action. Forced exits retain responsibility for the originating position.
PAM and PPL are names for reward and punishment motifs. Losses have greater weight than equal gains; individual learning has a larger default coefficient than group learning. Reputation is a rolling heuristic, not a calibrated confidence probability.
Train separately. Test deliberately.
Historical scout search and neural diagnostics run in an isolated CPU process while forward trading continues. Neural diagnostics start fresh per job and pay modeled costs. Its weights are not automatically deployed. Scout parameter search uses an earlier 80% prefix, once per new completed candle, and stores historical scores separately from forward observations. The moving exclusion window is not a sealed test set.
The offline evaluator freezes one selected scout after 60% training and 20% validation, then reports the final 20% test period with flat and equal-risk long baselines and a doubled-fee stress case.
python -m nectar_swarm.evaluation --data-dir data --output evaluation.json
The command above evaluates scouts only. The full-swarm evaluator below runs the actual control, aggregate and private fly books through chronological hourly test windows:
python -m nectar_swarm.swarm_evaluation --data-dir data --output-dir data/experiments/first-comparison
It records the exact input features, budgets and configuration, then creates JSON and an interactive HTML report. Comparisons include frozen learning, peer-sensor and group-credit ablations, an experimental exposure/time reward and doubled fees. Seeds share the same market; they are not independent market samples.
Conditional block-bootstrap intervals describe these observations, not a probability of future profit. Promotion is disabled. Repeatedly tuning against the report makes these windows development data. The forward dollar-reward objective remains unchanged.
Continue a recorded simulation.
Recording is enabled by default. The desk's Run history opens saved runs and downloads their committed events, including earlier fills and parent history. A run marked open / interrupted has no recorded clean shutdown; it may no longer be running.
To resume, stop the desk and copy the saved run ID into your local .env:
VENUE=sim
CONNECTOME_BACKEND=retained
PERSIST_RUNS=1
RESUME_RUN_ID=YOUR_32_CHARACTER_RUN_ID
Restart with python -m nectar_swarm, keeping the same source, strategy/risk configuration and runtime. Recovery creates a new child run and waits for a fresh market observation. For the next continuation, use the child's ID; clear the setting to start a new experiment.
Only completed boundaries are saved. Market files and the isolated diagnostic research brain are not snapshotted; missed market activity is not replayed. JSONL downloads contain events, not model backups. Stop the desk before copying its data directory for a backup, including any SQLite sidecar files. Full instructions are in the repository's docs/RUNS.md.
Honesty banner
VENUE=sim uses aggressive local fills with spread, slippage and taker fees. These are not exchange orders and not proven alpha. No order queue, depth impact, liquidation or missed-fill model is included. Exchange fees remain estimated until actual fee ingestion is implemented.
The default retained backend is a synthetic mushroom-body motif, not an EM-derived biological subset. The optional full graph and mock backend are distinct experiments. The 3D fly is a visual explanation, not evidence of neural fidelity. No GPT model is connected or trained.
Completed simulation boundaries now retain their books, rewards and active retained-model state. Exchange-order recovery is still unresolved; a restart with an existing exchange position requires reconciliation. The watchdog cancels open orders only; it cannot protect a dead process or close a held position.
What earns the next improvement?
- Extend recorded runs with immutable market inputs and authenticated exchange-order recovery.
- Use the full-swarm evaluator on prospectively reserved, unseen market regimes.
- Extend reward and peer ablations with volatility normalization and fixed-time reward accumulation.
- Promote a candidate only after independent evaluation and reconciliation tests support it.