awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
mementum avatar

mementum/backtrader

0
View on GitHub↗
20,462 stars·4,922 forks·Python·gpl-3.0·16 viewswww.backtrader.com↗

Backtrader

Backtrader is a Python framework designed for the development, backtesting, and live execution of algorithmic trading strategies. It provides a comprehensive environment for quantitative finance, allowing users to simulate trading logic against historical market data or connect directly to brokerage platforms for automated real-time trading.

The project distinguishes itself through a unified event-driven architecture that treats backtesting and live trading with the same API. This consistency is supported by a flexible data-feed abstraction layer that normalizes diverse financial sources, enabling complex multi-timeframe analysis and synchronization. The system includes a robust broker-simulation engine that accounts for real-world constraints such as slippage, commissions, and margin requirements, ensuring that simulated results closely mirror potential live performance.

Beyond core execution, the library offers extensive tools for technical analysis, including a pipeline for composing mathematical indicators and a monitoring system that tracks portfolio metrics and order lifecycles. Users can visualize strategy performance, trade activity, and indicator behavior through integrated charting tools, while also leveraging built-in utilities for parameter optimization and automated task scheduling.

The framework is designed for extensibility, allowing for custom data feed definitions, specialized parsing logic, and the creation of custom observers to monitor system health. It is distributed as a Python library, providing a modular toolkit for managing the entire lifecycle of a trading strategy.

Features

  • Algorithmic Trading Frameworks - Provides a comprehensive Python library for backtesting, analyzing, and executing automated trading strategies.
  • Backtesting Engines - Orchestrates the interaction between data feeds, trading strategies, and broker simulations to evaluate performance across historical market conditions.
  • Automated Trading Execution - Connects trading algorithms to brokerage platforms to stream real-time data and execute orders automatically.
  • Financial Analysis Tools - Provides a comprehensive environment for ingesting, resampling, and visualizing multi-timeframe market data to evaluate trading strategy performance.
  • Quantitative Trading Platforms - Establishes live connections to financial brokerage services to stream real-time market data and execute trades directly.
  • Trading Simulation Engines - Models real-world trading constraints like slippage, commissions, and order execution within a consistent API for both backtesting and live trading.
  • Trading Strategy Backtesters - Simulates and evaluates financial trading strategies against historical market data to measure performance.
  • Order Execution Engines - Place market, limit, and stop orders with a brokerage using standard validity types like good-till-cancelled or good-till-date.
  • Quantitative Finance & Trading - Offers a toolkit for calculating technical indicators, managing time-series data, and simulating complex market conditions for algorithmic strategy development.
  • Technical Analysis - Computes mathematical transformations of market data within strategies to support complex decision-making logic.
  • Strategy Performance Analyzers - Provides analytical tools for evaluating the profitability and risk exposure of trading strategies against historical data.
  • Trading Strategy Definitions - Encapsulates custom logic within a structure to process market data, manage positions, and respond to order notifications.
  • Time-Series Data Abstractions - Normalizes diverse financial data sources into a unified time-series format for consistent processing across different backtesting scenarios.
  • Real-Time Data Streaming - Receives live price updates and volume snapshots from brokerage services for rapid decision-making.
  • Technical Indicators - Allows the creation of reusable technical analysis tools by defining data lines and calculation logic.
  • Automated Trading Engines - Maps technical indicator outputs to long or short market positions to execute buy and sell orders automatically.
  • Bracket Order Systems - Groups main trades with stop-loss and take-profit orders to automatically manage risk and profit targets after execution.
  • Trading Risk Analysis - Tracks trade statistics, risk-adjusted returns, and account equity to assess strategy profitability.
  • Trading Simulations - Processes market, limit, and stop orders against historical data while validating cash requirements and margin before trades.
  • Data Ingestion Sources - Ingests financial market data from files, broker services, and databases for analysis.
  • Financial - Map arbitrary file structures and date formats to standard price fields to support diverse financial data sources.
  • Indicator Pipelines - Calculates technical analysis values by chaining mathematical transformations that automatically update as new market data arrives.
  • Financial Market Visualizers - Provides graphical representations of price data and trade execution points to assist in the analysis of strategy behavior.
  • Market Data Recorders - Streams financial data with automatic backfilling and connectivity status notifications.
  • Trailing Stop Orders - Track market price movements dynamically to trigger exit orders at a fixed distance from the current price to secure profits.
  • Trading Signal Triggers - Trigger market buy and sell orders based on the intersection of fast and slow moving average indicators on price data.
  • Trading Strategy Optimizers - Run multiple strategy iterations in parallel across CPU cores while minimizing memory usage to return essential performance metrics.
  • Market Analysis Agents - Synchronizes and processes multiple financial data streams to evaluate trends across different time horizons.
  • Financial Analytics - Framework for backtesting trading strategies.
  • Quantitative Frameworks - Feature-rich backtesting engine for testing trading strategies.
  • Trading Frameworks - Event-driven backtesting library for trading strategies.
  • Automated Exit Strategies - Issues primary orders alongside exit orders to automate profit taking and loss protection for specific trade entries.
  • Position Sizing Calculators - Calculates the number of units to trade based on fixed quantities, cash percentages, or position reversal requirements.
  • Trade Profitability Recorders - Tracks completed trades to calculate and visualize the profit or loss achieved after accounting for commissions and fees.
  • Strategy Component Configuration - Define customizable settings for strategies and indicators using default values that can be overridden during initialization.
  • Multi-Stream Organizers - Ingest multiple financial data streams into a strategy by organizing them into accessible arrays for sequential processing.
  • Custom Data Source Integrations - Connects specialized data feed classes to ingest financial market data from various sources.
  • Market Indicator Visualization - Generates graphical representations of indicators and price data to allow for visual inspection of strategy performance.
  • Trade Execution Overlays - Plots buy and sell execution points onto price charts to provide a visual history of order placement and timing.
  • Historical Data Import - Loads financial price and volume data from files or online sources for strategy testing.
  • Time Series Indexing - Provides efficient access to historical and real-time price data using index-based lookups to support complex strategy calculations.
  • Portfolio Metric Trackers - Monitors cash balances, total portfolio value, and profit or loss throughout a trading strategy execution using observers.
  • Account Lifecycle Management - Handles order placement, position tracking, and commission schemes using live brokerage accounts instead of simulated instances.
  • Contract Management Systems - Automates the transition between expiring and active future contracts based on custom conditions to maintain continuous exposure.
  • Trade Statistics Trackers - Aggregates data on closed and open trades, including win streaks, profit and loss, and market exposure duration.
  • Brokerage Simulation Parameters - Sets initial cash, commission schemes, and margin requirements to simulate realistic trading environments during backtesting.
  • Market Trading Calendars - Remove intraday data points that fall outside of defined market hours to ensure analysis only considers active trading periods.
  • Custom Parser Definitions - Implement specialized parsing logic for non-standard file formats by mapping raw file tokens to internal market data structures.
  • Portfolio Rebalancing - Automates the adjustment of asset holdings to match target sizes, values, or percentages of total portfolio capital.
  • Automated Backfillers - Download historical price data automatically upon connection to ensure the strategy has a complete dataset for analysis.
  • Market Data Providers - Loads historical financial market data from online sources for strategy backtesting.
  • Market Data Replayers - Simulates trading sessions by delivering historical bars incrementally to react to intraday updates.
  • Trailing Limit Orders - Triggers limit orders once a dynamically tracked price threshold is reached to control entry or exit.
  • Time Series Toolkits - Applies mathematical operations and logical comparisons directly to data series objects to generate indicators.
  • Financial Charting - Combines multiple data streams onto a single chart axis to allow for direct visual comparison of series.
  • Periodic Return Calculators - Computes rates of return for portfolios or assets over defined time intervals to evaluate historical performance.
  • Strategy Benchmarkers - Compares trading strategy returns against reference assets or market indices to measure relative success and performance.
  • Target Position Setting - Calculates and executes the necessary orders to reach specific asset quantity, monetary value, or portfolio percentage targets.
  • Cross-Asset Position Managers - Links distinct data feeds so that trading operations on one asset automatically offset or close positions in a related asset.
  • Intraday Bar Simulators - Reconstructs higher-level timeframes from granular data to approximate real-time strategy behavior during the formation of a single bar.
  • Trading Order Monitors - Provides status updates on order progression, including submission, acceptance, and execution, to inform strategy decision-making.
  • Order Volume Matching Configurations - Determine how much available market volume is used to fill trade orders during simulation to model liquidity constraints.
  • Commission Models - Configures transaction costs and margin requirements for specific financial instruments to accurately simulate real-world trading expenses.
  • Custom Data Line Visualization - Renders additional data fields alongside standard price information by attaching indicators to custom lines for plotting.
  • Indicator Visualization Configuration - Defines custom plot styles, axis margins, and reference lines to ensure indicators render clearly alongside price data.
  • Generic Data Feed Configurators - Adapts file parsing logic to specific layouts by overriding parameters like date formats and column indices.
  • Multi-Timeframe Synchronizers - Synchronizes data streams of varying granularities to evaluate long-term trends alongside short-term price movements.
  • Data Synchronization - Aligns indicators operating on different frequencies by coupling them to a common timeframe.
  • Financial Data Processing - Provides tools for resampling and compressing historical market data into different timeframes for granular analysis.
  • Memory Optimization Strategies - Reduce memory consumption by setting dynamic buffer limits for data and indicators to ensure stable performance during resource-constrained processing.
  • Financial Tabular Mappers - Integrate external financial data by mapping table columns to standard market price and volume fields for analysis.
  • Slippage Simulators - Adjust order execution prices using fixed or percentage-based offsets to simulate real-world market impact and price movement.
  • Observer Patterns - Tracks strategy state and portfolio metrics by decoupling performance logging and visualization from the core execution logic.
  • Cash Management - Provides mechanisms to adjust simulated account capital to reflect deposits, withdrawals, or external funding changes during backtesting.
  • System Configuration Management - Manages global system settings including trading calendars and timezones for consistent execution.
  • Task Schedulers - Triggers custom logic at specific times, session boundaries, or calendar intervals to handle time-sensitive trading operations.
  • Simulation Callbacks - Triggers custom logic at specific intervals during a simulation to automate tasks like portfolio rebalancing.

Star history

Star history chart for mementum/backtraderStar history chart for mementum/backtrader

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Backtrader

Similar open-source projects, ranked by how many features they share with Backtrader.
  • quantconnect/leanQuantConnect avatar

    QuantConnect/Lean

    16,537View on GitHub↗

    Lean is an algorithmic trading engine and quantitative finance platform designed for the development, backtesting, and live execution of automated trading strategies. It provides a comprehensive framework for processing time-series market data, managing multi-asset portfolios, and conducting quantitative research across diverse financial markets. The platform distinguishes itself through a modular, event-driven architecture that decouples strategy logic from data ingestion and brokerage connectivity. By utilizing standardized interfaces for data providers and brokerage abstractions, it enable

    C#algorithmalgorithmic-trading-enginec-sharp
    View on GitHub↗16,537
  • edtechre/pybrokeredtechre avatar

    edtechre/pybroker

    3,191View on GitHub↗

    pybroker is a Python algorithmic trading framework and quantitative technical analysis library designed for developing, testing, and optimizing trading strategies using historical market data. It functions as a trading strategy backtester and a financial performance evaluator, providing a structured environment to simulate trading rules and analyze their statistical reliability. The framework distinguishes itself through a market data integration layer that handles the fetching and caching of historical price data from external providers. It incorporates an event-driven backtesting engine and

    Pythonaialgorithmic-tradingalgotrading
    View on GitHub↗3,191
  • ai4finance-foundation/finrlAI4Finance-Foundation avatar

    AI4Finance-Foundation/FinRL

    13,964View on GitHub↗

    FinRL is a reinforcement learning framework designed for the development, training, and backtesting of automated trading strategies. It functions as a quantitative finance toolkit that integrates deep learning algorithms with financial market simulations to address complex portfolio management and asset allocation tasks. The platform provides an end-to-end pipeline for transforming raw market data into actionable trading models. The project distinguishes itself through a layered, modular architecture that separates data processing, environment simulation, and agent training. This design allow

    Jupyter Notebookalgorithmic-tradingdeep-reinforcement-learningdrl-algorithms
    View on GitHub↗13,964
  • myhhub/stockmyhhub avatar

    myhhub/stock

    12,987View on GitHub↗

    Stock is an algorithmic trading framework designed for the development, backtesting, and execution of automated investment strategies. It provides a comprehensive environment for quantitative market analysis, enabling users to build systems that connect to brokerage interfaces for order placement based on predefined technical rules. The platform distinguishes itself through integrated data acquisition and analysis capabilities, including a financial data collection engine that utilizes proxy rotation and session persistence to maintain stable connectivity and bypass rate limits. It supports h

    Pythonbacktestbacktestingbroker-trading-platform
    View on GitHub↗12,987
See all 30 alternatives to Backtrader→

Frequently asked questions

What does mementum/backtrader do?

Backtrader is a Python framework designed for the development, backtesting, and live execution of algorithmic trading strategies. It provides a comprehensive environment for quantitative finance, allowing users to simulate trading logic against historical market data or connect directly to brokerage platforms for automated real-time trading.

What are the main features of mementum/backtrader?

The main features of mementum/backtrader are: Algorithmic Trading Frameworks, Backtesting Engines, Automated Trading Execution, Financial Analysis Tools, Quantitative Trading Platforms, Trading Simulation Engines, Trading Strategy Backtesters, Order Execution Engines.

What are some open-source alternatives to mementum/backtrader?

Open-source alternatives to mementum/backtrader include: quantconnect/lean — Lean is an algorithmic trading engine and quantitative finance platform designed for the development, backtesting, and… edtechre/pybroker — pybroker is a Python algorithmic trading framework and quantitative technical analysis library designed for… ai4finance-foundation/finrl — FinRL is a reinforcement learning framework designed for the development, training, and backtesting of automated… myhhub/stock — Stock is an algorithmic trading framework designed for the development, backtesting, and execution of automated… fasiondog/hikyuu — Hikyuu is a quantitative trading framework designed for developing, backtesting, and executing systematic trading… jesse-ai/jesse — Jesse is a Python algorithmic trading framework used for developing, backtesting, and executing quantitative trading…