Skip to content

A lightweight tool to explore your backtesting results with TradingView chart. Upload CSVs, inspect trades, and debug strategies.

License

Notifications You must be signed in to change notification settings

Finance-Insight-Lab/bt-visualizer

Repository files navigation

📈 Backtest Visualization Tool — bt-visualizer

A lightweight, interactive charting tool to visualize your backtest results inside JupyterLab, with trade annotations, zoom support, tooltips, and more.

bt-visualizer.mp4

✨ Features

  • 🕵️ Hover to see trade information
  • 🖱️ Click to zoom into a specific trade
  • 🔍 Zoom / pan support
  • 🖱️ Double click to zoom out
  • 🔄 Reset chart and load new backtest results dynamically

📦 Installation

You can install the Python package via pip:

pip install bt-visualizer

Make sure you have JupyterLab installed as well.

🛠️ Usage Example

Inside your JupyterLab notebook:

from bt_visualizer import show_bt_visualization

# Ensure the following files are present in the project directory
show_bt_visualization(
    equity="equity_curve.csv",
    stats="stats.csv",
    ohlc="ohlc.csv",
    trades="trades.csv"
)

📂 Input Data Format

The visualization expects CSV input following the structure from backtesting.py outputs.

You can find sample input files here to see the expected format.

Files expected:

  • equity_curve.csv

  • stats.csv

  • ohlc.csv

  • trades.csv

🌐 Online Demo

You can also try the standalone version of the app, deployed here:

👉 Deployed App

💻 Developer Setup (Optional)

If you want to run or modify the TypeScript frontend locally:

git clone https://github.com/Finance-Insight-Lab/bt-visualizer.git
cd bt-visualizer

npm install
npm run dev

This will start the development server.

📝 License

MIT License.

Created by Ali Gheshlaghi.

About

A lightweight tool to explore your backtesting results with TradingView chart. Upload CSVs, inspect trades, and debug strategies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published