Inspiration
For this project, we were inspired by the idea of building a collaborative AI trading platform where users could come together to brainstorm, design, and simulate trading strategies. We envisioned a space where users could create custom trading bots and refine their ideas alongside AI models and live market data.
What it does
TRAI (Trading AI) allows users to create groups, define trading rules, simulate trades, and receive AI-driven evaluations of different strategies. Users can test how strategies like mean reversion, linear regression, swing trading, or sentiment-based trading might perform on specific stocks. Ultimately, our goal is to transform TRAI into a collaborative environment for building real trading algorithms with AI assistance.
How we built it
We built TRAI with a Python FastAPI backend connected to MongoDB Atlas for database management. The backend handles authentication, user management, rule storage, and simulated trading execution, while also scraping live market data and financial news. The frontend was developed with Next.js 15 and Ant Design, leveraging dynamic ApexCharts for clean, real-time data visualizations. For AI integration, we used Google's Gemini 2.0 Flash model to evaluate trading strategies based on user input.
Challenges we ran into
Throughout development, we ran into a number of challenges. Fine-tuning prompt engineering to generate reliable and concise outputs from Gemini was tricky. We also spent significant time debugging CORS issues between the frontend and backend, formatting real-time market data cleanly for charts, and designing a modern, intuitive UI. Furthermore, we had a lot of difficulty trying to set up an AI agent and deploying our build.
Accomplishments that we're proud of
We are proud that we successfully built the group collaboration features and integrated AI-powered trading evaluations. Also, we are very happy with the current UI and the functionality of the project.
What we learned
On the backend, we gained strong experience working with FastAPI and asynchronous MongoDB operations. On the frontend, we deepened our skills in UI/UX design, API integration, and real-time charting. Building a fullstack AI trading tool from scratch gave us valuable insight into designing scalable and responsive platforms.
What's next for TRAI (Trading AI)
We want to allow users to customize and deploy their own trading algorithms, and eventually integrate real broker APIs to allow live trading directly from the platform. We also plan to experiment with fine-tuning a specialized LLM for financial modeling and trade idea generation. If fine-tuning proves ineffective, we will pivot toward manually coding algorithms using classic statistical and machine learning techniques. In the long term, we envision building custom AI agents to manage users' trades automatically, helping them navigate markets faster and smarter than before.
Log in or sign up for Devpost to join the conversation.