Access the live platform here: https://quorel-v2.onrender.com/
Quorel V2 is a Flask-based web application that generates an explainable 0–100 creditworthiness score for stocks in near real time.
It combines:
- Market data (OHLCV from Yahoo Finance)
- News headlines and sentiment
- A simple but interpretable ML model
- Time-series forecasting (ARIMA / SARIMAX)
to provide transparent scores, visual dashboards, and narrative explanations that non-technical stakeholders can understand.
-
Secure analyst dashboard
- User signup, email verification, login, and password reset
- Protected views for scores, events, peers, and glossary
-
Data ingestion & preprocessing
- Fetches OHLCV from Yahoo Finance via
yfinance - Robust cleaning: handles missing columns and gaps
- Feature engineering:
- Daily returns
- Relative range (High–Low vs Close)
- 5‑day volatility
- 5‑day momentum
- Fetches OHLCV from Yahoo Finance via
-
Explainable scoring engine
DecisionTreeClassifierover engineered features- 0–100 score from probability of positive next‑day return
- Feature importances exposed and visualized
- Plain‑language explanation of top drivers + momentum & volatility context
-
News & sentiment integration
- RSS + HTML scraping for finance/markets news
- NLU-based event extraction and sentiment tagging
- Sentiment-based score adjustments
- Sentiment distribution plots (positive / neutral / negative)
-
Forecast-aware insights
- ARIMA on prices and historical scores
- SARIMAX with exogenous features (volatility + sentiment index)
- Forecast trend adjustment to the current score
- JSON endpoints for chart-ready forecast data
-
Peer comparison
- Static + dynamic peer lookup (industry/sector)
- 6‑month return correlation between symbol and peers
- Influence rating (1–5 stars) from correlation strength
- Peer comparison bar chart
-
APIs for integration
GET /api/score/<ticker>– score, probability, importances, explanationGET /api/events– news events + sentimentGET /api/score_history/<ticker>– time series of scoresGET /api/price_forecast– actual + forecast prices and confidence bands
-
Backend
- Python 3.8+
- Flask
- Flask-Bcrypt
- Flask-Mail
- SQLite (
score_history.db,users.db)
-
Data & ML
pandas,numpyscikit-learn(DecisionTreeClassifier, StandardScaler)statsmodels(ARIMA, SARIMAX)yfinance
-
NLP & News
feedparser(RSS)requests,BeautifulSoup(scraping)- Custom NLU (
nlu_events/) for event + sentiment extraction
-
Visualization
matplotlib(Agg backend)- Jinja2 templates
- (Optional frontend charting library in templates, e.g. Chart.js)
-
Deployment
- Dockerfile
- Vercel / Render configuration (
vercel.json) requirements.txtfor Python dependencies
- Python 3.8 or higher
pipinstalled- (Recommended) Virtual environment (venv)
- Internet access (for market data and news)
- SMTP credentials for email (e.g. Gmail app password)
git clone https://github.com/Khushi-Roy-123/Quorel-V2.git
cd Quorel-V2python -m venv venv
# Windows (PowerShell)
venv\Scripts\Activate.ps1
# or Windows (cmd)
venv\Scripts\activate.batpip install -r requirements.txtFor development, you can export environment variables or use a .env file (with something like python-dotenv):
FLASK_SECRET_KEY– Flask secret keyMAIL_SERVER– e.g.smtp.gmail.comMAIL_PORT– e.g.587MAIL_USE_TLS–trueMAIL_USERNAME– SMTP user (your email)MAIL_PASSWORD– SMTP/app password
Example (PowerShell):
$env:FLASK_SECRET_KEY = "replace-with-strong-secret"
$env:MAIL_SERVER = "smtp.gmail.com"
$env:MAIL_PORT = "587"
$env:MAIL_USE_TLS = "true"
$env:MAIL_USERNAME = "[email protected]"
$env:MAIL_PASSWORD = "your-app-password"Note: The repository currently contains hard-coded credentials in
app.pyfor demo purposes.
For any public or production use, move all secrets into environment variables and remove them from the code.
python app.pyBy default the app runs at: http://127.0.0.1:5000/
http://127.0.0.1:5000/– Landing pagehttp://127.0.0.1:5000/signup– Create accounthttp://127.0.0.1:5000/login– Loginhttp://127.0.0.1:5000/dashboard– Main dashboard (requires login)
-
Auth flow
- Sign up with a new email
- Verify the email using the received link
- Log in and log out
- Test the password reset flow
-
Dashboard & scoring
- Log in and open
/dashboard - Score different tickers via
/score?ticker=<SYMBOL> - Confirm:
- Score is shown and changes with ticker
- Feature importance, price/MAs, and sentiment plots render
- Explanation text is consistent with the plots
- Log in and open
-
Events & peers
/events– verify events list and sentiment counts/peer?symbol=AAPL– check peer list, peer scores, and comparison chart
-
Glossary
/glossary– verify financial terms are shown and linked from UI
Use Postman, Insomnia, or curl:
# Score API
curl http://127.0.0.1:5000/api/score/AAPL
# Events API
curl http://127.0.0.1:5000/api/events
# Score history
curl http://127.0.0.1:5000/api/score_history/AAPL
# Price forecast
curl "http://127.0.0.1:5000/api/price_forecast?ticker=AAPL&window=30&days=5"Check that JSON responses have the expected structure and values.
You can write unit tests (e.g. with pytest) around:
data_pipeline.ingest.fetch_yahoo_financedata_pipeline.preprocess.clean_financial_dataandfeature_engineeringscoring_engine.model.CreditScoringModel- Forecast helpers and
utils.explain.make_plain_language_explanation