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

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.

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.1.tar.gz (36.4 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.1-py3-none-any.whl (50.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: live_trade_bench-0.0.1.tar.gz
  • Upload date:
  • Size: 36.4 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.1.tar.gz
Algorithm Hash digest
SHA256 0d3b7bfc97188a153f4df36ce73bd89b2f930b264db4de351d792494b3ee735c
MD5 191c697b8787c53f4757fa9bcdb8179d
BLAKE2b-256 2c1501e0d7cab92a0834587d8462cd7c928d6d32aa21588229269d92f85961ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: live_trade_bench-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 50.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a98ac2f41b2a0fbd1777360f95e2bd80866d3694491c3c95d1421d61d429f6a1
MD5 f68cd84a3875e98ec1570397a55fcdcf
BLAKE2b-256 75b3d40a42009e82bb35fa03f57eb44e3a2de10528168f2069c0673ad2b5163e

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