sim_platform.market.connectors¶
The interface for connecting a data vendor without bypassing look-ahead protection.
A connector reads from a vendor (Bloomberg, Refinitiv, FactSet, a database) and yields
records that carry their own publication time. export_connector writes them in the
formats the platform already loads, so every experiment reads vendor data through the same
point-in-time stores, tools and disguise as files: a connector never hands data to an
Agent directly. Market Lab ships no paid-data connector; write one with this Protocol.
- class sim_platform.market.connectors.DataConnector(*args, **kwargs)[source]¶
Bases:
ProtocolYields point-in-time records for one symbol; each method may yield nothing.
- fundamentals(symbol)[source]¶
Rows with symbol, metric, period_end, value, available_date, optional unit/form.
available_datemust be when the figure became public, never the period end.- Parameters:
symbol (str)
- Return type:
Iterable[Dict[str, Any]]
- sim_platform.market.connectors.export_connector(connector, symbol, folder, session_start, *, delay_seconds=0, provenance=None)[source]¶
Write a connector’s records as fundamentals CSV, news JSON and documents JSON.
Returns the paths written (None for a kind with no records); pass them as
fundamentals_path, the experiment’s news file anddocuments_path.- Parameters:
connector (DataConnector)
symbol (str)
folder (str | PathLike[str])
session_start (str)
delay_seconds (int)
provenance (str | None)
- Return type:
Dict[str, str | None]