Getting started¶
We're thrilled to have you with us!
We believe in a future where each individual, whether you're a seasoned trader, a data scientist with a Ph.D., or just a hobbyist, has access to an entire palette of cutting-edge tools to drive their decisions and compete against big players
This tool is just the first piece of an ecosystem in the making that will empower this goal while already breaking barriers and creating an entirely new universe of possibilities to analyze financial data of any complexity. All it takes is your time and motivation to adopt our approach and extract insights from any data that had been looking like unspectacular numbers before!
Discord¶
Before making first steps with vectorbt, make sure to join our Discord server, where we support each other, report issues, create feature requests, and just chat!
Upon joining, please post your GitHub account name (such as @polakowo) to the verification channel for us to manually link your Discord and GitHub accounts and assign you a member role that will open all other channels. If you end your sponsorship, you'll lose your access to the server. If you start your sponsorship again, please redo the steps above.
Website¶
To make sure that only sponsors have access to the exclusive content, the website of this project has been split into two websites: the public website accessible under https://vectorbt.pro, and the private website that you're on right now, accessible via the link provided in the private repository (bookmark this page: https://github.com/polakowo/vectorbt.pro/blob/pvt-links/README.md ). The private website is a directory located on the same host as the public one but prepended with a random hash that gets renewed once in a while to discourage information theft. You can identify which website you're on by looking at the closed lock (= public website) or open lock (= private website) in the top left corner.
The website contains 4 major sections:
-
Getting started
Contains the installation guide for
vectorbtproand the change log -
Features
Contains examples of major enhancements added with each release
-
Tutorials
Contains all the exclusive tutorials
-
Documentation
Contains the documentation on the latest version of
vectorbtproin a user-friendly format -
API
Contains the API documentation on the latest version of
vectorbtpro -
Cookbook
Contains short and sweet examples of using
vectorbtpro
General design¶
If you've ever worked with other backtesting frameworks, you'd expect to implement your trading strategy by taking a Python class, overriding some methods, and then using a limited set of commands to communicate with the backtester, such as to place orders. Using vectorbt isn't anything like that: since it's a quantitative analysis package that operates primarily on arrays, it's more similar to libraries such as Pandas than to frameworks such as backtrader.
The technical difference between a framework and library lies in a term called inversion of control. When you use a framework, the framework is in charge of the flow. It provides some places for you to plug in your code, but it calls the code you plugged in as needed. When you use a library though, you are in charge of the flow of the application; you are choosing when and where to call the library. Because of that, the functionality of vectorbt is distributed across dozens of modules, each being optional and usually having its own documentation.
For example, even though vectorbt gives you this large module and the related documentation on storing and manipulating data, you can skip it entirely and use just Pandas and NumPy arrays. This fact makes it difficult to compile a perfect getting-started guide since each use case is different and requires a varying set of modules, and as the experience shows, you'll need only a fraction of the functions that vectorbt offers to you!
First steps¶
After you've been added to the list of collaborators and accepted the repository invitation, the first step is to install the package.
What to do next? Here's a list of recommended steps:
-
1 - Fundamentals
Learn the fundamental concepts of vectorbt. Why do we use Numba? What is represented by rows and columns? Why is broadcasting so important? How most vectorbt classes work?
-
2 - Basic RSI strategy
Apply the fundamental concepts to backtest a basic RSI strategy. Make the example run on your own data, try a different parameter set, add a trading commission, and just experiment!
-
3 - SuperFast SuperTrend
Learn how to develop, compile, and backtest a Supertrend indicator. Adapt the example to an indicator that's interesting to you. See this documentation for help.
-
4 - Signal development
After building an indicator, learn how to detect events in data and convert them into backtestable signals. This is one of the most important tutorials out there, don't miss!
-
5 - Portfolio
After creating signal arrays, learn how to simulate them and analyze their performance. To better understand the workings of the engine, see this and then this documentation.
-
5 - Cross-validation
You've got a promising trading strategy that does well on historical data? It's time to cross-validate it! Not only CV can help to detect overfitting, but it can also unveil market regimes where the trading strategy performs best and worst.
-
Freedom
By now, you should have collected enough experience to backtest signal-based strategies. Visit the remaining tutorials and documentation, and get familiar with the API documentation to implement a backtesting pipeline from scratch. Good luck!