Value a stock
A DCF from public fundamentals
- Connects
- Public fundamentalsMargin
- Writes
- Saves a forward projection against one stock
- Updated
- 17 September 2026 · 4 min read
The spreadsheet recipe assumes you already have a model. This one is for the first pass on a company you have just started looking at, where building a sheet before you know whether the business deserves one is the wrong order of work.
The mechanics are the same as the spreadsheet route, with Margin computing while the agent carries assumptions across and the save stores what came back. What changes is where the base year comes from and how the forward assumptions get set.
Reading the base year, setting the forward years
A company’s published financials give you the trailing twelve month figures the baseYear field wants: revenue, operating profit, other income, depreciation, interest, tax and EPS. An agent can read those off a fundamentals page and convert them to one consistent unit.
Nothing on that page tells you what the next ten years look like. Historic growth is the obvious anchor to reach for, and also the one to be careful with, since it is the reason a stock is priced the way it is and extrapolating it tends to reproduce the current price instead of testing it. Have the agent propose a small set of assumptions, say where each one came from, and let you move them before anything is saved.
Because POST /web/projection/dcf saves nothing and touches no account data, this can be a conversation. Three scenarios cost three calls and leave nothing behind in the account.
Say when a number could not be sourced
An agent reading a web page will sometimes not find depreciation, or will find a figure in millions on a page whose other rows are in crores. Instruct it to stop and say so. A skill that fills a gap with a plausible number produces a valuation that looks complete when it is not, and the fabricated input leaves no trace in the output.
A skill to start from
---
name: dcf-from-fundamentals
description: Build a DCF from a company's published fundamentals and save it as a
valuation on the matching stock in Margin (go.marginapp.in). Use when asked to
value a company from public financials rather than from a spreadsheet.
allowed-tools: Bash(bash *), Bash(jq *), Bash(curl *), AskUserQuestion, Read, Write, WebFetch
---
Read a company's fundamentals and save a forward DCF against the matching stock
in Margin. Same endpoints and save mechanics as the spreadsheet flow, different
source for the numbers.
Read `https://go.marginapp.in/llms.txt` before building any payload.
**Margin computes the DCF. This skill never does.** Do not compute revenue, PAT,
EPS, present values or intrinsic value.
## 1. Read the base year
Pull the trailing twelve month revenue, operating profit, other income,
depreciation, interest, tax and EPS. Convert everything to one unit, and check
EPS sits on the same basis as the profit figures.
**Never invent a figure.** If a number cannot be sourced from the page, say which
one and stop. Do not substitute a plausible value, and do not derive one from a
ratio unless the user asks for it.
Watch for mixed units on one page. A row in millions among rows in crores will
survive every later step and end up in the saved valuation.
## 2. Propose the forward assumptions
Offer a small set: revenue growth, operating margin, tax rate, cash conversion,
discount rate and the terminal pair. For each, say where it came from, whether
that is the company's own history, a sector norm, or a plain assumption.
Treat historic growth as an anchor and not an answer. Extrapolating it tends to
reproduce the current price instead of testing it, so put it to the user as one
scenario among several.
Terminal growth must be below the terminal discount rate. The two go together;
sending one without the other is a 400.
## 3. Compute, and iterate
POST /web/projection/dcf
Saves nothing and touches no account data, so run as many scenarios as the user
wants. Show intrinsic values, `terminalValuePercentage`, `price` and `priceAsOf`
each time.
## 4. Save only when asked
POST /web/stockOfInterest/track/{stockId}
POST /web/projection/stockOfInterest
A first pass often should not be saved at all. Ask instead of assuming the run
ends in a write.
Also under value a stock
Try it
You need a token to start
Create one in Margin under Settings, on the API Tokens tab. Tokens never expire and you can revoke any of them at any time.
Create an API token