Skip to content

Pytrade.org is a curated list of Python libraries and resources for algorithmic trading

License

Notifications You must be signed in to change notification settings

PFund-Software-Ltd/pytrade.org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Twitter Follow

Python packages and resources for algo-trading

Inspired by PyViz, PyTrade is a website showing a curated list of Python libraries and resources for algorithmic trading. Think of it as an awesome-algo-trading list on GitHub, but with a better presentation.

This website is owned by PFund.ai, a trading platform that bridges algo-trading and manual trading using AI (LLM).

Table of Contents

Installation

pnpm install

Development

pnpm dev

Build Static Files & Run

pnpm build && pnpm start

Curated List

Trading Frameworks (support backtesting and live trading)

  • Lean - Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
  • nautilus_trader - A high-performance algorithmic trading platform and event-driven backtester
  • backtrader - Python Backtesting library for trading strategies
  • pfund - An All-in-One Algo-Trading Framework: Backtest -> Train -> Trade -> Monitor. Machine / Deep Learning Ready. Supports All Trading: TradFi+CeFi+DeFi. Code Once, Trade Anywhere.
  • trading-strategy - Python framework for quantitative financial analysis and trading algorithms on decentralised exchanges
  • blankly - πŸš€ πŸ’Έ Easily build, backtest and deploy your algo in just a few lines of code. Trade stocks, cryptos, and forex across exchanges w/ one package.
  • vnpy - a Python-based open source quantitative trading system development framework
  • freqtrade - Free, open source crypto trading bot
  • hummingbot - Open source software that helps you create and deploy high-frequency crypto trading bots
  • jesse - An advanced crypto trading bot written in Python
  • Superalgos - Free, open-source crypto trading bot, automated bitcoin / cryptocurrency trading software, algorithmic trading bots. Visually design your crypto trading bot, leveraging an integrated charting system, data-mining, backtesting, paper trading, and multi-server crypto bot deployments.
  • qstrader - QuantStart.com - QSTrader backtesting simulation engine.
  • qtpylib - QTPyLib, Pythonic Algorithmic Trading
  • Zipline-reloaded - Zipline, a Pythonic Algorithmic Trading Library

Backtesting Frameworks (only support backtesting)

  • vectorbt - Find your trading edge using the fastest engine for backtesting, algorithmic trading, and research.
  • bt - Flexible backtesting library for Python.
  • pybroker - Algorithmic trading in Python with machine learning.
  • backtesting.py - πŸ” πŸ“ˆ 🐍 πŸ’° Backtest trading strategies in Python.

Trading Strategies

Machine Learning Models

Time Series Analysis

  • tsai - Time series Timeseries Deep Learning Machine Learning Python Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
  • stumpy - STUMPY is a powerful and scalable Python library for modern time series analysis
  • tsfresh - Automatic extraction of relevant features from time series
  • sktime - A unified framework for machine learning with time series
  • tslearn - The machine learning toolkit for time series analysis in Python
  • arch - ARCH models in Python
  • pyod - A Python library for outlier and anomaly detection, integrating classical and deep learning techniques

Analytics

  • quantstats - Portfolio analytics for quants, written in Python.
  • skfolio - Python library for portfolio optimization built on top of scikit-learn.
  • Riskfolio-Lib - Portfolio Optimization and Quantitative Strategic Asset Allocation in Python.
  • PyPortfolioOpt - Financial portfolio optimisation in Python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity.
  • ffn - ffn - a financial function library for Python.
  • pyfolio-reloaded - Portfolio and risk analytics in Python.
  • alphalens-reloaded - Performance analysis of predictive (alpha) stock factors.
  • empyrical-reloaded - Common financial risk and performance metrics. Used by zipline and pyfolio.

Backtesting Data

Stock Data / TradFi Data

Crypto Data

DeFi Data

Live Trading Data

TradFi Data

Data Libraries

  • yfinance - Download market data from Yahoo! Finance's API
  • binance-public-data - Details on how to get Binance public data
  • pfeed - A Data Pipeline for Algo-Trading: Download -> Clean (ETL/ELT) -> Store Data. Supports Various Data Sources. Clean Once and Forget
  • FinanceDatabase - This is a database of 300.000+ symbols containing Equities, ETFs, Funds, Indices, Currencies, Cryptocurrencies and Money Markets

Machine Learning Tools

  • scikit-learn - scikit-learn: machine learning in Python
  • pytorch - Tensors and Dynamic neural networks in Python with strong GPU acceleration
  • pyro - Deep universal probabilistic programming with Python and PyTorch

Machine Learing Operations Tools

  • mlflow - Open source platform for the machine learning lifecycle
  • feast - The Open Source Feature Store for Machine Learning
  • wandb - The AI developer platform. Use Weights & Biases to train and fine-tune models, and manage models from experimentation to production.
  • dvc - πŸ¦‰ ML Experiments and Data Management with Git

Data Tools

  • pandas – Flexible and powerful data analysis/manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
  • polars – Dataframes powered by a multithreaded, vectorized query engine, written in Rust
  • spark – Apache Spark - A unified analytics engine for large-scale data processing
  • dask – Parallel computing with task scheduling
  • modin – Modin: Scale your Pandas workflows by changing a single line of code
  • duckdb – DuckDB is an analytical in-process SQL database management system
  • vaex – Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization, and exploration of big tabular data at a billion rows per second πŸš€
  • fugue – A unified interface for distributed computing. Fugue executes SQL, Python, Pandas, and Polars code on Spark, Dask, and Ray without any rewrites
  • ibis – The portable Python dataframe library
  • Daft – Distributed DataFrame for Python designed for the cloud, powered by Rust

Research Tools

  • Quadratic – Quadratic | Spreadsheet with Python, SQL, and AI
  • OpenBBTerminal – Investment Research for Everyone, Everywhere
  • qlib – Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL

Dashboard Tools

  • Streamlit – Streamlit β€” A faster way to build and share data apps
  • Gradio – Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
  • Dash – Data Apps & Dashboards for Python. No JavaScript Required
  • Panel – Panel: The powerful data exploration & web app framework for Python
  • Taipy – Turns Data and AI algorithms into production-ready web applications in no time

GPU Providers

Notebook-based

Cloud-based

  • Vast.ai - Vast.ai is the market leader in low-cost cloud GPU rental. Use one simple interface to save 5-6X on GPU compute.
  • Lambda Labs - The GPU Cloud for AI, On-demand & reserved cloud NVIDIA GPUs for AI training & inference
  • Paperspace - Build & Run AI/ML Models on NVIDIA H100 GPUs, Develop, train, and deploy AI applications. Join over 500,000 builders on Paperspace.
  • Hyperstack - A Supercloud Specialised for AI
  • Datacrunch.io - The ML Cloud, Premium dedicated GPU servers and clusters, Model inference services
  • Nimbix - On-demand access to GPU and CPU compute accelerators now and at scale.
  • TensorDock - We make the GPU servers that cost too much on other clouds available for a low, hourly price.
  • Saturn Cloud - Saturn Cloud provides customizable, ready-to-use cloud environments for collaborative data teams. Run analyses, train models, deploy APIs, and more

API Integrations/Connectors

Traditional Brokers

  • ibkr-docker - Run IBKR Gateway/TWS in a Docker container
  • ib_insync - Python sync/async framework for Interactive Brokers API
  • alpaca-py - The Official Python SDK for Alpaca API

Cryptocurrency Exchanges

  • CCXT - A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
  • binance-connector-python - a simple connector to Binance Public API
  • pybit - Official Python3 API connector for Bybit's HTTP and WebSockets APIs.
  • python-binance - Binance Exchange API python implementation for automated trading
  • tda-api - A TD Ameritrade API client for Python.

DeFi Exchanges