Skip to content

Repository files navigation

Colt Dev

ML Trading System

An automated Python-based machine learning trading system for futures contracts.

Overview

This project implements a sophisticated, modular trading system that operates locally while ensuring robust risk management. The system collects minute-level market data, researches and backtests both traditional and machine learning-driven strategies, and automatically executes trades when predefined risk and performance criteria are met.

Getting Started

Prerequisites

  • Python 3.8+
  • TradingView API access
  • Tradeovate account (for live trading)

Installation & Usage

For detailed instructions on how to install, configure, and run the system, please refer to the Run Instructions document.

Features

Data Collection

  • Minute-level market data from TradingView API
  • Robust data cleaning and normalization
  • Efficient local storage with S3 bucket support

Trading Strategies

  • Traditional Strategies:

    • Moving Average Crossover
    • Bollinger Bands
    • VWAP (Volume-Weighted Average Price)
    • MACD
  • Machine Learning Strategies:

    • Random Forest
    • XGBoost
    • Neural Networks
  • Advanced Technical Indicators:

    • VWAP (Volume-Weighted Average Price)
    • Pivot Points
    • Trendline Breakouts
    • Bull and Bear Flag Patterns

Backtesting

  • Event-driven backtesting engine
  • Dynamic slippage modeling
  • Comprehensive performance metrics

Risk Management

  • Win rate threshold (minimum 51%)
  • Risk-to-reward ratio requirements (1:2 or 1:3)
  • Maximum daily loss limits ($2,500)
  • Configurable position sizing

Project Structure

  • src/ - Main source code
    • data/ - Data collection and processing
    • strategies/ - Trading strategies
    • backtesting/ - Backtesting engine
    • execution/ - Trade execution
    • logs/ - Logging and monitoring
  • config/ - Configuration files
  • tests/ - Unit and integration tests

Risk Management

The system enforces strict risk management rules:

  • Only executes trades for strategies with at least 51% win rate
  • Requires a minimum risk-to-reward ratio of 1:2 (preferably 1:3)
  • Enforces a maximum daily loss limit of $2,500

Features

  • Data collection from TradingView API
  • Strategy research and backtesting
  • ML-based strategy discovery
  • Automated trade execution
  • Risk management with configurable parameters
  • Comprehensive logging and monitoring

Requirements

  • Python 3.11.4 or higher
  • Virtual environment for dependency management

Setup

  1. Clone this repository
  2. Create and activate a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Configure your API keys in config/config.yaml
  5. Run the application:
    python main.py
    

Project Structure

  • src/ - Main source code
    • data/ - Data collection and processing
    • strategies/ - Trading strategies
    • backtesting/ - Backtesting engine
    • execution/ - Trade execution
    • logs/ - Logging and monitoring
  • config/ - Configuration files
  • tests/ - Unit and integration tests

Risk Management

The system enforces strict risk management rules:

  • Minimum win rate: 51%
  • Minimum risk-to-reward ratio: 1:2 (preferably 1:3)
  • Maximum daily loss: $2,500

Future Enhancements

  • Migration to AWS with S3 bucket storage
  • Web-based dashboard for monitoring
  • Advanced performance analytics

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages