A newer version of the Gradio SDK is available:
5.49.1
metadata
title: Stock Prediction Explanation
emoji: π¬
colorFrom: yellow
colorTo: purple
sdk: gradio
sdk_version: 5.42.0
app_file: app.py
pinned: false
hf_oauth: true
hf_oauth_scopes:
- inference-api
license: apache-2.0
short_description: AI that predicts stock moves from news and explains why
Explainable Stock Prediction with GRPO + RAG
About this Space
This demo showcases a financial NLP model that predicts stock market reactions to news events while also providing a natural language explanation.
Unlike standard classifiers (which only output UP/DOWN/NEUTRAL), this model combines:
- GRPO (Group Relative Policy Optimization) β reinforcement learning to refine predictions through self-reflection.
- RAG (Retrieval-Augmented Generation) β retrieving past financial events to ground explanations in historical context.
The result: predictions that are both accurate and interpretable.
How it works
- Input β A financial news headline or event description.
- GRPO loop β The model generates a prediction and, if wrong, reflect to improve future reasoning.
- RAG retrieval β Relevant historical events are retrieved to enrich the explanation.
- Output β
- Chosen Stock
- Price Prediction (UP/DOWN or percentage change)
- Explanation (short and clear, grounded in past events)