Add documentation for merge_informative_pair helper
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
from freqtrade.exchange import (timeframe_to_minutes, timeframe_to_prev_date,
|
||||
timeframe_to_seconds, timeframe_to_next_date, timeframe_to_msecs)
|
||||
from freqtrade.strategy.interface import IStrategy
|
||||
from freqtrade.strategy.strategy_helper import merge_informative_pairs
|
||||
from freqtrade.strategy.strategy_helper import merge_informative_pair
|
||||
|
@@ -2,8 +2,8 @@ import pandas as pd
|
||||
from freqtrade.exchange import timeframe_to_minutes
|
||||
|
||||
|
||||
def merge_informative_pairs(dataframe: pd.DataFrame, informative: pd.DataFrame,
|
||||
timeframe_inf: str, ffill: bool = True) -> pd.DataFrame:
|
||||
def merge_informative_pair(dataframe: pd.DataFrame, informative: pd.DataFrame,
|
||||
timeframe_inf: str, ffill: bool = True) -> pd.DataFrame:
|
||||
"""
|
||||
Correctly merge informative samples to the original dataframe, avoiding lookahead bias.
|
||||
|
||||
@@ -15,6 +15,9 @@ def merge_informative_pairs(dataframe: pd.DataFrame, informative: pd.DataFrame,
|
||||
This way, the 14:00 1h candle is merged to 15:00 15m candle, since the 14:00 1h candle is the
|
||||
last candle that's closed at 15:00, 15:15, 15:30 or 15:45.
|
||||
|
||||
Assuming inf_tf = '1d' - then the resulting columns will be:
|
||||
date_1d, open_1d, high_1d, low_1d, close_1d, rsi_1d
|
||||
|
||||
:param dataframe: Original dataframe
|
||||
:param informative: Informative pair, most likely loaded via dp.get_pair_dataframe
|
||||
:param timeframe_inf: Timeframe of the informative pair sample.
|
||||
|
Reference in New Issue
Block a user