A Recommendation the Advisor Can Trace
How we built WIA, a mutual-fund advisory workspace where the numbers are finished before the writing starts.
The hour that used to disappear
An advisor sits down with one client. The file has a risk profile, a few goals, and a list of mutual funds bought over the years. The question is ordinary and hard: what should stay, what should go, and is there a sensible new fund for the goal that is still short?
The usual way through that hour is a stack of factsheets, a spreadsheet of returns copied on different dates, and a note written from memory. Two people can describe the same fund with two different Sharpe ratios, because they took the number from two different pages. The client’s horizon gets mixed up with last year’s return. A sector fund and a flexi-cap fund get discussed as if they were the same kind of decision.
WIA is the workspace we built for that hour. It is an advisor tool: one signed-in advisor, one client at a time, and a recommendation that can be opened later and still show where every number came from.
The idea: three parts, kept apart on purpose
1. The client. Who they are, what they already hold, which goal each holding belongs to, how much they can add, and how long each goal has. This comes from the advisor: an uploaded workbook, then the SIP, lump sum and goal details entered on the wealth context page. A blank amount stays blank. We never treat a missing SIP as zero.
2. The market. Net asset values, total-return indexes, expense ratios, exit loads, riskometers, and the stocks inside each scheme. These come from official publications, and the ratios are calculated inside the app from those publications. The same fund, on the same day, gets the same Sharpe ratio for every advisor.
3. The writing. A language model reads the packet we prepared and writes the actions and the reasons. It does not fetch a factsheet of its own, and it does not invent a return. When the writing is done, the advisor accepts it, changes it, or rejects it. That decision is stored beside the recommendation and never quietly rewrites the text.
The point is a recommendation the advisor can stand behind, because the arithmetic was finished before the sentences were written.
What the advisor actually does
Sign in. The client book on the screen belongs to that advisor. A new account starts empty and fills up only as the advisor uploads clients. Two advisors can work in the same installation without seeing each other’s books.
Upload. An Excel workbook of client profiles goes into the database: the person, the risk profile, the goals, the accounts and the holdings.
Wealth context. This page shows the portfolio value, the equity mix, each goal’s target and shortfall, and the monthly SIP and lump sum on record. It does not call the model. It is simply the picture of the client.
Choose the rules. Each advisor keeps a default set of recommendation rules on their profile, and every client starts from those defaults, so nobody ticks the same list twenty times a day. For a single client, Change criteria reopens the list. Those ticks apply only to that recommendation, and the profile stays as it was.
Read the notes when you want to. Things that would otherwise pile up on the page, such as a missing SIP or a goal without its own risk level, sit in one collapsed list. They don’t stop a hold or an exit from being prepared.
Review. The recommendation page asks for a result, or shows the one already saved. The last step is the advisor’s: accept, modify or reject, with an optional note. There is one current decision per client.
What goes into the packet
When the advisor asks for a recommendation, Python builds one packet from rows already stored. The model sees that packet and nothing else.
- Profile: age, family, risk, the affordable SIP, the affordable lump sum, and how the goals are framed.
- Portfolio: its value, its equity share, and whether that share sits inside the band for the stated risk: conservative 20–40% equity, moderate 40–65%, aggressive 65–90%.
- Goals: label, type, horizon, target, what is already saved toward it, and the schemes tagged to it.
Horizons are short (three years or less), medium (four to seven) and long (eight or more). Horizon is meant to weigh more than the risk label. A three-year goal and a nineteen-year goal are different decisions, even when the client’s overall profile is aggressive.
Only the rules the advisor has ticked travel with the packet. An unticked rule is not a silent instruction.
Which funds are allowed in the conversation
The model is not handed every scheme in India. It gets a short list we have already filtered.
The first filter: eligibility.
- A new idea must be a Direct Growth plan, in equity or hybrid, with at least three years of history. Direct Growth is the plan without a distribution commission, which is the right shelf when the advisor is paid a fee rather than a trail.
- A scheme the client already holds, matched by name, is removed. We don’t suggest buying again what is already in the account.
- If every goal is short or medium, the list narrows to categories that fit those horizons. One long goal, or a goal with no horizon yet, keeps the category list open.
- What remains is sorted by three-year CAGR, highest first, and capped at 80 names. Three-year growth is a rank, not a promise. It decides who is shown to the model, not what the client should buy.
The second filter: funds that are quietly the same portfolio.
Each month we store the equity stocks in each scheme, and the percent of the scheme each stock represents, from the AMC’s own portfolio disclosure. When 80% or more of a fund sits in the same stocks as a fund already on the list, or one the client already holds, the later fund is skipped and the one with the higher three-year CAGR stays. A fund whose stocks we haven’t stored yet is kept, because an unknown overlap is not a reason to throw it out.
Get Abhijeet Lokhande’s stories in your inbox
Join Medium for free to get updates from this writer.
Two funds tracking the same index will usually cross that line. Two aggressive hybrids that own the same shares can stay under it, because the percent is of the whole scheme, and the debt portion doesn’t count as stock overlap.
Where every number comes from
The ratios on a fund card are calculated in WIA, not copied from a factsheet. A missing input is shown as not available. It is never filled in with a guess.
NAVs. Daily NAVs come from AMFI’s NAV file, with history filled in from MFAPI, which mirrors those NAVs.
Sharpe and Sortino. These use the last 36 complete months of monthly returns and the 91-day Treasury bill yield. That yield is entered manually, not downloaded. If no current yield has been stored, the calculation falls back to a 6.5% placeholder, and the app says so.
Alpha, beta and information ratio. These need a total-return index beside the fund. We store the NSE series: Nifty 50, Nifty 100, Nifty 500, Nifty 500 Multicap 50:25:25, Nifty LargeMidcap 250, Nifty Midcap 150 and Nifty Smallcap 250.
- When AMFI’s own benchmark sentence names one of those, that series is used, and the card says so.
- When AMFI names a BSE index we don’t store, the card keeps AMFI’s words and the calculation uses the paired Nifty series.
- When the benchmark is an international or thematic index we don’t have, the card still shows AMFI’s sentence, and an equity fund may be compared with the Nifty 500. That comparison is labelled approximate.
Returns and risk. CAGR is point to point from the NAV, over three and five years. Rolling returns walk one-year windows through the last three years and report the average, the worst window, and how often the window was positive. Max drawdown is the largest peak-to-trough fall over five years, stored as a negative percent.
Costs and labels. The expense ratio is AMFI’s monthly total expense ratio, with Direct and Regular kept apart. Exit load and the SEBI riskometer come from AMFI’s scheme profile and fund-performance feed. A holding the client already owns is matched to the plan they actually hold, Regular or Direct. A new suggestion is always the Direct Growth plan. A name we can’t match to an AMFI scheme stays unmatched rather than borrowing someone else’s numbers.
Refresh cycle. The feeds refresh in the background while the API runs: shortly after startup, then about every six hours. NAV waits for the evening publication on weekdays. Expense ratios move forward from the 8th of each month, and stock holdings from the 12th, once that month’s portfolio files should be public. The recommendation request itself never calls AMFI or any search. It reads the database.
What the model is asked to write
The writer is Claude Sonnet 5.5, called through Anthropic’s API. The hard numbers are already in the packet. The model has the constrained job: choose, and explain the choice in terms of the client’s own goals.
- For every goal, it returns an action on every current holding (exit, hold or add more) with a fit percent and a reason.
- It may name new schemes, but only by scheme codes from the list of 80. Any code it wasn’t given is dropped before the page sees it.
- If the advisor ticked at most three, three new schemes is the cap. Otherwise it’s five. With skip held on, a scheme the client already owns is never offered again.
- A reason may use only figures that appear in the packet. A null measure means unknown, neither a bad score nor a good one. Alpha is compared only between funds measured against the same benchmark.
- If the fund list is empty, the model still returns actions on current holdings and suggests nothing new.
The request is refused in only three cases: there is no goal at all; the risk profile is missing and the portfolio mix can’t stand in for it; or the portfolio is too small for a scheme-by-scheme recommendation. Everything else, like a missing SIP or a goal that still needs its own risk, is shown as a note, and exit and hold actions can still be prepared.
The advisor keeps the last word
What comes back is a proposal. Accept, modify or reject is a separate record, with an optional note. Opening the page the next day loads the saved proposal. It doesn’t call the model again or recalculate the market in front of the advisor.
That separation is the product:
- The client data belongs to the advisor who uploaded it.
- The market data belongs to the publications it was taken from.
- The sentences belong to a model that was not allowed to go looking for a better story.
- The decision belongs to the person whose name is on the advice.
Still in progress
WIA is still being built, and accuracy is where most of the remaining work goes. The app is designed to say when something is uncertain rather than hide it, and those labelled gaps are exactly what we’re working to close:
- Benchmarks. Funds measured against a BSE, international or thematic index are currently compared with the nearest Nifty series, and labelled as approximate. Widening the set of stored indexes will make alpha, beta and information ratio exact for more funds.
- The risk-free rate. The Treasury bill yield is entered by hand, with a 6.5% placeholder when it’s missing. That input is a candidate to make more reliable.
- Scheme matching. Holdings whose names can’t be matched to an AMFI scheme stay unmatched instead of being guessed. Better matching means more holdings with full numbers.
- Portfolio overlap. Funds whose stock holdings haven’t been stored yet are kept by default. As that data fills in, the duplicate-fund filter becomes more complete.
The principle won’t change as these improve: a number WIA cannot source is shown as unknown, never estimated.
Who this is for
WIA is for an advisor who already has the client relationship and wants the preparation done the same way every time.
It is not a storefront where a client logs in and buys a fund. It doesn’t replace a risk questionnaire, a tax check before an exit, or the conversation about whether a goal’s risk really matches the client’s. It makes that conversation start from one sourced page instead of a folder of factsheets.
The idea behind the app fits in one line: “Finish the numbers first. Then write. Then let the advisor decide.”






