quantlab.dataset.massive.raw.read_trades#
- quantlab.dataset.massive.raw.read_trades(path, columns=('ticker', 'conditions', 'correction', 'price', 'sequence_number', 'sip_timestamp', 'size', 'trf_id', 'exchange'))[source]#
Read the given columns of one trade file, with
TRADE_COLUMNStypes.The header must be the vendor’s verbatim: a file whose columns differ is refused rather than read by position.
- Raises:
- ValueError
If the file’s header is not
TRADE_COLUMNS.
Examples
Needs a trade file on disk; the default columns are
TRADE_BAR_INPUTS:trades = read_trades(raw_file("/data/quantlab/downloads/massive", "trades", date(2024, 11, 29)))