Video summary

Inside My AI Quant Workflow (Python, MT5 & Genetic Optimization)

Main summary

Key takeaways

Finance

Overview: End-to-End AI-Assisted Quant Workflow

The presenter describes building an end-to-end AI-assisted quant research workflow (referred to as an “Alpha” / folder strategy factory) that:

  • Develops new trading logic/algorithms
  • Tests them on real historical data (the same data intended to be traded)
  • Compares results across multiple datasets and multiple asset classes
  • Produces MT5-style HTML reports with performance and drawdown analytics

Speed improvements (as stated)

  • Earlier iteration speed: 10–15 hours per cycle
  • New workflow: first alpha research report in about ~15–30 minutes
  • “10 asset class” first reports referenced around ~30 minutes
  • Total end-to-end cycle also cited around ~15 minutes for a single cycle

Core Backtest Design Principles

Key emphasis is placed on avoiding overfitting and ensuring robustness through proper dataset splitting and evaluation:

  • Use in-sample vs out-of-sample splits
    • Example: out-of-sample extending through ~2024 for EUR/USD
  • Do not optimize on the full dataset
    • Explicit caution: “optimizing only on the in sample”
  • Validate robustness across:
    • timeframes and assets
    • multiple datasets

Assets, Instruments, and Timeframes Mentioned

Instruments / tickers

  • FX pairs: EUR/USD, USD/JPY
  • Commodities / precious metals:
    • Gold (XAUUSD)
    • Brent oil

(No fund tickers/ETFs were mentioned.)

Timeframes

  • Daily and intraday
  • Optimization noted mainly on H1, sometimes 2-hour

Macro event data (future feeds)

  • CPI
  • FOMC
  • NFP

(No specific macro tickers were provided.)


Methodology / Framework (Step-by-Step)

  1. Idea selection (find alpha)

    • Choose logic from sources such as a “YouTube video” or research papers
    • Define the strategy logic in Python (for speed vs MQL5)
  2. Baseline validation (pre-optimization)

    • Test whether the “alpha” exists without optimization
  3. Feature/statistical diagnostics on the data

    • Compute daily returns and hourly returns
    • Analyze price distribution (daily distribution)
    • Analyze intraday volume behavior
    • Create a weekday-by-hour heat map (to find when price moves most during broker hours)
    • Compute auto-correlation
  4. Strategy construction and rule testing

    • Evaluate whether the logic works using constructed strategy rules
  5. Survivor selection (best candidates)

    • Keep only strategies meeting criteria such as:
      • profit factor > 1
      • >300 trades (example threshold)
  6. Data split / walk-forward style reporting

    • Split data into in-sample and out-of-sample
    • Reports explicitly show the split
  7. Genetic optimization (parameter tuning)

    • Use genetic optimization on in-sample only
    • Then evaluate on out-of-sample to reduce overfitting risk
  8. Cross-asset and cross-timeframe testing

    • Apply/optimize across EUR/USD, Gold, Brent oil, USD/JPY
    • Optimization focused on timeframes like H1 (sometimes 2H)
  9. MT5 translation considerations

    • Keep Python logic simple so it can be translated to MT5 with high fidelity
    • Example simplification:
      • Enter on the first minute of a 1-hour timeframe
      • Close at the end of the timeframe

Strategy Inputs / Parameters Mentioned

Trade direction examples

  • Example includes long/short behavior (USD/JPY “side” includes short capability)
  • Another described example is long-only, with a realism caution for markets with sharp declines

Risk and position constraints

  • ATR-based TP/SL (take-profit / stop-loss derived from ATR)
  • Max holding bar (tuned parameter)

Execution/session rules (for MT5-like behavior)

  • Don’t trade on weekends
  • Exit on the end of the day
  • Trade within selected hours (multiple hour options mentioned)

Key Metrics and Numbers Highlighted

Candidate/quality thresholds

  • >300 trades
  • profit factor > 1
  • Out-of-sample examples referenced around ~400 trades

Drawdown and performance metrics

  • Equity curve
  • Maximum drawdown
  • Sharpe ratio (noted especially for Gold)
  • Win rate
  • Expected value / expectancy
  • Max drawdown in USD” for the Gold case

Drawdown commentary (example context)

  • For one EUR/USD example: drawdown referenced as “2 years to 2.5 years almost 3 years”
    • described as “not great”
  • Additional commentary:
    • max drawdown can be bigger in-sample
    • then a little bit lower out-of-sample after optimization

Relative results warning (Gold)

  • The presenter notes that Gold’s own price strength (from 2024 till now) may have almost outperformed the strategy by itself
  • Therefore, interpreting strategy performance relative to the asset regime is important

Recommendations and Cautions

  • Do not optimize on the full dataset
    • Optimize only in-sample, then test out-of-sample
  • Assess results relative to the asset’s regime
    • If the asset (e.g., Gold) had strong underlying price action, strategy results may look good even without strong “alpha”
  • Avoid strategy-market mismatch
    • Example concept: long-only systems may struggle during severe drawdowns
  • Keep logic simple for MT5 fidelity
    • Aim for ~95–99% similarity between Python logic and MT5 execution/rules
    • Recognize differences may arise from spread/slippage/hidden costs

Disclosures / Disclaimers

  • No explicit “not financial advice” or regulatory disclaimer was included in the provided subtitles.

Presenters and Sources Mentioned

  • Presenter: not named in the provided subtitles
  • Source references:
    • YouTube video” (used as an idea source)
    • AI coding tools referenced as “Cloud Code / Codex”
    • No specific external channel/author details were identified

Original video