Installation¶
This guide covers setting up the RQF-ML system for local development and backtesting.
Prerequisites¶
| Requirement | Version | Check Command |
|---|---|---|
| Python | 3.10+ | python --version |
| Git | 2.0+ | git --version |
| pip | Latest | pip --version |
Clone the Repository¶
Python Environment Setup¶
Verify Installation¶
# Run tests
pytest tests/ -v
# Check backtest engine
python scripts/run_backtest.py --help
# Check ML training
python scripts/train_edge_model.py --help
Expected output:
Project Structure¶
rqf-ml/
├── config/ # Configuration files
│ └── edge_config.yaml # ML and backtest settings
├── data/
│ ├── raw/ # Price data (CSV)
│ └── processed/ # Validated datasets
├── docs/ # This documentation
├── execution/ # Live/paper trading
│ ├── tradingview_alerts/
│ └── mt5/
├── scripts/ # CLI tools
│ ├── run_backtest.py
│ └── train_edge_model.py
├── src/ # Python source code
│ ├── core/ # Pattern detection
│ ├── backtest/ # Simulation engine
│ └── ml/ # Machine learning
├── strategies/
│ └── pine_v6/ # PineScript indicators
└── tests/ # Test suite
Data Setup¶
Download Sample Data¶
# Create data directory
mkdir -p data/raw
# Download sample MNQ data (if available)
# Or use your own data in CSV format:
# timestamp,open,high,low,close,volume
Data Format¶
CSV files should have this structure:
timestamp,open,high,low,close,volume
2024-01-02 09:30:00,16500.25,16505.50,16498.00,16502.75,1234
2024-01-02 09:31:00,16502.75,16510.00,16501.25,16508.50,1567
...
TradingView Setup¶
- Open TradingView and go to Pine Editor
- Copy indicator code from
strategies/pine_v6/STRAT_02.pine - Paste and save as "STRAT_02: RQF"
- Add to chart and configure settings
See Quick Start for detailed TradingView setup.
Claude Code Setup (Optional)¶
For Claude Code skills integration:
# Verify Claude Code is installed
claude --version
# Skills are automatically detected from .claude/skills/
# List available skills
claude
> /skills-list
Troubleshooting¶
Python version mismatch
Ensure you're using Python 3.10+:
Import errors
Ensure you're in the project root:
Next Steps¶
- Quick Start - Add indicator to TradingView
- Configuration - Customize settings
- Backtesting Guide - Run your first backtest