An autonomous Genetic Programming (GP) system that evolves high win-rate FX trading strategies using multi-pair OHLCV data, vectorbt backtesting, and an AI advisor loop (Kimi-K2.5 / deepseek-r1).
| Metric | Value |
|---|---|
| Win Rate | 98.71% |
| Sharpe Ratio | 9.635 |
| Total Return | +21.29% |
| Total Trades | 545 |
| Test Period | Nov 2025 – Mar 2026 |
| Rule | Value |
|---|---|
| Position size | $1,000/trade (training) |
| Stop loss | 1x ATR |
| Trail trigger | 3x ATR |
| Trail distance | 15% behind current price |
| Max live trades | 3 × $300 = $900 exposure |
# 1. Clone
git clone https://github.com/Anwar-Projects/gp-fx-strategy.git
cd gp-fx-strategy
# 2. Setup environment
make setup
# 3. Download and prepare data
make data
# 4. Run Phase 2 training
make train
# 5. Monitor
make monitorHistData.com (1M bars)
↓
scripts/resample_to_5m.py
↓
data/EURUSD_5M.csv
data/GBPUSD_5M.csv
data/USDJPY_5M.csv
↓
src/run_until_good_phase2.py ←── loops until 80% win rate
↓
src/gp_strategy_progress_vectorbt_phase2.py
↓ ↓
DEAP GP Evolution vectorbt simulation
(34 workers) (SL + trailing stop)
↓
best_individual.dill
↓
src/kimi_advisor_phase2.py ←── Kimi-K2.5 / deepseek-r1
↓
Fitness function tuned
↓
Telegram notification when target hit
gp-fx-strategy/
├── data/ # Downloaded + resampled OHLCV data
├── docs/ # Documentation and notes
├── logs/ # Training logs and summaries
├── models/ # Saved GP strategies (.dill files)
├── scripts/ # Setup and data download helpers
│ ├── download_data.sh
│ ├── resample_to_5m.py
│ └── setup.sh
└── src/ # Training + inference source code
├── gp_strategy_progress_vectorbt_phase2.py
├── run_until_good_phase2.py
└── kimi_advisor_phase2.py
Developed as part of autonomous trading research.