🧠AI Optimization

Note: This is the initial release (V1) of the AI Clustering feature. Ongoing development will introduce further refinements and capabilities.

Transform Infinity Algo into a self-improving system that adapts to markets automatically.


🚀 Quick Setup

1

Enable AI

Turn ON 🧠 Enable AI Optimization in settings

2

Choose Mode

  • Backtesting?Static (Full History)

  • Live Trading?Walk-Forward

3

Select Signal Type

Choose AI or AI Sniper in Signal Mode

That's it! Default settings work for most users.


🎯 How AI Works

1️⃣ Simulate

2️⃣ Evaluate

3️⃣ Apply

Tests 100s-1000s of parameter combinations

Scores each using your metric

Implements best configuration

Walk-Forward: Periodically re-optimizes on a rolling in-sample window and validates out-of-sample, reducing overfitting.


⚙️ Core Settings

Optimization Modes

Mode
How It Works
Use For

Walk-Forward

Updates every N bars

Live trading

Static

Optimizes once, locks

Backtesting

Tip: Start with Static for testing, switch to Walk-Forward for live


📈 Simulation Settings

AI Sim TP% (Testing Only)

What they do:

  • Help AI evaluate strategies

  • Set internal profit targets

  • Default: 1.0% both directions

sim-settings:
Long TP: 1.0%
Short TP: 1.0%
Purpose: AI testing only
Real trades: Not affected

📊 Dashboard Display

Live Monitoring

When enabled, see:

  • ✅ Current optimal sensitivity

  • ✅ Selected thresholds

  • ✅ Win rate & metrics

  • ✅ Confidence score

  • ✅ Mode status

Status Indicators:

  • STATIC (LOCKED) - One-time optimization complete

  • OPTIMIZING - Currently calculating

  • SIMULATED - Results ready


💡 Best Practices

  1. Use Static for initial testing

  2. Select Balanced sensitivity

  3. Default 100 bar frequency

  4. Match metric to goals

  5. Walk-Forward needs ~535 bars for first optimization

  6. Static needs ~5000 bars total


🔧 Troubleshooting

Problem
Solution

Timeout

Use Static or increase frequency

No signals

Check AI Optimization is ON

Poor results

Try different metric/range

No dashboard

Enable in settings

Static fails

Need 5000+ bars data


⚡ Quick Reference

For Testing

  • Mode: Static

  • Range: Balanced

  • Metric: Total Profit

  • Frequency: N/A

  • Min bars: 5000

For Live Trading

  • Mode: Walk-Forward

  • Range: Balanced

  • Metric: Your preference

  • Frequency: 100 (default)

  • Min bars: 535


📚 Understanding Performance Metrics

Detailed Metric Explanations

Note: Infinity Algo computes metrics on per-trade returns with risk-free rate and MAR = 0. Industry definitions typically use time-series (daily/monthly) returns.

Classic Metrics

Metric
Formula
Best For

Total Profit

Sum of all P&L

Quick assessment

Win Rate

Wins ÷ Total trades × 100

Consistency check

Average P&L

Total P&L ÷ Trades

Trade quality

Gain-to-Pain

Σ gains / |Σ losses|

Risk/reward balance


Risk-Adjusted Metrics

Sharpe Ratio - Industry Standard

  • Formula: Excess return (over risk-free) ÷ Standard deviation

  • Infinity Algo: Uses risk-free = 0

  • Pros: Most widely used, easy comparison, considers total volatility

  • Cons: Penalizes upside volatility, assumes normal distribution

  • Benchmarks: ~1 = Good | ~2 = Very good | 3+ = Outstanding

Sortino Ratio - Downside Focus

  • Formula: Excess return (over target/MAR) ÷ Downside deviation

  • Infinity Algo: Uses MAR = 0

  • Pros: Only penalizes bad volatility, better for trend following

  • Cons: Requires defining target return, less standardized

  • Benchmarks: >1 = Good | >2 = Very good | >3 = Excellent

Calmar Ratio - Drawdown Protection

  • Formula: CAGR ÷ Maximum drawdown (commonly 36 months)

  • Pros: Focus on capital preservation, easy to understand

  • Cons: Based on single worst event, backward-looking

  • Benchmarks: >1 = Good | 3-5 = Strong

Martin Ratio - Ulcer Performance

  • Formula: Excess return ÷ Ulcer Index (RMS of drawdowns)

  • Pros: Considers all drawdowns, smooth equity curve focus

  • Cons: Less known/comparable, complex calculation

  • Use: Compare across your strategies

SQN - System Quality Number

  • Formula: (Expectancy ÷ Std Dev) × √Number of trades

  • Pros: Accounts for sample size, good for system comparison

  • Cons: Requires sufficient trades for validity

  • Benchmarks: >2 = Good | >3 = Excellent | >5 = Superb


Choosing by Trading Style

Style
Primary Metrics
Secondary Metrics

Scalping

Win Rate + Sharpe

Total Profit

Day Trading

Sharpe + Win Rate

Average P&L

Swing Trading

Sortino + Calmar

Gain-to-Pain

Position Trading

Calmar + Martin

Sortino

AI Mode Selection:

  • Intraday/Mean-reversion: Optimizes for Sharpe + Win Rate

  • Trend/Swing trading: Prioritizes Sortino + Calmar

  • Multi-metric: Balances all metrics for robust performance


Last updated

Was this helpful?