Hello, community! 👋

The cryptocurrency market is chaos, volatility, and 24/7 stress. Can it be tamed with mathematics and code?

Recently, I've been working on a pet project — a trading agent based on Ensemble Machine Learning. This is not just a "bot on RSI", but a complex architecture that combines three different neural networks for decision-making.

I want to share the technical details and architecture. This is purely a technical overview of the experiment, not a call to action.

🧠 'Brain' of the system: What is Ensemble Learning?

One model often makes mistakes. Therefore, I used the Ensemble approach — it's like a board of directors, where the decision is made by voting from three different experts.

My agent analyzes pairs (BTC, ETH, BNB, SOL, XRP) across different timeframes using three models:

1. CatBoost (Analyst):

• Gradient boosting algorithm.

• What it does: Searches for nonlinear relationships among 31 indicators (RSI, volumes, volatility).

• Strength: Highest accuracy (AUC ~0.75) on tabular data.

2. Transformer (Strategist):

• The same architecture that underlies ChatGPT, but for numbers.

• What it does: Analyzes 512 candles of history through the Self-Attention mechanism.

• Strength: Sees global patterns and long-term contexts.

3. TCN (Tactics):

• Temporal Convolutional Network.

• What it does: Focuses on local trends.

• Strength: Very fast and effective for short-term predictions.

📊 How is the decision made?

Each model 'votes'. The agent takes a weighted average of their forecasts. This allows filtering out false signals: if one model panics while two others remain calm — the trade does not open.

🛡 Risk management > Profit

The main problem with bots is that they can 'drain' the deposit overnight. So I built a protection system even before I taught it to trade:

• Dynamic stops: Stop-Loss and Take-Profit are not fixed but adapt to market volatility (via ATR). If the market jumps — stops are wider, if flat — narrower.

• Dual-speed architecture:

• Slow Cycle (5 min): Thinks, selects the best coins for the Watchlist.

• Fast Cycle (1 sec): Executes trades, monitors spreads and liquidity.

• Protection from 'Tilt': Limit on daily drawdown (max 3%), limit on open positions, and cooldown periods between trades.

📈 Test results (Honest numbers)

On historical data (Backtesting), the system shows an AUC metric of 0.71-0.73.

For reference: AUC 0.5 is flipping a coin. AUC 0.7+ is already statistically significant ability to predict direction.

This does not mean a 'money button', but it provides a positive mathematical expectation when adhering to risk management (Risk/Reward ratio 1:2).

🚀 Roadmap: What's next?

The project is in the active development stage. Here’s what I plan to add:

1. Orderbook Analysis: Train the neural network to look not only at price but also at the order book (imbalance of buyers/sellers).

2. Regime Adaptation: The agent must understand what is currently happening in the market: trend or range, and automatically adjust the weights of the models.

3. Reinforcement Learning (RL): Add an agent that will learn to manage position size, 'punishing' itself for losses and 'rewarding' for correct entries.

💻 Technical stack: Python, Asyncio, PyTorch, CatBoost. Hardware: NVIDIA RTX 4070.

I am curious to hear the opinions of other developers and traders: how do you feel about AI in trading? Do you believe that algorithms can outperform the market over time?

Leave your comments! 👇

$BTC

BTC
BTCUSDT
76,800
-2.66%

$BNB

BNB
BNBUSDT
679.19
-2.00%

$ETH

ETH
ETHUSDT
2,408.59
-2.51%