Skip to content

mini-trader is a flexible, event-driven trading system designed for both live trading and backtesting in the Indian stock market. It provides a robust framework for developing, testing, and deploying trading strategies with a focus on real-time data handling and efficient historical data management.

Notifications You must be signed in to change notification settings

Apurv-Salunke/mini-trader

Repository files navigation

mini-trader: A Comprehensive Trading System for Backtesting, Paper Trading, and Live Trading

Project Overview

mini-trader is an advanced, modular trading system designed for quantitative traders and researchers. It provides a robust platform for developing, testing, and executing trading strategies across multiple environments: historical backtesting, paper trading, and live trading. Despite its "mini" name, mini-trader offers powerful features wrapped in a flexible, event-driven architecture that seamlessly transitions from strategy development to real-world implementation.

Key Features

  1. Multi-Environment Support:

    • Backtesting: Test strategies using historical data.
    • Paper Trading: Simulate live trading with real-time data without real money.
    • Live Trading: Execute strategies in real-time with actual market orders.
  2. Event-Driven Architecture:

    • Realistic simulation of market dynamics and trading processes.
    • Consistent framework across backtesting, paper trading, and live environments.
  3. Modular Design:

    • Easy to extend and customize different components (e.g., data handling, strategy implementation, execution).
    • Facilitates unit testing and maintenance of individual components.
  4. Multi-Asset Support:

    • Capability to trade strategies across multiple assets and asset classes.
  5. Advanced Strategy Development:

    • Support for complex, multi-factor strategies.
    • Easy integration of custom indicators and signals.
  6. Realistic Order Execution:

    • Supports various order types (market, limit, stop, etc.).
    • Accounts for slippage and transaction costs in backtests and simulations.
    • Integrates with real brokers for live trading.
  7. Risk Management:

    • Implements position sizing and portfolio-level risk controls.
    • Supports custom risk management rules applicable in all trading environments.
  8. Performance Analysis:

    • Comprehensive set of performance metrics (returns, Sharpe ratio, drawdowns, etc.).
    • Real-time performance tracking for paper and live trading.
    • Visualization tools for analyzing results across all trading modes.
  9. Data Handling:

    • Efficient processing of historical datasets for backtesting.
    • Real-time data feeds for paper and live trading.
    • Support for various data formats and sources.
  10. Extensibility:

    • Designed to be easily extended with new features and modules.
    • Pluggable architecture for adding new data sources, brokers, and analytics.

Goals

  1. Provide a unified platform for strategy development, testing, and live deployment.
  2. Enable seamless transition from backtesting to paper trading to live trading.
  3. Offer a realistic simulation environment that closely mimics live trading conditions.
  4. Facilitate rapid development and iteration of trading strategies.
  5. Promote best practices in quantitative trading strategy development and risk management.

Target Audience

  • Quantitative traders and researchers
  • Financial institutions and hedge funds
  • Individual algorithmic traders
  • Fintech developers building trading applications

Technical Stack

  • Python 3.8+
  • Key libraries: NumPy, Pandas, ZeroMQ (for event handling)
  • Testing: pytest
  • Code quality: Black, isort, Ruff, pre-commit
  • (To be added) Integration with broker APIs for live trading

Project Status

mini-trader is currently in active development. The core event system is being implemented, with plans to add data handling, strategy implementation, execution simulation, and live trading integration in the near future.

Contributing

We welcome contributions from the community! Whether it's adding new features, improving documentation, or reporting bugs, your input is valuable. Please refer to our contributing guidelines for more information on how to get involved.

License

mini-trader is open-source software licensed under the MIT license.

About

mini-trader is a flexible, event-driven trading system designed for both live trading and backtesting in the Indian stock market. It provides a robust framework for developing, testing, and deploying trading strategies with a focus on real-time data handling and efficient historical data management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages