API index
tradefloor's public API, grouped by task.
Market
Agents and evaluation
Counterfactuals
Reproducibility
Execution
Data and integrations
The complete index below lists every supported public symbol.
Integrations
Complete index
Every symbol in tradefloor.__all__, plus the optional submodules that extras install, in alphabetical order. A symbol with no link in the reference column is covered under advanced and compatibility exports below.
| Symbol | Module | Category | Reference |
|---|---|---|---|
| Agent | tradefloor.harness | evaluation | reference |
| AgentRecord | tradefloor.ranking | evaluation | reference |
| agree | tradefloor.counterfactual | counterfactuals | reference |
| Agreement | tradefloor.counterfactual | counterfactuals | reference |
| apply_mispricing | tradefloor._core | model utility | exported, with no page of its own |
| ArrowStream | tradefloor._core | data | reference |
| atlas | tradefloor.atlas | model utility | exported, with no page of its own |
| baselines | tradefloor.baselines | evaluation | reference |
| Battery | tradefloor.fingerprint | evaluation | reference |
| battery | tradefloor.fingerprint | evaluation | reference |
| BATTERY_VERSION | tradefloor.fingerprint | evaluation | reference |
| bonds | tradefloor | market | reference |
| boundary | tradefloor.boundary | counterfactuals | reference |
| BoundaryMap | tradefloor.boundary | counterfactuals | reference |
| branch | tradefloor.checkpoint | reproducibility | reference |
| callable | tradefloor.integrations.callable | integration | reference |
| Cancel | tradefloor.portfolio | execution | reference |
| capture_ratio | tradefloor.baselines | evaluation | reference |
| capture_withheld | tradefloor.baselines | evaluation | reference |
| Cell | tradefloor.fingerprint | evaluation | reference |
| characteristic_root_moduli | tradefloor._core | model utility | exported, with no page of its own |
| check_rate | tradefloor._core | model utility | exported, with no page of its own |
| Checkpoint | tradefloor.checkpoint | reproducibility | reference |
| commit | tradefloor.fingerprint | trust | reference |
| common | tradefloor.integrations.common | integration | reference |
| compare | tradefloor.counterfactual | counterfactuals | reference |
| Comparison | tradefloor.counterfactual | counterfactuals | reference |
| counterfactual | tradefloor.counterfactual | counterfactuals | reference |
| crisis_epicentre_solve | tradefloor._core | model utility | exported, with no page of its own |
| crowd_adjusted_root_moduli | tradefloor._core | model utility | exported, with no page of its own |
| DayLedger | tradefloor.manifest | reproducibility | reference |
| Divergence | tradefloor.counterfactual | counterfactuals | reference |
| edgar | tradefloor.edgar | data | reference |
| Engine | tradefloor._core | market | reference |
| EngineBatch | tradefloor._core | market | reference |
| envelope | tradefloor.envelope | trust | reference |
| evaluate | tradefloor.harness | evaluation | reference |
| Execution | tradefloor.tca | execution | reference |
| explain | tradefloor.explain | trust | reference |
| Explanation | tradefloor.explain | trust | reference |
| externalities | tradefloor.externality | evaluation | exported, with no page of its own |
| Externality | tradefloor.externality | evaluation | exported, with no page of its own |
| externality | tradefloor.externality | evaluation | exported, with no page of its own |
| facts | tradefloor.facts | trust | exported, with no page of its own |
| fair_value | tradefloor._core | model utility | exported, with no page of its own |
| FairValue | tradefloor._core | model | exported, with no page of its own |
| Fill | tradefloor._core | market | reference |
| Fingerprint | tradefloor.fingerprint | evaluation | reference |
| fingerprint | tradefloor.fingerprint | evaluation | reference |
| FingerprintComparison | tradefloor.fingerprint | evaluation | reference |
| Firing | tradefloor.interventions | scenarios | reference |
| Flip | tradefloor.boundary | counterfactuals | reference |
| flip | tradefloor.boundary | counterfactuals | reference |
| flow_impact | tradefloor | execution | reference |
| FlowImpact | tradefloor | execution | reference |
| GameRng | tradefloor._core | utility | exported, with no page of its own |
| gym | tradefloor.gym | integration | reference |
| HiddenState | tradefloor.sandbox | evaluation | reference |
| History | tradefloor.harness | evaluation | reference |
| impulse_response | tradefloor._core | model utility | exported, with no page of its own |
| Instrument | tradefloor._core | market | reference |
| integrations | tradefloor.integrations | integration | reference |
| Intervention | tradefloor.interventions | scenarios | reference |
| interventions | tradefloor.interventions | scenarios | reference |
| Invariance | tradefloor.counterfactual | integration | reference |
| invariance | tradefloor.counterfactual | integration | reference |
| JSONRenderer | tradefloor.render | integration | reference |
| langgraph | tradefloor.integrations.langgraph | integration | reference |
| leaderboard | tradefloor.harness | evaluation | reference |
| Limit | tradefloor.portfolio | execution | reference |
| loss | tradefloor.loss | trust | exported, with no page of its own |
| Macro | tradefloor._core | market | reference |
| manifest | tradefloor.manifest | reproducibility | reference |
| map_boundaries | tradefloor.boundary | counterfactuals | reference |
| market_status | tradefloor._core | utility | exported, with no page of its own |
| MarketView | tradefloor.sandbox | evaluation | reference |
| MatchResult | tradefloor._core | market | reference |
| mcp | tradefloor.mcp | integration | reference |
| MispricingState | tradefloor._core | model | exported, with no page of its own |
| model_preset | tradefloor._core | model | reference |
| ModelParams | tradefloor._core | model | reference |
| News | tradefloor._core | market | reference |
| NewsImpact | tradefloor._core | market | reference |
| Node | tradefloor.explain | trust | reference |
| noise | tradefloor.noise | reproducibility | exported, with no page of its own |
| Observation | tradefloor.harness | evaluation | reference |
| openai_agents | tradefloor.integrations.openai_agents | integration | reference |
| oracle_is_ceiling | tradefloor.baselines | evaluation | reference |
| OrderBook | tradefloor._core | market | reference |
| OrderError | tradefloor._core | errors | reference |
| Portfolio | tradefloor.portfolio | evaluation | reference |
| PortfolioView | tradefloor.sandbox | evaluation | reference |
| Position | tradefloor.portfolio | evaluation | exported, with no page of its own |
| preset_names | tradefloor._core | model | reference |
| preset_record | tradefloor.records | model | reference |
| preset_records | tradefloor.records | model | reference |
| PriceLevel | tradefloor._core | market | reference |
| pydantic_ai | tradefloor.integrations.pydantic_ai | integration | reference |
| rank | tradefloor.ranking | evaluation | reference |
| Ranking | tradefloor.ranking | evaluation | reference |
| RATE_SECTOR | tradefloor | market | reference |
| rate_specs | tradefloor | market | reference |
| RATE_TICKERS | tradefloor | market | reference |
| reference_agents | tradefloor.baselines | evaluation | reference |
| render | tradefloor.render | integration | reference |
| Renderer | tradefloor.render | integration | reference |
| replay | tradefloor.replay | reproducibility | reference |
| Resample | tradefloor.counterfactual | counterfactuals | reference |
| resample | tradefloor.counterfactual | counterfactuals | reference |
| reveal | tradefloor.fingerprint | trust | reference |
| run_many | tradefloor | market | reference |
| run_scenario | tradefloor.scenario | scenarios | reference |
| RunManifest | tradefloor.manifest | reproducibility | reference |
| sandbox | tradefloor.sandbox | evaluation | reference |
| SandboxError | tradefloor.sandbox | errors | reference |
| Scenario | tradefloor.scenario | scenarios | reference |
| ScenarioValidationError | tradefloor.interventions | errors | reference |
| Scorecard | tradefloor.harness | evaluation | reference |
| sealed_battery | tradefloor.fingerprint | evaluation | reference |
| sector_daily_sigma | tradefloor._core | model utility | exported, with no page of its own |
| sectors | tradefloor._core | utility | exported, with no page of its own |
| spec | tradefloor.spec | evaluation | reference |
| SPEC_VERSION | tradefloor.spec | evaluation | exported, with no page of its own |
| stationary_sigma | tradefloor._core | model utility | exported, with no page of its own |
| step_mispricing_daily | tradefloor._core | model utility | exported, with no page of its own |
| StrategySpec | tradefloor.spec | evaluation | reference |
| sweep | tradefloor.sweep | evaluation | exported, with no page of its own |
| SweepCost | tradefloor._core | market | reference |
| TARGETS | tradefloor.boundary | scenarios | reference |
| tca | tradefloor.tca | execution | reference |
| TextRenderer | tradefloor.render | integration | reference |
| TickResult | tradefloor._core | market | reference |
| TradingEnv | tradefloor.gym | integration | reference |
| Universe | tradefloor | market | reference |
| UNSUPPORTED_TARGETS | tradefloor.interventions | scenarios | reference |
| ValidationError | tradefloor._core | errors | reference |
| Verification | tradefloor.manifest | reproducibility | reference |
| version | tradefloor._core | utility | exported, with no page of its own |
| __version__ | tradefloor | utility | exported, with no page of its own |
| versus_buy_and_hold | tradefloor.baselines | evaluation | reference |
| World | tradefloor.counterfactual | counterfactuals | reference |
| yaml_subset | tradefloor.yaml_subset | utility | exported, with no page of its own |
Advanced and compatibility exports
Every symbol below is in tradefloor.__all__ and stays there for the life of the release. For a symbol with no page of its own, this table is the reference. It gives the import path, the signature and how far you can rely on the symbol.
| Signature | Import | Stability | Purpose |
|---|---|---|---|
| Portfolio(cash: 'float' = 1000000.0, *, max_leverage: 'float | None' = None, cash_interest: 'bool' = False, owner: 'str' = 'agent', margin_interest: 'bool' = True) -> 'None' | tradefloor.portfolio | supported | Cash, positions and P&L for one trader. Members: accrue, cancel, cash, cash_interest, clear_flow, execute, fills, fills_table, gross_exposure, interest, leverage, margin_interest, market_value, marks, max_leverage, net_worth, open_orders, owner, pending_flow, pnl, positions, quantity_of, realised, stamp, starting_cash, submit_limit, sync, unrealised. |
| Position(ticker: 'str') -> 'None' | tradefloor.portfolio | supported | A holding in one instrument. Members: avg_cost, market_value, quantity, realised, ticker, unrealised. |
| SPEC_VERSION: int = 1 | tradefloor | supported | The StrategySpec schema version. A spec written against an older number still loads. One written against a newer number does not, so a manifest that records it says whether this install can replay the run. |
| sweep(seeds: 'Iterable[int]', *, universe: 'Sequence[Instrument]', days: 'int' = 1, ticks_per_day: 'int' = 390, macro: 'Macro | None' = None, scenario: 'Any' = None, collect: 'str' = 'bars', grain: 'str | None' = None, minutes: 'int | None' = None, start: 'tuple[int, int, int]' = (9, 30, 3), workers: 'int' = 1, model: 'str | ModelParams | None' = None) -> 'Iterator[tuple[int, Any]]' | tradefloor.sweep | supported | Yield (seed, table) for each seed, one at a time. |
| __version__: str = '0.8.7' | tradefloor | compatibility | The installed package version, as a string. It is what a RunManifest records and what a published result cites. |
| apply_mispricing(fair_value, s) | tradefloor._core | advanced | Price from fair value and mispricing: fair_value * exp(s), floored. |
| tradefloor.atlas | tradefloor.atlas | advanced | Atlas: a map of how the model responds, instead of a search that guesses. |
| characteristic_root_moduli(phi=None, theta=None) | tradefloor._core | advanced | Moduli of the AR(2) characteristic roots. |
| check_rate(name, fraction) | tradefloor._core | advanced | Validate a fractional rate, raising ValueError if it looks wrong. |
| crowd_adjusted_root_moduli() | tradefloor._core | advanced | The same, with the crowd-feedback term included. |
| tradefloor.facts | tradefloor.facts | advanced | Stylised facts: what these markets look like, measured, next to real ones. |
| fair_value(*, eps=None, sector, revenue_growth=None, federal_funds_rate=0.0, corporate_bond_yield=None, qe_pe_boost=None, book_value_per_share=None, neutral_discount_rate=None) | tradefloor._core | advanced | Fair value per share from fundamentals and the macro state. |
| FairValue | tradefloor._core | advanced | A fair-value result and its decomposition. Members: book_value_path, fair_value, qe_adjustment, rate_adjustment, sector_anchor_pe, target_pe. |
| GameRng(seed, sequence) | tradefloor._core | advanced | Deterministic seeded random number generator (PCG32 + Box-Muller). Members: next_bool, next_float, next_int, next_normal. |
| impulse_response(horizon_days, phi=None, theta=None) | tradefloor._core | advanced | Impulse response of the daily process over horizon_days. |
| tradefloor.loss | tradefloor.loss | advanced | The calibration objectives: band distance, and a residual scoring rule. |
| market_status(hour, minute, day_of_week) | tradefloor._core | advanced | Which session a moment falls in. |
| MispricingState(s=0.0, s_prev=None) | tradefloor._core | advanced | The daily log-mispricing state. Members: s, s_prev. |
| sector_daily_sigma(sector) | tradefloor._core | advanced | A sector's long-run daily return standard deviation, as a fraction. |
| sectors() | tradefloor._core | advanced | The twelve sector keys, in contractual declaration order. |
| stationary_sigma(innovation_sigma, *, phi=None, theta=None) | tradefloor._core | advanced | Standard deviation of the daily mispricing process at rest. |
| step_mispricing_daily(state, *, innovation=0.0, shock=0.0) | tradefloor._core | advanced | One DAILY step of the mispricing process. |
| version() | tradefloor._core | compatibility | The compiled core's version, as a string. It reports the same value as __version__ and is kept for callers written before that attribute existed. |
| tradefloor.yaml_subset | tradefloor.yaml_subset | advanced | A reader for the boring part of YAML, and nothing else. |
Atlas surveys the model's parameter space. It reports which parameters move which outputs, what shape each effect has, and which trades are available at once. It is meant for people who calibrate the model, and these docs have no tutorial for it.