mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 14:00:38 +00:00
Deployed 9baa6ee to develop in en with MkDocs 1.6.1 and mike 2.1.3
This commit is contained in:
@@ -2103,6 +2103,17 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#catboost-models-in-freqai" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Catboost models in freqAI
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -2421,6 +2432,17 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#catboost-models-in-freqai" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Catboost models in freqAI
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -2534,6 +2556,15 @@ you can verify this with <code>freqtrade list-data --exchange <yourexchange&g
|
||||
<p>Additional arguments to the above commands may be necessary, like configuration files or explicit user_data if they deviate from the default.</p>
|
||||
</div>
|
||||
<p><strong>Hyperliquid</strong> is a special case now - which will no longer require 1h mark data - but will use regular candles instead (this data never existed and is identical to 1h futures candles). As we don't support download-data for hyperliquid (they don't provide historic data) - there won't be actions necessary for hyperliquid users.</p>
|
||||
<h2 id="catboost-models-in-freqai">Catboost models in freqAI<a class="headerlink" href="#catboost-models-in-freqai" title="Permanent link">¶</a></h2>
|
||||
<p>CatBoost models have been removed with version 2025.12 and are no longer actively supported.
|
||||
If you have existing bots using CatBoost models, you can still use them in your custom models by copy/pasting them from the git history (as linked below) and installing the Catboost library manually.
|
||||
We do however recommend switching to other supported model libraries like LightGBM or XGBoost for better support and future compatibility.</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/freqtrade/freqtrade/blob/c6f3b0081927e161a16b116cc47fb663f7831d30/freqtrade/freqai/prediction_models/CatboostRegressor.py">CatboostRegressor</a></li>
|
||||
<li><a href="https://github.com/freqtrade/freqtrade/blob/c6f3b0081927e161a16b116cc47fb663f7831d30/freqtrade/freqai/prediction_models/CatboostClassifier.py">CatboostClassifier</a></li>
|
||||
<li><a href="https://github.com/freqtrade/freqtrade/blob/c6f3b0081927e161a16b116cc47fb663f7831d30/freqtrade/freqai/prediction_models/CatboostClassifierMultiTarget.py">CatboostClassifierMultiTarget</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2566,25 +2566,25 @@ will cause the algorithm to fail in live/dry mode. In order to add generalized f
|
||||
</code></pre></div>
|
||||
<p>If this value is set, FreqAI will initially use the predictions from the training data and subsequently begin introducing real prediction data as it is generated. FreqAI will save this historical data to be reloaded if you stop and restart a model with the same <code>identifier</code>.</p>
|
||||
<h2 id="using-different-prediction-models">Using different prediction models<a class="headerlink" href="#using-different-prediction-models" title="Permanent link">¶</a></h2>
|
||||
<p>FreqAI has multiple example prediction model libraries that are ready to be used as is via the flag <code>--freqaimodel</code>. These libraries include <code>CatBoost</code>, <code>LightGBM</code>, and <code>XGBoost</code> regression, classification, and multi-target models, and can be found in <code>freqai/prediction_models/</code>.</p>
|
||||
<p>FreqAI has multiple example prediction model libraries that are ready to be used as is via the flag <code>--freqaimodel</code>. These libraries include <code>LightGBM</code>, and <code>XGBoost</code> regression, classification, and multi-target models, and can be found in <code>freqai/prediction_models/</code>.</p>
|
||||
<p>Regression and classification models differ in what targets they predict - a regression model will predict a target of continuous values, for example what price BTC will be at tomorrow, whilst a classifier will predict a target of discrete values, for example if the price of BTC will go up tomorrow or not. This means that you have to specify your targets differently depending on which model type you are using (see details <a href="#setting-model-targets">below</a>).</p>
|
||||
<p>All of the aforementioned model libraries implement gradient boosted decision tree algorithms. They all work on the principle of ensemble learning, where predictions from multiple simple learners are combined to get a final prediction that is more stable and generalized. The simple learners in this case are decision trees. Gradient boosting refers to the method of learning, where each simple learner is built in sequence - the subsequent learner is used to improve on the error from the previous learner. If you want to learn more about the different model libraries you can find the information in their respective docs:</p>
|
||||
<ul>
|
||||
<li>CatBoost: <a href="https://catboost.ai/en/docs/">https://catboost.ai/en/docs/</a></li>
|
||||
<li>LightGBM: <a href="https://lightgbm.readthedocs.io/en/v3.3.2/#">https://lightgbm.readthedocs.io/en/v3.3.2/#</a></li>
|
||||
<li>XGBoost: <a href="https://xgboost.readthedocs.io/en/stable/#">https://xgboost.readthedocs.io/en/stable/#</a></li>
|
||||
<li>CatBoost: <a href="https://catboost.ai/en/docs/">https://catboost.ai/en/docs/</a> (No longer actively supported since 2025.12)</li>
|
||||
</ul>
|
||||
<p>There are also numerous online articles describing and comparing the algorithms. Some relatively lightweight examples would be <a href="https://towardsdatascience.com/catboost-vs-lightgbm-vs-xgboost-c80f40662924#:~:text=In%20CatBoost%2C%20symmetric%20trees%2C%20or,the%20same%20depth%20can%20differ.">CatBoost vs. LightGBM vs. XGBoost — Which is the best algorithm?</a> and <a href="https://medium.com/riskified-technology/xgboost-lightgbm-or-catboost-which-boosting-algorithm-should-i-use-e7fda7bb36bc">XGBoost, LightGBM or CatBoost — which boosting algorithm should I use?</a>. Keep in mind that the performance of each model is highly dependent on the application and so any reported metrics might not be true for your particular use of the model.</p>
|
||||
<p>Apart from the models already available in FreqAI, it is also possible to customize and create your own prediction models using the <code>IFreqaiModel</code> class. You are encouraged to inherit <code>fit()</code>, <code>train()</code>, and <code>predict()</code> to customize various aspects of the training procedures. You can place custom FreqAI models in <code>user_data/freqaimodels</code> - and freqtrade will pick them up from there based on the provided <code>--freqaimodel</code> name - which has to correspond to the class name of your custom model.
|
||||
Make sure to use unique names to avoid overriding built-in models.</p>
|
||||
<h3 id="setting-model-targets">Setting model targets<a class="headerlink" href="#setting-model-targets" title="Permanent link">¶</a></h3>
|
||||
<h4 id="regressors">Regressors<a class="headerlink" href="#regressors" title="Permanent link">¶</a></h4>
|
||||
<p>If you are using a regressor, you need to specify a target that has continuous values. FreqAI includes a variety of regressors, such as the <code>CatboostRegressor</code>via the flag <code>--freqaimodel CatboostRegressor</code>. An example of how you could set a regression target for predicting the price 100 candles into the future would be</p>
|
||||
<p>If you are using a regressor, you need to specify a target that has continuous values. FreqAI includes a variety of regressors, such as the <code>LightGBMRegressor</code>via the flag <code>--freqaimodel LightGBMRegressor</code>. An example of how you could set a regression target for predicting the price 100 candles into the future would be</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="n">df</span><span class="p">[</span><span class="s1">'&s-close_price'</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="s1">'close'</span><span class="p">]</span><span class="o">.</span><span class="n">shift</span><span class="p">(</span><span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
</code></pre></div>
|
||||
<p>If you want to predict multiple targets, you need to define multiple labels using the same syntax as shown above.</p>
|
||||
<h4 id="classifiers">Classifiers<a class="headerlink" href="#classifiers" title="Permanent link">¶</a></h4>
|
||||
<p>If you are using a classifier, you need to specify a target that has discrete values. FreqAI includes a variety of classifiers, such as the <code>CatboostClassifier</code> via the flag <code>--freqaimodel CatboostClassifier</code>. If you elects to use a classifier, the classes need to be set using strings. For example, if you want to predict if the price 100 candles into the future goes up or down you would set</p>
|
||||
<p>If you are using a classifier, you need to specify a target that has discrete values. FreqAI includes a variety of classifiers, such as the <code>LightGBMClassifier</code> via the flag <code>--freqaimodel LightGBMClassifier</code>. If you elects to use a classifier, the classes need to be set using strings. For example, if you want to predict if the price 100 candles into the future goes up or down you would set</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="n">df</span><span class="p">[</span><span class="s1">'&s-up_or_down'</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">where</span><span class="p">(</span> <span class="n">df</span><span class="p">[</span><span class="s2">"close"</span><span class="p">]</span><span class="o">.</span><span class="n">shift</span><span class="p">(</span><span class="o">-</span><span class="mi">100</span><span class="p">)</span> <span class="o">></span> <span class="n">df</span><span class="p">[</span><span class="s2">"close"</span><span class="p">],</span> <span class="s1">'up'</span><span class="p">,</span> <span class="s1">'down'</span><span class="p">)</span>
|
||||
</code></pre></div>
|
||||
<p>If you want to predict multiple targets you must specify all labels in the same label column. You could, for example, add the label <code>same</code> to define where the price was unchanged by setting</p>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user