vectorbt VS backtrader

Compare vectorbt vs backtrader and see what are their differences.

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
vectorbt backtrader
5 32
3,734 12,985
- -
6.2 0.0
8 days ago 8 days ago
Python Python
GNU General Public License v3.0 or later GNU General Public License v3.0 only
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

vectorbt

Posts with mentions or reviews of vectorbt. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-06-14.
  • Is there any python libraries to backtest buy and sell signals with dates?
    2 projects | /r/algotrading | 14 Jun 2022
    For exactly this I use this https://github.com/polakowo/vectorbt it’s really a powerful tool and you can tons of things with it. Recently the developer decided to maintain it but not adding new features, which from now on will be released on the pro version. However, the free version is still very valuable, incredibly fast and suitable for basic to intermediate tasks.
  • Why Building a Trading Algorithm is More Than Just the Algorithm - 3 Things
    4 projects | dev.to | 19 Feb 2022
    It’s super easy to get up and running with code. With the rise of data science as a field, datasets are far and wide. Accessible from just about any venue. Take a look at Kaggle, QuiverQuant, Yahoo Finance, or even directly from the brokerages and exchanges. Developers can easily download data directly as a .csv or .json and quickly get up and running by utilizing frameworks like backtesting.py or vectorbt. “Great, it seems like I can get up and running and I’ll have an awesome money making trading algorithm in no time”.... unfortunately, wrong. Why is this wrong? Well, simulation is NOT the real world. The real world is not a CSV file—the real world is a stream of events. Cause and effect. The real world works in a fashion where new data comes in, you make a decision, and then you figure it out, not “I have all of this data, let me run this all through time and figure it out”. Indeed, the data sources that you get in real-time are almost completely different from the data sources you use in simulation. Rather than .csv you use WebSockets; rather than QuiverQuant you use APIs; rather than backtesting frameworks you use more robust, event driven packages. Without it, you’re stuck duplicating code, rewriting it into an event-based system, and ultimately using that to go into production, and who knows if your code is going to change along the way.
  • Vectorbt – Find your trading edge
    1 project | news.ycombinator.com | 12 Feb 2022
  • Repost with explanation - OOS Testing cluster
    1 project | /r/algotrading | 1 Jan 2022
    I second the idea of looking through software optimization, but there is no need to jump right to C. I would look at something like vectorbt. You get the speed of C running under the hood while staying in Python for your back testing code
  • Looking for active python backtesting framework
    3 projects | /r/algotrading | 9 Feb 2021
    However, it's not the fastest framework. If you need speed, and are good with the data science tool chain in python and the concept of flattening loops into vectorized operations, check out vector-bt. I haven't gotten a chance to play with it yet, but I'm definitely going to as soon as I find some spare time. It seems like a great option with a nicely modernized approach.

backtrader

Posts with mentions or reviews of backtrader. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-04.
  • [HIRING] Develop template code for crypto backtesting using backtrader
    1 project | /r/Jobs4Bitcoins_OG | 8 Jul 2023
    You need to create a template code using https://github.com/mementum/backtrader. 1. Get the 1m candlestick data from binance for a period of 1 month for two symbols and store it in a data folder with data for each day and symbol in a different csv file. Read data for the symbols BTC & ETH. 2. Read the data for 1 month in python and put it in a dataframe for each symbol. 3. Import backtrader and feed data for these two symbols. 4. Create a basic strategy to check the ratio of prices and take trades accordingly. 5. Get the results using library. I am not much interested in the trading logic, just want to get the system to backtest up. It's a straightforward task for someone who has used backtrader before or 30-min job to read the documentation and do it. Project compensation : 5$ Can transfer directly to your binance account.
  • What backtest data would you say is more accurate.
    1 project | /r/algotrading | 16 Mar 2023
    For this reason I think it's important to have a deep understanding of exactly how the backtesting engine that you are using works. Building your own backtesting engine is the absolute best way to gain this understanding. That is the path I personally chose and I don't regret it! However, that is also a very difficult and time consuming undertaking. So the next best thing is using something that is open source and has a good reputation like backtrader (https://www.backtrader.com/).
  • Backtesting Engines for Testing Intraday Data on Thousands of Symbols Simultaneously
    4 projects | /r/algotrading | 4 Mar 2023
    However, if you decide to go down the more well-trodden path of using open source backtesting frameworks then I personally would recommend backtrader (https://www.backtrader.com/). As far as I can tell, it has pretty much all the same features as my own system. The only difference is speed. My backtester is an order of magnitude faster and scales much better to testing thousands of symbols simultaneously. However, for 99% of retail algo traders this will be completely irrelevant.
  • Algo Trading for SQQQ/TQQQ
    1 project | /r/algotrading | 23 Jan 2023
    You are welcome to go to discord or any other place. Your question wasn't very clear and thus I made that comment. Now, you still haven't made it clear so I am going to assume that you are looking for someone to "share a bot" that can trade your strategy. It doesn't work that way with algo trading. You code your "bot" to do things for you - The easiest way to start would be to look at backtrader but you will still have to code your own strategy in.
  • Quantconnect Rant
    2 projects | /r/algotrading | 22 Nov 2022
    I mean, some random dude managed to pull a platform with more basic functionalities than that. Sadly that repo is dead and the live trading implementation no longer works
  • Do you use automated trading software or nah?
    1 project | /r/InvestmentClub | 12 Oct 2022
  • Python library to retrieve data from TradingView
    3 projects | /r/SideProject | 11 Sep 2022
    I've been working on a Python library which lets the user retrieve data from TradingView.com so it could be used in backtesting a strategy. The project is called TvDatafeedLive and is available on GitHub. To be fair, the project is actually an extension of a project called TvDatafeed, which is a really good project, but only supports retrieving historic data (so far). So, I've taken the liberty to fork it and implement retrieving data continously and "real-time". The data is retrieved in Pandas DataFrames and can easily be plugged into backtrader. There is instructions included in the GitHub page. If this sounds interesting then please check it out and leave feedback if there are any thoughts.
  • Historical Trading to Prove/Disprove Plan
    1 project | /r/investing | 2 Aug 2022
    If you are a python programmer there is backtrader.
  • Backtesting tools
    1 project | /r/algotrading | 15 Jul 2022
    For stocks and crypto: QuantConnect and Backtrader For options: MesoSim and OptionNetExplorer
  • Algo Trading Environments
    3 projects | /r/algotrading | 19 Jun 2022
    Backtrader can also do live trading afaik.

What are some alternatives?

When comparing vectorbt and backtrader you can also consider the following projects:

backtesting.py - :mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.

fast-trade - low code backtesting library utilizing pandas and technical analysis indicators

zipline - Zipline, a Pythonic Algorithmic Trading Library

jesse - An advanced crypto trading bot written in Python

ccxt - A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges

fastquant - fastquant — Backtest and optimize your ML trading strategies with only 3 lines of code!

OctoBot - Open source crypto trading bot

pyfolio-reloaded - Portfolio and risk analytics in Python

Alpaca-API - The Alpaca API is a developer interface for trading operations and market data reception through the Alpaca platform.

zipline-reloaded - Zipline, a Pythonic Algorithmic Trading Library