API index
Tradefloor's public APIs, grouped by task. Signatures and types are derived from the current package.
Market
Agents and evaluation
Counterfactuals
Reproducibility
Execution
Data and integrations
The task-based index covers the main APIs. The complete index below lists every supported public symbol.
Integrations
Complete index
Every symbol in tradefloor.__all__, plus the optional submodules installed through extras, alphabetically. This list is checked against the package. A symbol whose reference column says so is covered by advanced and compatibility exports below.
| SYMBOL | MODULE | CATEGORY | REFERENCE |
|---|---|---|---|
| Agent | tradefloor.harness | evaluation | reference |
| AgentRecord | tradefloor.ranking | evaluation | reference |
| __version__ | tradefloor | utility | exported; no dedicated reference |
| agree | tradefloor.counterfactual | counterfactuals | reference |
| Agreement | tradefloor.counterfactual | counterfactuals | reference |
| apply_mispricing | tradefloor._core | model utility | exported; no dedicated reference |
| ArrowStream | tradefloor._core | data | reference |
| atlas | tradefloor.atlas | model utility | exported; no dedicated reference |
| baselines | tradefloor.baselines | evaluation | reference |
| branch | tradefloor.checkpoint | reproducibility | reference |
| capture_ratio | tradefloor.baselines | evaluation | reference |
| characteristic_root_moduli | tradefloor._core | model utility | exported; no dedicated reference |
| check_rate | tradefloor._core | model utility | exported; no dedicated reference |
| Checkpoint | tradefloor.checkpoint | reproducibility | reference |
| compare | tradefloor.counterfactual | counterfactuals | reference |
| Comparison | tradefloor.counterfactual | counterfactuals | reference |
| counterfactual | tradefloor.counterfactual | counterfactuals | reference |
| crowd_adjusted_root_moduli | tradefloor._core | model utility | exported; no dedicated 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 |
| facts | tradefloor.facts | trust | exported; no dedicated reference |
| fair_value | tradefloor._core | model utility | exported; no dedicated reference |
| FairValue | tradefloor._core | model | exported; no dedicated reference |
| Fill | tradefloor._core | market | reference |
| Firing | tradefloor.interventions | scenarios | reference |
| flow_impact | tradefloor | execution | reference |
| FlowImpact | tradefloor | execution | reference |
| GameRng | tradefloor._core | utility | exported; no dedicated reference |
| gym | tradefloor.gym | integration | reference |
| impulse_response | tradefloor._core | model utility | exported; no dedicated reference |
| Instrument | tradefloor._core | market | reference |
| Intervention | tradefloor.interventions | scenarios | reference |
| integrations | tradefloor.integrations | integration | reference |
| interventions | tradefloor.interventions | scenarios | reference |
| leaderboard | tradefloor.harness | evaluation | reference |
| loss | tradefloor.loss | trust | exported; no dedicated reference |
| Macro | tradefloor._core | market | reference |
| manifest | tradefloor.manifest | reproducibility | reference |
| market_status | tradefloor._core | utility | exported; no dedicated reference |
| MatchResult | tradefloor._core | market | reference |
| MispricingState | tradefloor._core | model | exported; no dedicated reference |
| mcp | tradefloor.mcp | integration | reference |
| model_preset | tradefloor._core | model | reference |
| ModelParams | tradefloor._core | model | reference |
| News | tradefloor._core | market | reference |
| NewsImpact | tradefloor._core | market | reference |
| Observation | tradefloor.harness | evaluation | reference |
| OrderBook | tradefloor._core | market | reference |
| OrderError | tradefloor._core | errors | reference |
| Portfolio | tradefloor.portfolio | evaluation | exported; no dedicated reference |
| Position | tradefloor.portfolio | evaluation | exported; no dedicated reference |
| PriceLevel | tradefloor._core | market | reference |
| rank | tradefloor.ranking | evaluation | reference |
| Ranking | tradefloor.ranking | evaluation | reference |
| reference_agents | tradefloor.baselines | evaluation | reference |
| replay | tradefloor.replay | reproducibility | reference |
| run_many | tradefloor | market | reference |
| run_scenario | tradefloor.scenario | scenarios | reference |
| RunManifest | tradefloor.manifest | reproducibility | reference |
| Scenario | tradefloor.scenario | scenarios | reference |
| ScenarioValidationError | tradefloor.interventions | errors | reference |
| Scorecard | tradefloor.harness | evaluation | reference |
| sector_daily_sigma | tradefloor._core | model utility | exported; no dedicated reference |
| sectors | tradefloor._core | utility | exported; no dedicated reference |
| spec | tradefloor.spec | evaluation | reference |
| SPEC_VERSION | tradefloor.spec | evaluation | exported; no dedicated reference |
| stationary_sigma | tradefloor._core | model utility | exported; no dedicated reference |
| step_mispricing_daily | tradefloor._core | model utility | exported; no dedicated reference |
| StrategySpec | tradefloor.spec | evaluation | reference |
| sweep | tradefloor.sweep | evaluation | exported; no dedicated reference |
| SweepCost | tradefloor._core | market | reference |
| TARGETS | tradefloor.interventions | scenarios | reference |
| tca | tradefloor.tca | execution | reference |
| TickResult | tradefloor._core | market | reference |
| Universe | tradefloor | market | reference |
| TradingEnv | tradefloor.gym | integration | reference |
| UNSUPPORTED_TARGETS | tradefloor.interventions | scenarios | reference |
| ValidationError | tradefloor._core | errors | reference |
| version | tradefloor._core | utility | exported; no dedicated reference |
| World | tradefloor.counterfactual | counterfactuals | reference |
| yaml_subset | tradefloor.yaml_subset | utility | exported; no dedicated reference |
Advanced and compatibility exports
Every symbol below is in tradefloor.__all__ for 0.6.0 and stays there for the life of the release. This section is the canonical reference for the ones without a page of their own: the import path, the signature the package carries, and how much a caller may lean on it. Signatures and one-line purposes are read from the released wheel.
| SIGNATURE | IMPORT | STABILITY | PURPOSE |
|---|---|---|---|
| Portfolio(cash: 'float' = 1000000.0, *, max_leverage: 'float | None' = None) -> 'None' | tradefloor.portfolio | supported | Cash, positions and P&L for one trader. Members: cash, clear_flow, execute, fills, fills_table, gross_exposure, leverage, market_value, marks, max_leverage, net_worth, pending_flow, pnl, positions, realised, stamp, starting_cash, 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.6.0' | 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) | 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 objective: band distance, noise-scaled, diagonally weighted. |
| 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: which parameters move which outputs, what shape each effect has, and what trades are available at once. Its audience is whoever calibrates the model, and its tutorial pages were retired because this site is a path for people running the simulator.