Neuro-Symbolic Trading: Combining Neural Networks with Symbolic Rules
The Problem with Pure Neural Trading
Pure neural network trading systems have a fundamental problem: they're black boxes. You can't inspect why they made a decision, you can't enforce risk rules, and they can fail catastrophically when market conditions change.
The Solution: Neuro-Symbolic Architecture
Neuro-symbolic trading combines:
- Neural networks for pattern recognition and prediction
- Symbolic rules for risk management and decision gating
The key insight: symbolic rules are checked BEFORE the neural network. The neural network cannot override them.
Architecture
Market Data
|
v
[Symbolic Rules] -- checked first
| |
| v
| [Block] if rules violated
|
v
[Neural Network] -- prediction
|
v
[Decision] -- final
Symbolic Rules (Python)
class SymbolicRules:
def check(self, signal, position, account):
# Rule 1: Never exceed max position size
if position.size + signal.size > account.max_position:
return False, "Position too large"
# Rule 2: Never trade without stop loss
if signal.type == "open" and signal.stop_loss is None:
return False, "Stop loss required"
# Rule 3: Never trade in unknown regime
if market.regime == "unknown":
return False, "Unknown market regime"
# Rule 4: Max drawdown check
if account.drawdown > account.max_drawdown:
return False, "Max drawdown exceeded"
return True, "OK"
Neural Network (Prediction)
class NeuralPredictor:
def predict(self, features):
# 60% technical indicators
technical = self.technical_model(features.rsi, features.macd, features.bollinger)
# 40% MoP-JEPA (Multi-output Prediction with Joint-Embedding Predictive Architecture)
mopa = self.mopa_model(features.candles, features.orderbook)
# Weighted combination
signal = 0.6 * technical + 0.4 * mopa
return signal
Combined Decision
def make_decision(market_data, position, account):
# Step 1: Neural prediction
signal = neural_predictor.predict(market_data)
# Step 2: Symbolic rule check (CANNOT be overridden)
approved, reason = symbolic_rules.check(signal, position, account)
if not approved:
log(f"Trade blocked: {reason}")
return HOLD
# Step 3: Execute
return signal.action
Benefits
- Safety: Symbolic rules prevent catastrophic losses
- Explainability: You can inspect why a trade was blocked
- Adaptability: Neural network adapts to market changes
- Reliability: Rules ensure consistent risk management
Results
- Win rate: 55.8% (BTC+ETH+SOL backtest)
- Max drawdown: controlled by symbolic rules
- No catastrophic losses (rules prevent them)
Next Steps
- Add more symbolic rules (regime detection, correlation limits)
- Improve neural predictor with more features
- Add continual learning for regime adaptation
This is a project from Nexus Trading - neuro-symbolic trading research.
Top comments (0)