https://github.com/ajagtapdev/traider
traider is an educational platform that provides beginner investors with mock trading simulations and instantaneous AI-powered feedback for their trades.
https://github.com/ajagtapdev/traider
cplusplus-20 fastapi nextjs nvidia-gpu
Last synced: about 2 months ago
JSON representation
traider is an educational platform that provides beginner investors with mock trading simulations and instantaneous AI-powered feedback for their trades.
- Host: GitHub
- URL: https://github.com/ajagtapdev/traider
- Owner: ajagtapdev
- Created: 2025-02-15T05:42:54.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-12-05T01:46:05.000Z (7 months ago)
- Last Synced: 2025-12-08T08:34:57.354Z (7 months ago)
- Topics: cplusplus-20, fastapi, nextjs, nvidia-gpu
- Language: C++
- Homepage: https://traider-omega.vercel.app
- Size: 50 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π traider - High-Performance AI-Powered Stock Trading Simulator
## π Inspiration
Finance isnβt a subject commonly taught thoroughly in schools, yet it plays a crucial role in everyoneβs lives. Furthermore, professional trading tools are often inaccessible or too complex for beginners. We created **traider** to bridge this gap, providing a risk-free environment that combines **high-performance C++ analytics** with **AI-driven insights** to help users master the markets.
---
## π― What It Does
**traider** is a next-generation educational platform that leverages a **hybrid C++/Python architecture** to deliver professional-grade trading simulations:
- π **High-Performance C++ Core** β Backtesting and technical analysis executed with bare-metal speed.
- π **Real-Time Simulation** β Trade using historical & current data with millisecond-latency processing.
- π€ **AI-Powered Feedback** β Instantaneous trade analysis using **Llama 70B** on **NVIDIA Cloud Compute**.
- π **Advanced Technical Indicators** β Real-time calculation of SMA, EMA, RSI, VWAP, and Bollinger Bands using our custom C++ engine.
- π° **Market Sentiment Analysis** β AI synthesis of financial news to inform trading decisions.
- π **Gamified Learning** β Compete on leaderboards and track portfolio performance metrics like Sharpe Ratio and Max Drawdown.
**traider** differentiates itself by running its heavy-lifting simulation logic in **C++**, ensuring accuracy and scalability, while using Python and AI for high-level reasoning and user interaction.
---
## π οΈ How We Built It
### πΉ Core Engine (C++)
The heart of **traider** is a high-performance C++ extension (`traider_cpp`) exposed to Python via **Pybind11**. This layer handles all compute-intensive tasks:
- **Backtesting Engine**: Simulates trading strategies over historical data with O(n) efficiency.
- **Technical Indicators**: Optimized implementations of SMA, EMA, RSI, VWAP, and Bollinger Bands.
- **Data Processing**: Fast normalization and manipulation of OHLCV (Open, High, Low, Close, Volume) market data.
- **Portfolio Analytics**: Real-time calculation of risk metrics like Sharpe Ratio, variance, and returns.
### πΉ Backend (Python & AI)
Our Python backend acts as the orchestration layer, integrating the C++ engine with modern AI capabilities:
- **FastAPI** β High-performance API server bridging the frontend and the C++ core.
- **NVIDIA Cloud Compute** β Hosting **Llama 3.3 70B** for deep semantic analysis of market news.
- **Google Search API** β Real-time financial news scraping.
- **Yahoo Finance API** β Source for raw historical market data.
### πΉ Frontend
- **Next.js** β React framework for a responsive, interactive dashboard.
- **Tailwind CSS & ShadCN** β Modern, clean UI components.
- **Recharts** β Visualizing the high-frequency data streams from our backend.
- **Convex & Clerk** β Real-time database and secure authentication.
---
## β‘ Challenges We Faced
- **C++/Python Integration**: Developing a seamless interface between the C++ simulation engine and the Python backend using Pybind11.
- **Memory Management**: Ensuring zero-copy data transfer where possible to maintain high performance.
- **Cross-Platform Compilation**: configuring the build system (`setup.py` / `CMake`) to work reliably across different environments.
- **AI Hallucination Control**: Fine-tuning prompts for the Llama 70B model to ensure financial advice remained grounded in data.
- **Real-Time Data Sync**: coordinating the C++ calculation pipeline with live frontend updates.
---
## π Accomplishments We're Proud Of
### πΉ System Architecture
- Built a **hybrid execution environment** where C++ handles the math and Python handles the logic.
- Achieved **significant performance gains** in backtesting speed compared to pure Python implementations.
- Successfully integrated **NVIDIA's Llama 70B** for context-aware financial commentary.
### πΉ Product Quality
- Designed a **professional-grade dashboard** that abstracts away the complexity of the underlying C++ engine.
- Created a robust educational tool that offers both **quantitative rigor** and **qualitative insights**.
---
## π What We Learned
- **Systems Programming**: The importance of memory safety and type strictness when building financial engines.
- **Foreign Function Interfaces (FFI)**: How to effectively bridge high-level and low-level languages.
- **Financial Engineering**: Deepened our knowledge of technical analysis algorithms and portfolio theory.
- **Scalable Architecture**: Designing a system that leverages the best tools for each specific job (C++ for speed, AI for reasoning).
---
## Screenshots

