Skip to main content

Live evaluation of trading agents

Project description

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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

live_trade_bench-0.0.1b0.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

live_trade_bench-0.0.1b0-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file live_trade_bench-0.0.1b0.tar.gz.

File metadata

  • Download URL: live_trade_bench-0.0.1b0.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.16 Darwin/22.6.0

File hashes

Hashes for live_trade_bench-0.0.1b0.tar.gz
Algorithm Hash digest
SHA256 dfd1facac8eb375b13557fd3b404211906ecfba49fdc7ae3b269fc8feaa58188
MD5 121771b0347a58c8e0d351e2a2e63f1e
BLAKE2b-256 26fb348b4561b6448fef5c89e6d55c58d02b0ae1be6fd9adb76f31a701462b70

See more details on using hashes here.

File details

Details for the file live_trade_bench-0.0.1b0-py3-none-any.whl.

File metadata

  • Download URL: live_trade_bench-0.0.1b0-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.16 Darwin/22.6.0

File hashes

Hashes for live_trade_bench-0.0.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 d48aceb27e68c8ab5eaf98f199d134b22f1f7f82c0dd656c5bc047b406e5a183
MD5 ba286746641a7040217c312cdae8e29e
BLAKE2b-256 78b1ad1d5f693f46c46c5afa5f4d8e618b51dd21536655acad3e2213aae95c1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page