forward_fill#
API documentation for tradingstrategy.utils.forward_fill Python module in Trading Strategy.
Module description#
OHLCV data forward fill.
Forward fill missing OHLCV candles in market data feeds.
Trading Strategy market data feeds are sparse by default, to save bandwidth
DEXes small cap pairs see fewtrades and if there are no trades in a time frame, no candle is generated
Forward-filled data is used on the client side
We need to forward fill to make price look up, especially for stop losses faster, as forward-filled data can do a simple index look up to get a price, instead of backwinding to the last available price
Functions#
|
Add a virtual OHLCV value at the end of the pair OHLCV data series if there is no real value. |
|
|
|
Forward-fill OHLCV data for single or multiple trading pairs. |
|
Forward-fill OHLCV data in a Pandas DataFrame, ensuring OHCLV logical consistency. |
|
Create a new placeholder OHLCV entry based on the last valid entry. |
|
Pads a Pandas DataFrame with NaN entries for all columns up to a given end timestamp, using the inferred frequency of the DataFrame. |
|
Downsample or upsample OHLCV candles or liquidity samples. |
|
Upsample a OHLCV trading pair data to a lower time bucket. |
|
Forward-fill OHLCV data for multiple trading pairs. |