Skip to main content

live-trade-bench

Live Evaluation of Trading Agents

Python 3.10 GitHub pull request pre-commit bear-ified Code style: black

Overview

Trading agent evaluation in the live environment. We target at avoiding overfitting on back test and build an arena for LLM-based trading agents.

Features

  • AI Agents: GPT-4 powered trading decisions
  • Multi-Asset: Stocks and prediction markets
  • Real-time Data: Live market feeds
  • Portfolio Management: Automated tracking and execution

Quick Start

# Install
poetry install

# Stock trading
from live_trade_bench import LLMStockAgent, create_stock_account
agent = LLMStockAgent("Trader")
account = create_stock_account(10000.0)

# Prediction markets
from live_trade_bench import LLMPolyMarketAgent, fetch_trending_markets
agent = LLMPolyMarketAgent("Predictor")
markets = fetch_trending_markets(5)

Structure

live_trade_bench/
├── agents/                     # AI trading agents
│   ├── base_agent.py          # Base LLM agent class
│   ├── stock_agent.py         # Stock trading agent
│   ├── polymarket_agent.py    # Prediction market agent
│   ├── stock_system.py        # Stock trading system
│   └── polymarket_system.py   # Polymarket trading system
├── accounts/                   # Portfolio management
│   ├── base_account.py        # Base account class
│   ├── stock_account.py       # Stock portfolio & execution
│   ├── polymarket_account.py  # Prediction market portfolio
│   ├── action.py              # Trading action definitions
│   └── utils.py               # Account utilities
├── fetchers/                   # Real-time data sources
│   ├── base_fetcher.py        # Base fetcher class
│   ├── stock_fetcher.py       # Yahoo Finance integration
│   ├── polymarket_fetcher.py  # Polymarket API
│   ├── news_fetcher.py        # Financial news
│   ├── option_fetcher.py      # Options data
│   └── reddit_fetcher.py      # Social sentiment
└── utils/                      # LLM & utilities
    ├── llm_client.py          # LLM integration
    └── logger.py              # Logging utilities

Examples

See examples/ directory for demo scripts.

License

This project is licensed under the PolyForm Noncommercial License 1.0.0 - see the LICENSE file for details.

For commercial licensing, please see LICENSE.COMMERCIAL.

Metadata

Release files for live-trade-bench 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for live-trade-bench 0.0.1
File Size Uploaded Provenance Actions
live_trade_bench-0.0.1.tar.gz 36.4 kB Without provenance Details for live_trade_bench-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for live-trade-bench 0.0.1
File Interpreter ABI Platform Actions
live_trade_bench-0.0.1-py3-none-any.whl Python 3 none any Details for live_trade_bench-0.0.1-py3-none-any.whl

Total release size: 87.2 kB

Release files / live_trade_bench-0.0.1.tar.gz

Download URL live_trade_bench-0.0.1.tar.gz
Size 36.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0d3b7bfc97188a153f4df36ce73bd89b2f930b264db4de351d792494b3ee735c
BLAKE2b-256 checksum
How to use checksums
2c1501e0d7cab92a0834587d8462cd7c928d6d32aa21588229269d92f85961ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.10.16 Darwin/22.6.0

Release files / live_trade_bench-0.0.1-py3-none-any.whl

Download URL live_trade_bench-0.0.1-py3-none-any.whl
Size 50.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a98ac2f41b2a0fbd1777360f95e2bd80866d3694491c3c95d1421d61d429f6a1
BLAKE2b-256 checksum
How to use checksums
75b3d40a42009e82bb35fa03f57eb44e3a2de10528168f2069c0673ad2b5163e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.10.16 Darwin/22.6.0

Security for live-trade-bench 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page