This repository, ai-hedge-fund, is a production-grade simulation engine for running AI-managed hedge funds in educational and research contexts. It provides a dual-mode system supporting both historical backtesting and live paper trading, all adhering to point-in-time data integrity to prevent look-ahead bias. The architecture is modular and protocol-based, with swappable components for data acquisition (Financial Datasets API), LLM providers (Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi, TypeSafe/Jev), broker execution (simulated/paper), signal generation (quant models and LLM agents emulating investors like Buffett, Munger, Graham), and risk management. The engine includes a hash-chained ledger for tamper-evident record keeping, prompt caching to eliminate redundant LLM costs during backtests, and a textual TUI for interactive management. It is explicitly not intended for real trading and is released under MIT license. The codebase is well-structured with clean abstractions, though it carries some technical debt from being a ground-up v2 rebuild that is not yet fully integrated with its predecessor, and contains hardcoded constants and magic numbers that limit configurability.
pyalgotrading is a Python library that provides an interface to the AlgoBulls algorithmic trading platform. It enables users to create, upload, and execute trading strategies for backtesting, paper trading, and live trading. The library includes abstractions for strategies, orders, and technical indicators, along with an API client for communicating with the AlgoBulls platform. Users define strategy classes that inherit from StrategyBase, implement required methods, and then use the AlgoBullsConnection class to deploy and manage their strategies on the platform. The library supports multiple order types, technical indicators via TA-Lib, and various candlestick chart formats.