Skip to content

BAWES/tradesim-ai

Repository files navigation

TradeSim AI

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.

TradeSim AI Platform

🚀 Key Features

  • 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

📋 Project Overview

TradeSim AI bridges the gap between algorithmic trading and artificial intelligence, allowing users to:

  1. Develop Trading Strategies: Create and customize trading algorithms
  2. Run Simulations: Test strategies on historical and real-time market data
  3. Leverage AI Analysis: Utilize AI to optimize trading parameters
  4. Review Performance: Analyze detailed metrics and visualizations
  5. 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.

🛠️ Technology Stack

  • 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

🚦 Getting Started

Prerequisites

  • 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

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/tradesim-ai.git
    cd tradesim-ai
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Set up environment variables:

    cp .env.example .env.local

    Fill in the required environment variables in .env.local

  4. Run the development server:

    npm run dev
    # or
    yarn dev
  5. Open http://localhost:3000 in your browser

📚 Documentation

Detailed documentation is available in the docs directory:

🧪 Testing

Run the test suite:

npm test
# or
yarn test

🤝 Contributing

Contributions are welcome! Please read the contributing guidelines first.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 References

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors