DEV Community

Vishnu Yadla
Vishnu Yadla

Posted on

StockBuddy

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built StockBuddy, a financial education platform and market simulation tool designed with a modern fintech aesthetic.

Who I Built It For & The Real Problem It Solves

I built this for my friend, Ritvik, who has been wanting to get into stock market analysis and investing. Every time he opened commercial brokerage or charting platforms, he felt overwhelmed by multi-line indicators (RSI, Moving Averages, MACD), cryptic financial jargon, and the paralyzing fear of losing real savings before understanding how technical analysis works.

He didn't want another dry spreadsheet, and he didn't trust generic chatbot wrappers that hallucinate financial advice. He needed a safe, interactive playground where he could test his own theories, observe how market indicators interact, and challenge an AI model without risking a single rupee.

How StockBuddy Solves This

  • Zero Real-Money Risk: Every user starts with β‚Ή1,00,000 of virtual currency to experiment with simulated buy/sell orders and track portfolio allocation.
  • Human vs. AI Prediction Duel: Before seeing any machine learning predictions, Aryan locks in his own direction forecast (UP, SIDEWAYS, DOWN) and confidence percentage. Only then does the app reveal the ML model's inference and compare their reasoning side-by-side.
  • Context-Aware AI Tutor (Not a Chatbot Wrapper): The open-source AI engine receives actual structured application payloads (RSI, MA20/MA50 ratios, MACD histograms, price momentum, volatility) to explain why signals trigger in plain, beginner-friendly language.
  • What-If Scenario Simulator: Interactive sliders let him adjust variables like RSI or volume to visually observe how market shifts would alter model outputs in real time.
  • Honest Financial Disclaimer: Model outputs are framed strictly as experimental probabilistic forecasts, reinforcing that no model can predict the future.

Demo

Key Views Implemented:

  1. Interactive Dashboard: Live portfolio P&L, indices, watchlist, and test accuracy metrics derived from unseen historical splits.
  2. Markets & Live Stock Detail: Multi-timeframe charts (1D to 1Y) with live data from Yahoo Finance API, paired with modular technical indicator cards.
  3. Human vs. AI Arena: Gamified prediction duel with locked-in user predictions and comparison cards.
  4. AI Lab: Context-aware assistant that parses structured stock JSON with instant quick-action prompts ("Explain RSI", "Why Bullish?", "Beginner Mode").
  5. Virtual Portfolio Engine: Live simulated trade execution, position tracking, asset distribution, and transaction auditing.

Code

GitHub logo vishnuyadla22-cmd / StockBuddy

Hacktoberfest Project-1

StockBuddy πŸš€

Tagline: "Challenge the market. Challenge the AI. Learn without risking real money."

StockBuddy is an advanced interactive stock-market learning and prediction simulation platform built for Hacktoberfest 2026. Designed with a startup-quality fintech aesthetic, StockBuddy empowers beginners to explore stock analysis, study technical indicators, challenge an open-weight AI prediction model, run hypothetical "what-if" scenarios, and maintain a virtual portfolio with β‚Ή1,00,000 of simulated capital.


🌟 Hacktoberfest 2026 Highlight: Why Open-Source / Open-Weight AI?

Open-weight and open-source AI models (e.g. Qwen2.5, Llama-3, Mistral via local Ollama/vLLM endpoints) are central to StockBuddy's mission for three key reasons:

  1. Complete Data Privacy & Local Control: Financial learning involves personal preferences, risk tolerance, and trading scenarios. Running open-weight AI locally ensures that sensitive user queries and portfolio context never leave the user's machine.
  2. Cost-Free Scalability & Zero Rate Limits: Proprietary API calls can quickly incur steep pay-per-token costs or hit…

Architecture & Stack:

  • Frontend: React, TypeScript, Tailwind CSS, Recharts, Lucide Icons, Framer Motion
  • Backend API: Python, FastAPI, Uvicorn
  • Machine Learning: Scikit-Learn (Logistic Regression direction classifier with chronological time-series validation to prevent temporal data leakage)
  • AI & Market Services: Modular Yahoo Finance historical data provider and an open-weight LLM inference layer with deterministic structured heuristic fallbacks

How I Built It

Open-source and open-weight AI are the central nervous system of StockBuddy, not decorative add-ons:

  1. Structured Application Payloads: Instead of piping arbitrary conversational text, our Python backend (backend/app/services/ai_service.py) structures live market states into structured JSON schemas:

json
   {
     "symbol": "TCS",
     "currentPrice": 3500.0,
     "rsi": 54.2,
     "movingAverage20": 3450.0,
     "movingAverage50": 3380.0,
     "volumeChange": 18.4,
     "volatility": 0.012,
     "mlDirection": "UP",
     "mlConfidence": 0.67
   }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)