Skip to content

tanvibatchu/RiskSpeak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RiskSpeak

Turning stocks and prices into understandable risks

RiskSpeak is a portfolio risk analysis platform that helps investors understand what could go wrong — before it does. Instead of raw metrics or opaque scores, RiskSpeak translates portfolio data into structured, explainable risk insights so that everyone can understand.

Screenshot 2026-01-11 at 11 11 31 AM

Inspiration

Modern investors have access to more data than ever, yet risk remains poorly communicated. Volatility numbers, beta values, and exposure tables often fail to answer the real question:

What risks am I actually exposed to — and why do they matter?

RiskSpeak was built to close this gap. The project was inspired by the disconnect between quantitative finance tools and how humans reason about risk. Whether you’re a student investor, analyst, or fintech builder, understanding risk should be clear, interpretable, and actionable — not buried in spreadsheets.


What it does

RiskSpeak ingests portfolio data and generates structured risk insights across multiple dimensions:

  • Portfolio-level risk
    • Concentration risk
    • Exposure by sector, broker, and asset
  • Market & volatility signals
    • Asset-level and aggregate volatility indicators
  • Sentiment-driven risk
    • News sentiment signals tied to holdings
  • Explainable outputs
    • Human-readable summaries instead of black-box scores

The goal is not just to flag risk, but to explain it in plain language.


How is was built

Backend

  • Python
  • FastAPI
  • Pydantic
  • Uvicorn

Data & Analytics

  • Market data ingestion
  • News sentiment analysis
  • Cached data pipelines for performance

Infrastructure

  • Modular service-based architecture
  • Clean API routing
  • Swagger / OpenAPI documentation

How to set it up locally

1. Clone the repository

git clone https://github.com/tanvibatchu/RiskSpeak.git
cd RiskSpeak

2. Create a virtual environment

python3 -m venv venv
source venv/bin/activate   # macOS / Linux
# venv\Scripts\activate    # Windows

3. Install dependencies

pip install -r requirements.txt

or

4. Set up environment variables

Create a .env file from the template:

cp .env.example .env

Fill in required values (News API key, broker id's if needed).

Running the application

python app/main.py

Or with hot reload:

uvicorn app.main:app --reload

The API will be available at:

http://127.0.0.1:8000

Interactive API docs:

http://127.0.0.1:8000/docs

API Endpoints

Portfolio

  • POST /portfolio – Submit a portfolio for analysis
  • GET /portfolio – Retrieve the currently stored portfolio

Risk Analysis

  • POST /analysis – Generate risk insights for a portfolio
    • Body: Portfolio holdings (e.g., tickers and weights)
    • Returns: Structured risk analysis including concentration, exposure, and volatility signals

Brokers

  • GET /brokers – Retrieve broker-level exposure and metadata

Health

  • GET /health – API health check

Documentation

  • GET /docs – OpenAPI documentation

About

RiskSpeak is a portfolio risk analysis platform that evaluates downside and market risk across investment portfolios. It presents complex financial risk metrics in an intuitive, readable format to support informed decision-making.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors