Watch AI models make buy and sell decisions in a terminal-based educational simulator
You can observe multiple AI models acting as investors to analyze market data and make trading decisions without moving real money. This tool serves as a learning environment for understanding how AI makes judgments, and it does not execute actual trades. You can grasp the flow of trading logic through the records of a fund managed with virtual funds.
Paper trading with virtual funds
The default mode of the terminal app is paper trading. It manages a fund by combining real market data with virtual funds, where each fund maintains a ledger recording actual market dates and the history of virtual funds. An approval step before execution previews the decisions the AI will make, allowing you to transparently verify what judgments are being made. All sessions are added to a hash-chained record, ensuring that changes in asset value remain as cumulative performance rather than being reset. You can view the full session history with the s key and stop immediately with the h or r keys.
Backtesting strategies with historical data
It also supports a backtesting mode that reruns a fund on historical data to check the strategy's response. Fund definitions do not include a specific list of stocks; instead, you select the scope of stocks to analyze each time you run a backtest. The execution results plot the asset curve against a benchmark, and the research results are saved to a local directory. This allows you to visually understand how a specific strategy reacted in past market environments.
Installation and API key setup
Installation is completed with the pipx install aihf command. Required API keys are requested upon first use and automatically saved to the ~/.hedge-fund/.env file. You need API keys for financial data and AI models, and you can choose from Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi, or TypeSafe(Jev). If keys are already set as environment variables in your shell, they take precedence over the saved file.
Why it cannot be used for real investing
This project is developed solely for educational and research purposes and does not provide actual investment advice or guarantee returns. The developer is not responsible for financial losses, and investment decisions must always be discussed with a financial expert. You must remember that past performance does not guarantee future results. It is distributed under the MIT license, allowing free use for learning and research, but it should not be approached with the intention of converting it into a live trading system.