Skip to content

institutional-grade stock analysis to retail investors through a multi-agent AI system. Get comprehensive fundamental, technical, and sentiment analysis for any stock in under 2 minutes. Built with love @ Full-Stack, Hosted by Sim.ai & Loveable @ Y Combinator, sponsored by Stripe, Brex & Supabase. (https://events.ycombinator.com/fullstackhackathon)

Notifications You must be signed in to change notification settings

draggle/AlphaHedge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

AlphaHedge

AI-Powered Quantitative Research Platform for Retail Investors

AlphaHedge brings institutional-grade stock analysis to retail investors through a multi-agent AI system. Get comprehensive fundamental, technical, and sentiment analysis for any stock in under 2 minutes.

Features

  • Multi-Agent Stock Analysis - Three specialized AI agents analyze stocks from different perspectives:

    • Fundamental Analysis (financial statements, revenue growth, margins, balance sheet)
    • Technical Analysis (price trends, moving averages, volatility, momentum)
    • Sentiment Analysis (market sentiment, news flow, analyst consensus)
  • Follow-up Q&A - Ask technical questions about your analysis using Google Gemini

  • User Authentication - Secure login via email/password or OAuth (Google, GitHub)

  • Persistent Chat History - All analyses saved and accessible from your dashboard

  • Personalized Onboarding - Capture risk tolerance, time horizon, and portfolio size

Tech Stack

Category Technologies
Frontend Next.js 16, React 19, TypeScript, Tailwind CSS 4
UI/UX Framer Motion, Radix UI, Lucide Icons
Backend Next.js API Routes
Database Supabase (PostgreSQL)
Authentication Supabase Auth
AI Orchestration Sim.ai (multi-agent workflows)
Chat AI Google Gemini

Getting Started

Prerequisites

  • Node.js 18+
  • Supabase account
  • Sim.ai account with API access
  • Google AI Studio account

Installation

  1. Clone the repository
git clone https://github.com/zh3nl/AlphaHedge.git
cd AlphaHedge/alphahedge
  1. Install dependencies
npm install
  1. Set up environment variables

Create a .env.local file in the alphahedge directory:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

# Sim.ai
SIM_API_KEY=your_sim_api_key

# Google AI
GOOGLE_AI_API_KEY=your_google_ai_api_key
  1. Set up Supabase tables

Create the following tables in your Supabase project:

user_profiles

create table user_profiles (
  id uuid primary key default gen_random_uuid(),
  user_id uuid references auth.users not null,
  risk_tolerance text,
  time_horizon text,
  portfolio_size text,
  onboarding_completed boolean default false,
  created_at timestamp with time zone default now(),
  updated_at timestamp with time zone default now()
);

chats

create table chats (
  id uuid primary key default gen_random_uuid(),
  user_id uuid references auth.users not null,
  title text,
  ticker text,
  messages jsonb default '[]'::jsonb,
  bookmarked boolean default false,
  created_at timestamp with time zone default now(),
  updated_at timestamp with time zone default now()
);
  1. Run the development server
npm run dev
  1. Open http://localhost:3000 in your browser

Project Structure

alphahedge/
├── src/
│   ├── app/
│   │   ├── api/
│   │   │   ├── stock/route.ts      # Sim.ai workflow execution
│   │   │   └── chat/route.ts       # Google Gemini chat endpoint
│   │   ├── auth/                   # Authentication pages
│   │   ├── dashboard/              # Main dashboard
│   │   └── onboarding/             # User onboarding flow
│   ├── components/
│   │   ├── ui/                     # Reusable UI components
│   │   ├── auth/                   # Auth components
│   │   ├── dashboard/              # Dashboard components
│   │   └── onboarding/             # Onboarding components
│   └── lib/
│       ├── supabase/               # Supabase clients
│       └── types/                  # TypeScript types
├── public/                         # Static assets
└── package.json

Scripts

Command Description
npm run dev Start development server
npm run build Build for production
npm run start Start production server
npm run lint Run ESLint

API Endpoints

POST /api/stock

Executes multi-agent stock analysis workflow.

Request:

{
  "ticker": "AAPL"
}

Response:

{
  "output": {
    "content": "# Stock Analysis: AAPL\n\n## Fundamental Analysis\n..."
  }
}

POST /api/chat

Handles follow-up questions about stock analysis.

Request:

{
  "messages": [...],
  "question": "What are the key risks?",
  "ticker": "AAPL"
}

Response:

{
  "content": "Based on the analysis..."
}

Disclaimer

AlphaHedge is for informational purposes only and does not constitute investment advice. Always conduct your own research and consult with a qualified financial advisor before making investment decisions.

Authors

Built with love @ Full-Stack, hosted by Sim.ai & Loveable @ Y Combinator, sponsored by Stripe, Brex & Supabase. (https://events.ycombinator.com/fullstackhackathon)

License

MIT

About

institutional-grade stock analysis to retail investors through a multi-agent AI system. Get comprehensive fundamental, technical, and sentiment analysis for any stock in under 2 minutes. Built with love @ Full-Stack, Hosted by Sim.ai & Loveable @ Y Combinator, sponsored by Stripe, Brex & Supabase. (https://events.ycombinator.com/fullstackhackathon)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 86.8%
  • CSS 9.9%
  • PLpgSQL 2.9%
  • JavaScript 0.4%