# vectorbt **Repository Path**: kinkeylau/vectorbt ## Basic Information - **Project Name**: vectorbt - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-02 - **Last Updated**: 2026-02-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: open-quant ## README
Inspect any strategy configuration by indexing with pandas:
```python
print(pf[(10, 20, "ETH-USD")].stats())
```
```plaintext
Start 2017-11-09 00:00:00+00:00
End 2026-01-03 00:00:00+00:00
Period 2978 days 00:00:00
Start Value 100.0
End Value 1604.093789
Total Return [%] 1504.093789
Benchmark Return [%] 866.094127
Max Gross Exposure [%] 100.0
Total Fees Paid 204.226289
Max Drawdown [%] 70.734951
Max Drawdown Duration 1095 days 00:00:00
Total Trades 81
Total Closed Trades 80
Total Open Trades 1
Open Trade PnL -14.232533
Win Rate [%] 41.25
Best Trade [%] 120.511071
Worst Trade [%] -27.772271
Avg Winning Trade [%] 27.265519
Avg Losing Trade [%] -9.022864
Avg Winning Trade Duration 32 days 20:21:49.090909091
Avg Losing Trade Duration 8 days 16:51:03.829787234
Profit Factor 1.275515
Expectancy 18.979079
Sharpe Ratio 0.861945
Calmar Ratio 0.572758
Omega Ratio 1.20277
Sortino Ratio 1.301377
Name: (10, 20, ETH-USD), dtype: object
```
Same goes for plotting:
```python
pf[(10, 20, "ETH-USD")].plot().show()
```

It's not all about backtesting! VectorBT can also help with financial data analysis and visualization.
* Create a GIF that animates Bollinger Bands %B and bandwidth across multiple symbols:
```python
symbols = ["BTC-USD", "ETH-USD", "XRP-USD"]
data = vbt.YFData.download(symbols, period="6mo", missing_index="drop")
price = data.get("Close")
bbands = vbt.BBANDS.run(price)
def plot(index, bbands):
bbands = bbands.loc[index]
fig = vbt.make_subplots(
rows=2, cols=1, shared_xaxes=True, vertical_spacing=0.15,
subplot_titles=("%B", "Bandwidth"))
fig.update_layout(showlegend=False, width=750, height=400)
bbands.percent_b.vbt.ts_heatmap(
trace_kwargs=dict(zmin=0, zmid=0.5, zmax=1, colorscale="Spectral", colorbar=dict(
y=(fig.layout.yaxis.domain[0] + fig.layout.yaxis.domain[1]) / 2, len=0.5
)), add_trace_kwargs=dict(row=1, col=1), fig=fig)
bbands.bandwidth.vbt.ts_heatmap(
trace_kwargs=dict(colorbar=dict(
y=(fig.layout.yaxis2.domain[0] + fig.layout.yaxis2.domain[1]) / 2, len=0.5
)), add_trace_kwargs=dict(row=2, col=1), fig=fig)
return fig
vbt.save_animation("bbands.gif", bbands.wrapper.index, plot, bbands, delta=90, step=3, fps=3)
```
```plaintext
100%|ââââââââââ| 31/31 [00:21<00:00, 1.21it/s]
```
This is just the tip of the iceberg. Visit the [website](https://vectorbt.dev/) to learn more.
## đšī¸ Apps
### Candlestick Patterns ([here](https://github.com/polakowo/vectorbt/blob/master/apps/candlestick-patterns/))
Explore candlestick-pattern signals interactively and backtest them with VectorBT.
[](https://github.com/polakowo/vectorbt/blob/master/apps/candlestick-patterns/)
## đ Links
* [Website](https://vectorbt.dev/)
* [Docker images](https://hub.docker.com/r/polakowo/vectorbt)
* [Colab notebook](https://colab.research.google.com/drive/1ibqyrf6LPFlzRb6mkPpl3hxqL6ryNBXI?usp=sharing)
## âī¸ License
This work is [fair-code](http://faircode.io/) distributed under the [Apache 2.0 with Commons Clause](https://github.com/polakowo/vectorbt/blob/master/LICENSE.md) license.
The source code is open, and everyone (individuals and organizations) may use it for free. However, you may not sell products or services that are primarily this software.
If you have questions or want to request a license exception, please [contact the author](mailto:olegpolakow@vectorbt.pro).
Installing optional dependencies may be subject to a more restrictive license.
## â Star History
[](https://star-history.com/#polakowo/vectorbt&Timeline)
## â ī¸ Disclaimer
This software is for educational purposes only. Do not risk money you cannot afford to lose.
USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS.