fill_missing_ohlcv#
API documentation for tradingstrategy.utils.gap.fill_missing_ohlcv Python function.
- fill_missing_ohlcv(df, columns_to_fill=['open', 'high', 'low', 'close', 'volume', 'tvl'])[source]#
Fill missing timestamps for each pair_id with zeros for specified columns.
- dfpandas.DataFrame
Input DataFrame with MultiIndex (pair_id, timestamp)
- columns_to_zerolist, optional
Columns to fill with zeros when data is missing
- pandas.DataFrame
DataFrame with missing timestamps filled with zeros