A forecastis a range.

AI Portfolio Advisor ranks 60 NSE large caps for your risk profile and shows the evidence behind every call. Each one comes with a pessimistic, a median and an optimistic outlook for the next 21 trading days, so you see how unsure the model is.

Illustrative schematic. Not a forecast for any stock, and not a result. Each bar is one trading day. The thin lines are paths the price could take.
60NSE large caps, five from each of 12 sectors
21trading days ahead, for every forecast
3cases per stock: pessimistic, median, optimistic
82.4%of real outcomes on unseen data landed inside the range. The target was 80%.

You state your limits. It returns a ranked book.

Tell it your risk profile, your capital and the limits you will not cross. It scores every stock on four kinds of evidence and marks each one with one of four calls. Change the profile and the same stocks get different answers.

Try a risk profile
Illustrative schematic. Six made-up stocks with made-up scores, to show how the book reads. No real company or result. Select a row to see the evidence behind its call.
STRONG BUY

The pillars agree and every limit you set is cleared with room to spare.

BUY

Enough evidence, and inside your limits for volatility, drawdown and position size.

WATCH

Close, but something holds it back. It stays visible with the reason, so a near miss is never dressed up as a pick.

PASS

Not enough evidence for this profile. If nothing qualifies, the book says so.

Four kinds of evidence, each one on show.

A single score hides disagreement. Here the four pillars sit side by side for every stock, and you can watch them add up to the call.

70of 100
STRONG BUY
Illustrative schematic. One made-up stock under the Moderate profile, which weighs the four pillars equally.
  • Technical

    What the price has been doing. Momentum, trend and how jumpy the stock is. Strong momentum adds to the score; high volatility takes away from it.

  • Fundamental

    What the business looks like. Valuation, profitability, debt, margins, dividends and growth, each compared with the other stocks in the universe.

    Built from today's ratios only, so it stays out of the trained model. It is a separate score, and it is not part of the validated forecast.
  • Model forecast

    What the model expects. Three forecasts for the next 21 trading days: a pessimistic case (P10), a median (P50) and an optimistic case (P90). A wide gap means low confidence.

  • Portfolio fit

    What it does to your book. Recent volatility, worst fall, and how closely the stock moves with what you would already hold.

Then it sizes each position, and shows the cash left over.

Sizing uses Hierarchical Risk Parity. Stocks that move together are grouped, and risk is shared between groups before it is shared within them, so three similar bank stocks do not quietly become half your portfolio.

  1. Group the chosen stocks by how alike their price moves are.
  2. Split capital down the tree, group by group.
  3. Cap any position that exceeds your profile's limit.
  4. Round to whole shares at your capital.
  5. Show the cash that could not be placed, instead of hiding it.
Risk profile
Your capital, 100%
Stock A
Stock B
Stock D
Stock E
Stock F
Stock C
Cash
position cap
Illustrative schematic. Branch thickness is the share of capital flowing down it.

Ask why, and get an answer per stock.

Every stock page lists the inputs that pushed its forecast up or down, and by how much. If a call rests on one noisy signal, you can see that before you act on it.

The method is SHAP, a standard way to attribute a model's output to its inputs. It starts from the average forecast and adds each input's push until it reaches this stock's number.

Median forecast for one stock,
21 trading days ahead
+1.1%
Pulls the forecast downPushes it up
Illustrative schematic. The input names are real model features; the amounts are made up.

Tested on data the model never saw.

The model is tuned by walking forward through history five times. Each fold trains on the past and is judged on the block that follows, and the training window grows each time. Because every label looks 21 trading days ahead, 31 trading days are cut out before each test block so nothing leaks backwards.

Then a final stretch that was never used for tuning or feature selection decides the numbers below.

Purged walk-forward validation, drawn to the real dates

Train 31 trading days removed Validate Final hold-out Latest days, outcome not known yet
82.4%

of real 21-day outcomes in the hold-out landed inside the P10 to P90 range. A well-calibrated range would hold 80%.

How to read it. Each dot stands for 1% of hold-out stock-days. The count inside the band is the measured rate; where each dot sits is illustrative.

The range held up.The stock-picking did not.

A simple backtest that held the five highest forecasts did not beat holding every stock equally.

So this is a tool for calibrated ranges, visible evidence and sizing discipline. It is not a way to beat the market, and it does not claim to be.

Figures for the current model are published on the Validation page of the app. These are backtest measurements on past data. They are not live performance and they do not predict or promise future returns. This is a research and education tool, not investment advice.

A plan for getting in, in stages.

The portfolio page lays out a staged schedule for building the positions instead of one large order. It is a plan for you to read and adapt. The product sends nothing to a broker.

Live NSE prices, kept apart from the forecast.

Connect an Upstox or Zerodha market feed and live quotes appear as an overlay. The daily forecast is not quietly recalculated on every tick. If live price action weakens a BUY to a WATCH, the page tells you the change came from the live layer, and shows the feed's status and last tick.

Under the hood

For the examiners. Built for the course AI and ML for Digital Business Managers as a capstone, in Python end to end. Eight steps take daily prices to a sized, explained book.

60 NSE large caps, 12 sectors

Five liquid large caps from each of 12 sectors. Daily adjusted prices and volume from Yahoo Finance, 19 Feb 2018 to 8 Oct 2026. The target is each stock's return over the next 21 trading days.

A known gap: the universe is today's large caps, so companies that failed or shrank earlier are missing. That flatters any backtest.

60stocks
12sectors, 5 each
118,641stock-days

Run it yourself

One command trains everything from a data snapshot committed to the repository, in about a minute. It writes one artifact; the app reads it and refuses to produce recommendations if it is missing or malformed.

Streamlit interface, optional FastAPI service, LightGBM, SHAP and scikit-learn. 22 tests.

pip install -r requirements.txt python -m src.model # train, validate, export streamlit run app.py

What this is not.

It is a research and education tool. Use it to study how evidence, uncertainty and sizing fit together, then make your own decisions.

View the deck

  • It does not beat the market. In the hold-out backtest, its top five picks did worse than holding every stock equally.
  • It places no trades. There is no broker connection for orders. Nothing is bought or sold.
  • It is not a registered investment adviser. Nothing here is personal investment advice.
  • It promises no returns. A forecast is an estimate with a range, and the real outcome can fall outside it.
  • A backtest is not a track record. Validation figures describe past data only.
  • It is a capstone, not a production system. Real use would still need taxes and market impact, point-in-time fundamentals, paper trading and an independent review.