load_pair_candles_from_parquet#
API documentation for tradeexecutor.strategy.pandas_trader.alternative_market_data.load_pair_candles_from_parquet Python function.
- load_pair_candles_from_parquet(pair, file, column_map={'close': 'close', 'high': 'high', 'low': 'low', 'open': 'open', 'volume': 'volume'}, resample=None, include_as_trigger_signal=True)[source]#
Load a single pair price feed from an alternative file.
Overrides the current price candle feed with an alternative version, usually from a centralised exchange. This allows strategy testing to see there is no price feed data issues or specificity with it.
For example see
replace_candles()
.- Parameters:
pair (TradingPairIdentifier) –
The trading pair data this Parquet file contains.
E.g. ticker symbols and trading fee are read from this argument.
resample (Optional[TimeBucket]) – Resample OHLCV data to a higher timeframe
include_as_trigger_signal –
Create take profit/stop loss signal from the data.
For this, any upsampling is not used.
file (Path) –
- Raises:
NoMatchingBucket – Could not match candle time frame to any of our timeframes.
- Returns:
(Price feed universe, stop loss trigger candls universe) tuple.
Stop loss data is only generated if include_as_trigger_signal is True. Stop loss data is never resampled and is in the most accurate available resolution.
- Return type:
Tuple[GroupedCandleUniverse, tradingstrategy.candle.GroupedCandleUniverse | None]