QuantifyX
Trade Smarter. Risk Nothing.
Created on 12th April 2026
•
QuantifyX
Trade Smarter. Risk Nothing.
The problem QuantifyX solves
Most beginners who want to learn stock and crypto trading have no safe space to practice.
Real brokerages require capital, carry financial risk, and offer zero educational guidance.
QuantifyX solves this by giving users a fully simulated paper trading environment — backed
by real market data — where they can buy and sell stocks and crypto with virtual money,
track their portfolio live, and get AI-powered 15-day price predictions with a budget-aware
trade strategy. The goal is simple: learn to trade without losing real money, and get
smarter about it with every session.
Features of Our Project
-
Authentication & Wallet — Secure credential-based login and signup powered by
NextAuth. Users get a personalized dashboard with their name, email, and a virtual wallet
they can top up via Razorpay — a real payment gateway integration that simulates depositing
funds into the platform. -
Simulated Trading Engine — A trade ticket powered by FastAPI and the Alpaca paper
trading API lets users buy and sell both stocks (AAPL, TSLA, MSFT, GOOGL, AMZN) and crypto
(BTC/USD, ETH/USD, SOL/USD) in one place. Before executing, the ticket shows the estimated
order value and current market preview so the user knows the exact impact of the trade. -
Portfolio Dashboard — Four live metric cards show Portfolio Value, Cash Balance
(buying power), Holdings Value, and Unrealized P&L at a glance. The Holdings tab breaks
every position down by symbol, quantity, average cost, current market value, and P&L —
covering all assets across stocks and crypto in one unified view. -
Price Tracking & Charts — AAPL Daily Candlestick charts show full OHLC price history
from Oct 2025 to present using real Alpaca market data. A weekly equity curve tracks
portfolio value day-by-day, giving users a clear visual of how their overall portfolio has
grown or declined. -
Transaction History — Every trade, wallet top-up, and financial event is logged with
a timestamp, asset name, share quantity, and dollar value — all persisted in a SQLite ledger
via Prisma ORM and surfaced in the Recent Transactions tab. -
Watchlist — A dedicated tab for users to track and monitor their chosen symbols
without executing trades. -
Razorpay Integration — A fully working payment flow where users can add virtual funds
to their wallet using cards, netbanking, UPI wallets, or Pay Later — making the simulation
feel realistic end to end. -
ML Prediction Center (Bonus) — The standout innovation of the project. Users pick
any stock and enter their own budget, then hit "Run model" to get a full AI-powered trade
plan for the next 15 days. The pipeline works as follows:- 3 years of historical OHLC data is fetched via yFinance and cleaned
- 32 features are engineered — RSI (14), MACD, Bollinger Bands, lagged returns at
1/2/5/15/60 day intervals, momentum ratios, and rolling volatility windows at
5/15/60 days - An XGBoost Regressor is trained on 100% of this historical data to predict the
next 15 closing prices - A Dynamic Programming lookahead strategy is applied on top — it only buys when a
provably higher price exists ahead (net of fees), enforces a cooldown day after
every sell, and sizes each position as a percentage of the user's remaining budget - Output: a 15-day trade table (BUY/SELL/HOLD/COOLDOWN per day), two profit charts,
and a summary showing overall profit and net return
-
News Sentiment Analysis (Bonus) — Real-time news sentiment scoring for each asset
using VaderSentiment, giving users a feel for market mood alongside the price prediction.
GitHub Link for Sentiment Model: https://github.com/Roshan-803/sentiment-api
Challenges we ran into
Integrating the ML model with the Next.js frontend — The XGBoost pipeline runs entirely
in Python while the frontend is built in TypeScript with Next.js. Bridging the two cleanly
required designing a well-structured JSON contract between the FastAPI prediction endpoint
and the React UI so the charts, table, and metric cards all stay consistent with each other.
Setting up FastAPI + Alpaca paper trading — Configuring the Alpaca paper trading API to
execute simulated orders correctly, handle market hours, and return the right order status
back to the frontend took significant trial and error. Running FastAPI alongside Next.js as
a separate service and proxying requests cleanly between them added another layer of
complexity.
Razorpay payment integration — Embedding a real payment gateway into a simulation
platform meant handling webhook verification, order creation, and payment success callbacks
correctly — while making sure the virtual wallet balance updated reliably in the SQLite
database after each successful transaction.
Sentiment analysis — finding the right tool — This was one of the more painful pivots
of the project. We initially built the sentiment pipeline using Finnhub for news data and a
PyTorch transformer model for classification. While the results were accurate, the
transformer was far too heavy — slow to load, memory-intensive, and impractical to run per
request in a hackathon setting. We ultimately switched to VaderSentiment, a lightweight
rule-based sentiment analyser that runs instantly with no model loading overhead, while
still producing meaningful sentiment scores for financial news headlines. The lesson: don't
over-engineer when a simpler tool gets the job done.
Getting the DP trading strategy right — A basic SMA crossover strategy produced
inconsistent and often loss-making results. Replacing it with a Dynamic Programming
lookahead approach — one that only trades when mathematically profitable, respects cooldown
constraints, accounts for fees, and scales to the user's exact budget — was the most
intellectually demanding part of the project. Understanding the DP state machine
(HOLD / CASH / COOLDOWN) and correctly implementing the optimal trade sequence took
multiple iterations.