Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.18 KB

File metadata and controls

69 lines (48 loc) · 2.18 KB

INTVAL-Calc

Comparative Assessment of Traditional, AI and Hybrid Intrinsic Value Estimation Models in the Indian Equity Market.

Implementation of Technical Specification v1.0.

What it does

Estimates the intrinsic value of Indian listed equities using seven methods and compares them:

Family Methods
Traditional DCF, P/E Relative, EV/EBITDA
Machine learning LASSO, Random Forest, XGBoost
Hybrid Ridge stacking over out-of-fold predictions

Evaluation sample: 15 companies across 5 sectors and 3 market-cap tiers, FY2020-21 to FY2025-26. Training universe: NIFTY 500 excluding financials and the 15 held-out evaluation companies.

Stack

Backend: FastAPI, Celery, Redis, Postgres, SQLAlchemy, Alembic ML: scikit-learn, XGBoost, SHAP Frontend: React 18, TypeScript, Vite, Tailwind

Setup (Windows)

Prerequisites: Python 3.12, Node 22, Docker Desktop, Git.

.\tasks.ps1 setup     # venv + dependencies
.\tasks.ps1 up        # Postgres + Redis
.\tasks.ps1 migrate   # create tables
.\tasks.ps1 check     # verify config and Yahoo connectivity
.\tasks.ps1 test      # run the test suite

Run .\tasks.ps1 help for all commands.

All Python commands run from backend/. Alembic and pytest resolve paths relative to the working directory, so running them from the repo root fails.

Loading data

.\tasks.ps1 seed      # the 15 evaluation companies
.\tasks.ps1 rates     # G-Sec yields + index returns

data/reference/gsec_5y.csv must be filled in by hand first — see the docstring in backend/scripts/backfill_rates.py.

The rule that matters most

FY_t fundamentals may only be joined to market data on or after period_end + 90 days. Every join passes through app/ingestion/guards.py.

Violating it invalidates every result, silently, while producing better-looking metrics than the honest version. See specification §5.3.

Reproducibility

  • requirements.lock.txt pins the exact environment results were produced in
  • valuations.inputs stores every intermediate value per method
  • financials.source_map records which source supplied each field
  • Unusable rows are flagged, never deleted — attrition is a reported result