TradeSim AI is a modern Next.js application that integrates with Interactive Brokers to run AI-assisted trading simulations. The platform enables sophisticated trading strategy development, testing, and optimization through artificial intelligence.
- Beautiful Modern UI: Intuitive dashboard and visualization tools
- Interactive Brokers Integration: Seamless connection to IB accounts
- AI-Powered Simulations: Run trading simulations with AI assistance
- Paper Trading Focus: Test strategies without financial risk
- Strategy Optimization: AI analyzes and improves trading algorithms
- Real Account Application: Apply proven strategies to managed accounts
- Performance Analytics: Comprehensive reporting and insights
- Local LLM Support: Run AI models locally using Vercel AI SDK and LMStudio
TradeSim AI bridges the gap between algorithmic trading and artificial intelligence, allowing users to:
- Develop Trading Strategies: Create and customize trading algorithms
- Run Simulations: Test strategies on historical and real-time market data
- Leverage AI Analysis: Utilize AI to optimize trading parameters
- Review Performance: Analyze detailed metrics and visualizations
- Implement Strategies: Apply vetted strategies to real trading accounts
The platform primarily focuses on paper trading accounts for risk-free simulation, with AI crews studying and optimizing strategies over time. The best-performing strategies can then be recommended for implementation on managed accounts.
- Frontend: Next.js, React, TypeScript
- Styling: Tailwind CSS
- State Management: Redux Toolkit
- Data Visualization: D3.js, TradingView Charts
- API Integration: Interactive Brokers Client Portal API
- AI Components:
- OpenAI API for cloud-based analysis
- Vercel AI SDK for LLM integration
- Local models via LMStudio (privacy-focused option)
- TensorFlow.js for browser-based models
- Authentication: NextAuth.js
- Database: PostgreSQL
- Deployment: Vercel
- Node.js 18.x or later
- npm or yarn
- Interactive Brokers account (paper trading account for development)
- API credentials for Interactive Brokers
- (Optional) LMStudio for local LLM capabilities
-
Clone the repository:
git clone https://github.com/yourusername/tradesim-ai.git cd tradesim-ai -
Install dependencies:
npm install # or yarn install -
Set up environment variables:
cp .env.example .env.local
Fill in the required environment variables in
.env.local -
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser
Detailed documentation is available in the docs directory:
- Architecture Overview
- Interactive Brokers Integration
- AI Components
- Local LLM Integration
- Setting Up Paper Trading
- Developing Trading Strategies
- Running Simulations
- Production Deployment
Run the test suite:
npm test
# or
yarn testContributions are welcome! Please read the contributing guidelines first.
This project is licensed under the MIT License - see the LICENSE file for details.