Ranchi --:-- ISTRecruiter
Work/FinAI (Hackfest 2025, IIT Dhanbad)← GDG Recruitment Platform←→SkillSync →

FinAI (Hackfest 2025, IIT Dhanbad)

Portfolio tracker with an ML risk model, built in 36 hours at Hackfest 2025, IIT Dhanbad. It prices holdings live from Yahoo Finance and gives each stock a risk score.

Year
2025
Role
Full-stack and ML
Status
Hackathon
Stack
Next.js, Node.js, Express, MongoDB, Python, Flask, scikit-learn
misanthropic-codes/GeekAlpha-Hackfest
FinAI (Hackfest 2025, IIT Dhanbad) screenshot 1 of 3
Screenshot 1 of 3

Overview

Problem

Beginner investors see prices but not risk. Judging a stock means reading beta, volatility and drawdown separately, and most people never do.

What I built

Three parts: a Next.js dashboard, an Express and MongoDB API that stores holdings and fetches live quotes in parallel, and a Flask service running a scikit-learn model. The model combines beta, 20-day volatility and drawdown into one risk bucket, and suggests similar stocks from a similarity matrix.

What I learned

Running the model as its own Flask service let the web work and the ML work move in parallel during a 36-hour build. Falling back to the stored price when a quote fails kept the dashboard usable.

What's next

Planned: importing holdings from a broker, and alerts when a stock moves to a different risk bucket.

Features

What the product does today.

01
Financial ML modelTrained during the event
02
Live portfolio valuesHoldings priced from Yahoo Finance
03
Risk scoringBeta, volatility and drawdown combined
04
Hackathon buildDesigned and shipped in 36 hours

Architecture

How a request moves through the stack. Hover or tap a layer.

ClientNext.jsServerNode.jsExpressPythonDataMongoDBServicesFlaskscikit-learn

Each box is one layer of the app.

Request playgroundLoad a portfolio with live prices
  1. 01ClientThe dashboard asks for the signed-in user's investments.
  2. 02ServerThe Express controller validates the user id. An invalid id answers 400.
  3. 03DataMongoDB returns the holdings as plain objects, newest first.
  4. 04ServicesLive prices for every stock holding are fetched in parallel from Yahoo Finance.
  5. 05ServerEach holding's value is recalculated. A failed quote keeps the stored price.
  6. 06ClientThe controller answers 200 with the enriched holdings.

Traced from backend/controllers/investment.controller.js ↗

Live metrics

Pulled from GitHub, a request to the live site and Google Lighthouse. Refreshed automatically.

RepositoryGeekAlpha-Hackfest ↗JavaScript
Last push20 months ago6 Apr 2025
Created4 Apr 2025
Forks · stars3 · 0
Live siteNoneSource only

Code

Excerpts from this project's repo, with notes.

investment.controller.jsGeekAlpha-Hackfest › backend › controllers › investment.controller.js
29exports.getUserInvestments = async (req, res) => {30  try {31    const { userId } = req.params;32    if (!isValidUserId(res, userId)) return;33 34    const investments = await Investment.find({ userId })35      .lean()36      .select("-__v")37      .sort({ createdAt: -1 });38 39    if (!investments.length) {40      return sendResponse(41        res,42        200,43        true,44        "No investments found for this user",45        []46      );47    }48 49    const enrichedInvestments = await Promise.all(50      investments.map(async (inv) => {51        if (inv.type === "Stock" && inv.ticker) {52          try {53            const quote = await yahooFinance.quote(inv.ticker);54            inv.livePrice =55              quote?.regularMarketPrice ||56              inv.purchasePrice ||57              inv.currentValue;58            inv.currentValue = inv.quantity59              ? inv.quantity * inv.livePrice60              : inv.currentValue;61          } catch (yahooErr) {62            console.error(63              `Error fetching live price for ${inv.ticker}:`,64              yahooErr65            );66          }67        }68        return inv;69      })70    );
JavaScriptLn 29, Col 1UTF-84 notes

Links

See it running or read the code.

Next projectSkillSyncFrontend prototype of a teammate finder for hackathons. Search people by skill, open their profile and message them.