How prateeknitcse/national-institute-of-technology-arunachal-pradesh-prateek-singh-hackathon works
This is a financial-text risk engine with a portfolio stress-testing module and web dashboard. News and StockTwits ingestion store raw documents; the pipeline extracts tracked companies and computes sentiment, event type, and precedent-based impact scores, then stores risk signals. The API exposes signal summaries and runs stress tests for qualifying events; the dashboard presents signals and before/after portfolio results. The README documents the major capabilities; source excerpts show the backend calls. Dashboard-to-API wiring is documented but its implementation is not visible in the sampled page source.
Main entry points: pipeline.py Signal pipeline · main.py Risk API · connection.py Database sessions · trigger.py Stress trigger
Components 20
Data ingestion
- News ingestion
src/ingestion/news_ingest.py - Social ingestion
src/ingestion/stocktwits_ingest.py
Risk analysis
- Signal pipeline
src/pipeline.py - Sentiment scoring
src/nlp/sentiment.py - Event classification
src/nlp/classify.py - Impact scoring
src/nlp/impact_rag.py
Persistence
- Raw documents
src/db/models.py - Risk signals
src/db/models.py - Database sessions
src/db/connection.py - Reference events
data/reference_events.json - Chroma vectors
src/nlp/impact_rag.py
Portfolio stress
- Stress trigger
src/stress_test/trigger.py - Portfolio simulation
src/stress_test/portfolio.py - Asset shocks
src/stress_test/shocks.py - Synthetic portfolio
data/synthetic_portfolio.json
API and dashboard
- Risk API
src/api/main.py - Risk dashboard
dashboard/app/page.js
Other components
- Analyst
- News feeds
- StockTwits
Connections 25
- News feeds → News ingestion: provides feeds
src/ingestion/news_ingest.py - StockTwits → Social ingestion: provides messages
src/ingestion/stocktwits_ingest.py - News ingestion → Database sessions: opens session
src/ingestion/news_ingest.py - Social ingestion → Database sessions: opens session
src/ingestion/stocktwits_ingest.py - News ingestion → Raw documents: inserts documents
src/ingestion/news_ingest.py - Social ingestion → Raw documents: inserts documents
src/ingestion/stocktwits_ingest.py - Signal pipeline → Database sessions: opens session
src/pipeline.py - Signal pipeline → Raw documents: reads documents
src/pipeline.py - Signal pipeline → Sentiment scoring: scores sentiment
src/pipeline.py - Signal pipeline → Event classification: classifies events
src/pipeline.py - Signal pipeline → Impact scoring: scores impact
src/pipeline.py - Signal pipeline → Risk signals: writes signals
src/pipeline.py - Impact scoring → Reference events: loads precedents
src/nlp/impact_rag.py - Impact scoring → Chroma vectors: queries vectors
src/nlp/impact_rag.py - Risk API → Database sessions: opens session
src/api/main.py - Risk API → Risk signals: queries signals
src/api/main.py - Analyst → Risk API: requests results
README.md - Risk dashboard → Risk API: fetches results
README.md - Analyst → Risk dashboard: views results
README.md - Risk API → Stress trigger: runs stress tests
src/api/main.py - Stress trigger → Database sessions: opens session
src/stress_test/trigger.py - Stress trigger → Risk signals: filters signals
src/stress_test/trigger.py - Stress trigger → Portfolio simulation: runs simulation
src/stress_test/trigger.py - Portfolio simulation → Synthetic portfolio: loads assets
src/stress_test/portfolio.py - Portfolio simulation → Asset shocks: gets shocks
src/stress_test/portfolio.py