Strategy carries its portfolio, broker, pulse index, and stats. The serializers in
pulse.serializers turn those objects into plain dicts (or a DataFrame) so you can persist a run to
disk, transport it between processes, or reload it later without re-running the backtest.
Serialize a finished strategy
StrategyDictSerializer.serialize returns a JSON-friendly dict. Datetimes are kept as ISO strings, so
json.dumps with default=str covers the rest:
Reload it
deserialize reconstructs the Strategy, including its portfolio, broker, pulse index, and stats:
Plain
deserialize(data) returns a results objectIt is a base Strategy with no datafeed or resolver attached and no on_update. Use it to archive
runs, hand results to another process, or load them into a notebook for analysis.Resume a run after a data update
A stored run can be continued once new settlements are prepared. Restore it onto your own strategy class, extend its clock from a datafeed built after the update, and run withresume=True. Only
the new pulses run, and their PnL matches a continuous run over the whole calendar:
Trades as a DataFrame
For tabular analysis or columnar storage,TradeListPandasSerializer.serialize turns a list of trades
into a pandas DataFrame (one row per trade, with the serialized fields as columns):
TradeListPandasSerializer.deserialize(df) reverses it, returning the list of Trade objects.
The other serializers
Every serializer exposes the same staticserialize / deserialize pair and works standalone if you
only need one object:
Related: API overview - Serialization ·
Analyze trades after a run · Reading results

