Applied AI and Machine Learning Capstone
AI and ML for Digital Business Managers

AI Portfolio Advisor

A forecast
is a range.

A stock tip is one number. What happens next is a range. We forecast that range for 60 NSE stocks, 21 trading days ahead.

  1. 5 minExecutive pitch
  2. 10 minTechnical deep dive
  3. LiveDemo

Group 5
B Gokul Vaigundh · DBM/1015/03
Balaji G · DBM/1016/03
Shashaanth NC · DBM/1070/03

Executive pitch

Advisers get a tip. They need the range, the reason and the size.

Who it is for

An independent wealth adviser or self-directed investor in India who reviews a portfolio every month.

What they have today

  • Tips and single-number targets
  • No view of the range of outcomes
  • No link to the client's risk tolerance

Adviser enters

Risk profile Capital

Four evidence pillars

Technical score Fundamental score Model forecast Risk fit

Weighted by the client's profile

For every stock, the adviser gets

SignalSTRONG BUYBUYWATCHPASS
RangePessimistic, median and optimistic 21-day return
SizeHierarchical Risk Parity, a position cap, whole shares
ReasonSHAP drivers for that stock

Executive pitch

467 adviser hours back each year: a 483% return on cost.

Stated assumptionWhat follows
200 clients×4 reviews a year
800reviews a year
×45 down to 10 minutes each
467adviser hours saved
×Rs 1,500 an adviser hour
Rs 7.0 lakhof adviser time a year
againstRs 1.2 lakh running cost a year
483%return on cost

Route to market

FreeResearch tool for self-directed investors
Paid seatAdvisers who need client-ready evidence sheets
ChannelBrokers, through the Upstox and Zerodha quote adapters already built

Not claimed: extra return

On unseen data the top-5 picks returned −4.4% a year against +3.3% for holding every stock. We sell speed, discipline and honest ranges.

Technical deep dive

From raw prices to the app, with leakage designed out.

  1. PricesYahoo Finance, daily
  2. Features19 candidates
  3. Selection10 kept
  4. Walk-forward CV5 folds, purged
  5. Quantile modelsP10, P50, P90
  6. Artifactartifacts.pkl
  7. AppStreamlit, FastAPI
src/data.py src/model.py app.py

Data

60liquid NSE large caps, five in each of 12 sectors
118,641stock-days of daily prices, Feb 2018 to Oct 2026
21 daysahead: the return the model is asked to forecast

Feature selection score = relevance − 0.5 × redundancy

10 of 19 kept. RSI, stochastic %K and Williams %R track the same thing, so one stays.

Fundamentals left out of the model. Only today's ratios exist, so using them on past dates would leak the future.

Technical deep dive

Tuning beat the notebook by 9.2%, and only tied the naive baseline.

Purged walk-forward cross-validation: five expanding folds

Cross-validated pinball loss lower is better

375model fits: 25 settings × 5 folds × 3 quantiles
−9.2%pinball loss against the notebook settings
+0.5%against naive: a tie, inside fold-to-fold variation

The search chose 4 leaves and 100 trees. With a weak signal, bigger trees fit noise.

Technical deep dive

Honest ranges. No market-beating picks.

Unseen data: outcomes inside the P10 to P90 range

0.01880pinball loss, naive 0.01915
+0.046rank IC, positive on 56% of 407 days
51.0%direction right

Backtest on the same unseen period

−4.4% a yearTop-5 picks
+3.3% a yearAll 60 stocks, equal weight

Median of 21 start days, after costs. Picks won from 24% of them.

What drives a forecast (SHAP)

Where it is wrong

Direction right 31.1% when the market fell, 64.6% when it rose.

Limits

  • 21-day returns are mostly noise
  • 60 of today's large caps: survivorship bias
  • No taxes or slippage beyond a flat cost

Next: point-in-time fundamentals, a larger universe, paper trading.

Demo

Live demo

  1. Profile intakerisk and capital
  2. Ranked booksignal and range
  3. Stock researchSHAP for one stock
  4. Portfolio labposition sizes
  5. Model reportthe numbers shown here
22automated tests
1 commandretrains the model in about a minute
Built with Claude Codeprompts, failures and fixes are in docs/VIBE_CODING_LOG.md. The team owns and defends the method.

Group 5
B Gokul Vaigundh · DBM/1015/03
Balaji G · DBM/1016/03
Shashaanth NC · DBM/1070/03

← → to move   O overview   F fullscreen