Metadata-Version: 2.4
Name: StrateQueue
Version: 0.4.2
Summary: The fastest way from backtest to live trading
Author-email: Trading System Contributors <samuel.tinnerholm@gmail.com>
Maintainer-email: Trading System Contributors <samuel.tinnerholm@gmail.com>
License: AGPL-3.0
Project-URL: Homepage, https://github.com/StrateQueue/StrateQueue
Project-URL: Documentation, https://github.com/StrateQueue/StrateQueue#readme
Project-URL: Repository, https://github.com/StrateQueue/StrateQueue
Project-URL: Issues, https://github.com/StrateQueue/StrateQueue/issues
Project-URL: Changelog, https://github.com/StrateQueue/StrateQueue/releases
Keywords: trading,backtesting,live-trading,algorithmic-trading,financial-data,quantitative-finance,strategy-signals,alpaca-trading
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=2.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: websocket-client>=1.6.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: alpaca-py>=0.40.0
Requires-Dist: ccxt>=4.4.96
Requires-Dist: questionary>=1.10.0
Requires-Dist: fastapi>=0.104.0
Requires-Dist: uvicorn[standard]>=0.24.0
Requires-Dist: python-multipart
Requires-Dist: httpx>=0.24.0
Requires-Dist: rich>=13.0.0
Requires-Dist: pydantic<2.12,>=2.0
Requires-Dist: yfinance==0.2.65
Requires-Dist: nest_asyncio>=1.5.0
Provides-Extra: interactive
Requires-Dist: questionary>=1.10.0; extra == "interactive"
Provides-Extra: backtesting
Requires-Dist: numpy<3,>=1.24; extra == "backtesting"
Requires-Dist: bokeh>=2.4.2; extra == "backtesting"
Requires-Dist: backtesting>=0.3.3; extra == "backtesting"
Provides-Extra: vectorbt
Requires-Dist: numpy<1.24,>=1.21; extra == "vectorbt"
Requires-Dist: numba<0.57,>=0.56; extra == "vectorbt"
Requires-Dist: vectorbt<0.29,>=0.26; extra == "vectorbt"
Requires-Dist: pandas<2.4,>=2.0; extra == "vectorbt"
Requires-Dist: scipy<2.0,>=1.9; extra == "vectorbt"
Requires-Dist: matplotlib<4.0,>=3.5; extra == "vectorbt"
Requires-Dist: plotly<7.0,>=5.0; extra == "vectorbt"
Requires-Dist: requests<3.0,>=2.31; extra == "vectorbt"
Requires-Dist: dill<0.5,>=0.3.6; extra == "vectorbt"
Requires-Dist: tqdm<5.0,>=4.64; extra == "vectorbt"
Requires-Dist: pytz>=2022.1; extra == "vectorbt"
Requires-Dist: python-dateutil<3.0,>=2.8; extra == "vectorbt"
Provides-Extra: backtrader
Requires-Dist: backtrader>=1.9.78.123; extra == "backtrader"
Provides-Extra: zipline
Requires-Dist: zipline-reloaded>=3.0; extra == "zipline"
Provides-Extra: bt
Requires-Dist: bt>=0.2.9; extra == "bt"
Provides-Extra: analytics
Requires-Dist: scipy>=1.11.0; extra == "analytics"
Requires-Dist: ta-lib>=0.4.0; extra == "analytics"
Provides-Extra: database
Requires-Dist: psycopg2-binary>=2.9.7; extra == "database"
Requires-Dist: redis>=4.6.0; extra == "database"
Provides-Extra: monitoring
Requires-Dist: prometheus-client>=0.17.0; extra == "monitoring"
Requires-Dist: structlog>=23.1.0; extra == "monitoring"
Provides-Extra: ibkr
Requires-Dist: ib_insync>=0.9.85; extra == "ibkr"
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-dependency>=0.5.1; extra == "dev"
Requires-Dist: pexpect>=4.8.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Provides-Extra: full
Requires-Dist: numpy<3,>=1.24; extra == "full"
Requires-Dist: backtesting>=0.3.3; extra == "full"
Requires-Dist: zipline-reloaded>=3.0; extra == "full"
Requires-Dist: scipy>=1.11.0; extra == "full"
Requires-Dist: ta-lib>=0.4.0; extra == "full"
Requires-Dist: psycopg2-binary>=2.9.7; extra == "full"
Requires-Dist: redis>=4.6.0; extra == "full"
Requires-Dist: prometheus-client>=0.17.0; extra == "full"
Requires-Dist: structlog>=23.1.0; extra == "full"
Requires-Dist: questionary>=1.10.0; extra == "full"
Provides-Extra: all
Requires-Dist: numpy<3,>=1.24; extra == "all"
Requires-Dist: backtesting>=0.3.3; extra == "all"
Requires-Dist: vectorbt<0.29,>=0.25; extra == "all"
Requires-Dist: numba<0.57,>=0.56; extra == "all"
Requires-Dist: zipline-reloaded>=3.0; extra == "all"
Requires-Dist: bt>=0.2.9; extra == "all"
Requires-Dist: scipy>=1.11.0; extra == "all"
Requires-Dist: ta-lib>=0.4.0; extra == "all"
Requires-Dist: psycopg2-binary>=2.9.7; extra == "all"
Requires-Dist: redis>=4.6.0; extra == "all"
Requires-Dist: prometheus-client>=0.17.0; extra == "all"
Requires-Dist: structlog>=23.1.0; extra == "all"
Requires-Dist: questionary>=1.10.0; extra == "all"
Requires-Dist: backtrader>=1.9.78.123; extra == "all"
Dynamic: license-file

# StrateQueue [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Take%20your%20zipline,%20vectorbt,%20backtesting.py,%20or%20backtrader%20strategies%20live%20with%20zero%20code%20changes&url=https://stratequeue.com&hashtags=python,backtesting,trading,zipline,vectorbt,quant) 

[![PyPI version](https://badge.fury.io/py/stratequeue.svg?refresh=1)](https://badge.fury.io/py/stratequeue)
[![PyPI status](https://img.shields.io/pypi/status/stratequeue.svg)](https://pypi.python.org/pypi/stratequeue/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-yellow.svg)](https://github.com/StrateQueue/StrateQueue/blob/main/LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/StrateQueue/StrateQueue)](https://github.com/StrateQueue/StrateQueue/graphs/contributors)
[![Downloads](https://pepy.tech/badge/stratequeue)](https://pepy.tech/project/stratequeue)
[![GitHub stars](https://img.shields.io/github/stars/StrateQueue/StrateQueue?refresh=1)](https://github.com/StrateQueue/StrateQueue/stargazers)
<!---[![codecov](https://codecov.io/gh/stratequeue/stratequeue/branch/main/graph/badge.svg)](https://codecov.io/gh/stratequeue/stratequeue)-->

📖 **[Documentation](https://stratequeue.com/docs)** | 🚀 **[Quick Start Guide](https://www.stratequeue.com/docs/quick-start)** | 💬 **[Community](https://discord.gg/H4hWAXJYqX)**

> **The fastest way from backtest to live trading**
[![Stargazers repo roster for @StrateQueue/StrateQueue](https://reporoster.com/stars/StrateQueue/StrateQueue)](https://github.com/StrateQueue/StrateQueue/stargazers)

> ⭐️ If StrateQueue saved you time or taught you something, consider [starring us on GitHub](https://github.com/StrateQueue/StrateQueue) — it helps more quants discover the project!

<!---
## 🌍 README Translations

[🇺🇸 English](README.md) • [🇨🇳 简体中文](README.zh-CN.md) • [繁體中文](README.zh-TW.md) • [🇮🇳 हिंदी](README.hi.md) • [🇫🇷 Français](README.fr.md) • [🇸🇦 العربية](README.ar.md)
-->

## 📈 StrateQueue 📉

Backtest to live in seconds. StrateQueue lets you deploy any Python trading strategy (**backtrader**, **zipline**, **vectorbt**, **backtrader**, etc.) to any broker with one command: ```stratequeue deploy --strategy ./your_script.py```. No code changes.

## 📑 Table of Contents
- [StrateQueue ](#stratequeue-)
  - [📈 StrateQueue 📉](#-stratequeue-)
  - [📑 Table of Contents](#-table-of-contents)
  - [🎯 Quick-start: From Backtest to Live in One Command](#-quick-start-from-backtest-to-live-in-one-command)
    - [Your existing backtest:](#your-existing-backtest)
    - [Deploy to live trading:](#deploy-to-live-trading)
  - [🛠️ Prerequisites](#️-prerequisites)
  - [📥 Installation](#-installation)
    - [Setup](#setup)
    - [Dashboard (Experimental)](#dashboard-experimental)
  - [🔧 Supported Integrations](#-supported-integrations)
  - [✨ Why StrateQueue?](#-why-stratequeue)
  - [🔄 How It Works](#-how-it-works)
  - [Star History](#star-history)
  - [⚠️ Disclaimer – No Investment Advice](#️-disclaimer--no-investment-advice)
  - [© License](#-license)

## 🎯 Quick-start: From Backtest to Live in One Command
### Your existing backtest:
```python
class SMAStrategy(Strategy):
    def init(self):
        self.sma_short = self.I(ta.SMA, self.data.Close, 10)
        self.sma_long = self.I(ta.SMA, self.data.Close, 20)
    
    def next(self):
        if crossover(self.sma_short, self.sma_long):
            self.buy()
        elif crossover(self.sma_long, self.sma_short):
            self.sell()
```

### Deploy to live trading:
```
pip install stratequeue
stratequeue deploy \
  --strategy examples/strategies/backtestingpy/sma.py \
  --symbol AAPL \
  --timeframe 1m
```

NOTE: To use CCXT, use the ```--broker/data-source ccxt.<broker>``` syntax

![Quick Start Demo](examples/vhs/quick-start.gif)

## 🛠️ Prerequisites

- Python **3.10** or newer (tested up to 3.11)
- pip and a virtual environment (recommended)
- (Optional) Broker API credentials if you plan to trade live (e.g. Alpaca, Interactive Brokers)
- (Optional) A C compiler for building certain dependencies (TA-Lib, IB-API) on Linux/macOS

## 📥 Installation

Install the core package:

```bash
pip install stratequeue
```

If you need support for a specific engine or want everything in one go:

```bash
# Zipline support
pip install "stratequeue[zipline]"
# Backtrader support
pip install "stratequeue[backtrader]"
# Backtesting.py support
pip install "stratequeue[backtesting]"
# VectorBT support
pip install "stratequeue[vectorbt]"
# BT support
pip install "stratequeue[bt]"
# Everything
pip install "stratequeue[all]"
```

### Setup
![Setup](examples/vhs/setup.gif)

### Dashboard (Experimental)
```bash
stratequeue webui
```

## 🔧 Supported Integrations

| Integration | Status |
|-------------|--------|
| **Backtesting Engines** | |
| ├─ backtesting.py | ✅ Implemented |
| ├─ VectorBT | ✅ Implemented |
| ├─ Backtrader | ✅ Implemented |
| ├─ BT | ✅ Implemented |
| └─ Zipline-Reloaded | ✅ Implemented |
| **Brokers** | |
| ├─ Alpaca | ✅ Implemented |
| ├─ Interactive Brokers | ✅ Implemented |
| ├─ CCXT | 🟠 Implemented (not tested) |
| **Data Providers** | |
| ├─ yfinance | ✅ Implemented |
| ├─ Polygon.io | ✅ Implemented |
| ├─ CoinMarketCap | ✅ Implemented |
| ├─ Alpaca | ✅ Implemented |
| └─ Interactive Brokers | 🟠 Implemented (not tested) |
| └─ CCXT | 🟠 Implemented (not tested) |

## ✨ Why StrateQueue?

**🛡️ Safe by Default** — Signals-only mode by default. No accidental trades.

**🔌 Engine Agnostic** — Works with backtesting.py, VectorBT, Backtrader, Zipline-Reloaded, and more coming soon.

**🏦 Multi-Broker** — Unified API across Interactive Brokers, Alpaca, and more coming soon.

**🎯 Portfolio Management** — Deploy single strategies or manage hundreds across multiple accounts

## 🔄 How It Works

<img src="examples/imgs/how-it-works.png" alt="How it works" width="600"/>

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=stratequeue/stratequeue&type=Timeline?refresh=1)](https://www.star-history.com/#stratequeue/stratequeue&Timeline)

## ⚠️ Disclaimer – No Investment Advice

StrateQueue is an open-source toolkit provided **"as-is" for educational and informational purposes only**.
* It does **not** constitute investment advice, brokerage services, or a recommendation to buy or sell any financial instrument.
* All trading involves substantial risk; **past performance is not indicative of future results**. You may lose some or all of your capital.
* By using StrateQueue you acknowledge that **you alone are responsible for your trading decisions** and agree that the StrateQueue maintainers and contributors will **not be liable for any loss or damage** arising from the use of this software.
* Consult a qualified financial professional before deploying live capital.
  
## © License

StrateQueue is released under the **[GNU Affero General Public License v3.0](LICENSE)**.
  
