Wordcloud
Strategy: TrainCatBoostStrategy
Downloaded: 20220112
Stoploss: 0
The TrainCatBoostStrategy is a strategy used for backtesting trading strategies. It implements the IStrategy interface from the freqtrade.strategy module. Here's a breakdown of what the strategy does: The informative_pairs method retrieves the current whitelist of trading pairs and creates a list of pairs with their corresponding informative timeframe.

The get_strategy method loads a strategy based on its name, using the config and StrategyResolver from the freqtrade.resolvers module.

It caches the loaded strategy to avoid redundant loading.

The populate_indicators method is responsible for populating indicators on the provided dataframe. In this implementation, it does not modify the dataframe. The populate_buy_trend method populates buy signals for the trading strategies. It iterates over a list of predefined strategy names (STRATEGIES) and executes the following steps for each strategy: Retrieves the strategy object using the get_strategy method. Calls the strategy's advise_indicators method to populate indicators on the provided dataframe. Calculates the buy signals using the strategy's advise_buy method and adds them as a column to the dataframe. Prepares the data for training a CatBoost classifier by selecting relevant columns, handling missing values, and identifying categorical features. Creates a Pool object for training the classifier. Loads a pre-trained baseline model if available; otherwise, creates a new CatBoost classifier. Trains the model using the dataset. Combines the baseline model and the trained model using the sum_models function with a merging policy. Saves the final model for future use. Generates buy predictions using the trained model and adds a column "buy_proba" to the dataframe. Converts the buy probabilities into binary buy signals based on a threshold (0.7) and adds a "buy" column to the dataframe. The populate_sell_trend method is similar to populate_buy_trend but populates sell signals instead. It follows the same steps as populate_buy_trend but uses the strategy's advise_sell method and saves the final model as "sell_model". The resulting sell probabilities and signals are stored in the "sell_proba" and "sell" columns of the dataframe, respectively. In summary, the TrainCatBoostStrategy combines multiple trading strategies (STRATEGIES) and uses CatBoost classifiers to generate buy and sell signals based on the populated indicators. The strategy trains separate models for buy and sell signals and combines them with a baseline model. The resulting probabilities are thresholded to generate binary signals for executing trades.

stoploss: 0
timeframe: 5m
hash(sha256): 5ff5c13b62e37bf9371f3cd84fc671bbd8c417ed757a8462ffd750987b133176
indicators:
sell f"strat_buy_signal_strategy_name buy_proba sell_proba f"strat_sell_signal_strategy_name
buy col

No similar strategies found. (based on used indicators)

last change: 2024-04-29 13:09:18