Deterministic valuation

Valuation numbers that are computed, not predicted.

Most "AI valuation" tools ask a language model for a fair value and hand you back a token prediction that looks like a number. /v1/valuation runs discounted cash flow, weighted average cost of capital, and seeded Monte Carlo through a deterministic engine. Same inputs, same figure, every time.

  • 100,000 free Quan 3.4 L tokens
  • No card required
  • Missing inputs reported, never invented
two-stage-dcf.sh
curl https://stockup.cc/v1/valuation \
  -H "x-api-key: $STOCKUP_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "tool": "dcf",
    "inputs": {
      "freeCashFlow": 100,
      "growthRatePhase1": 0.10,
      "growthRatePhase2": 0.05,
      "terminalGrowthRate": 0.025,
      "discountRate": 0.10,
      "sharesOutstanding": 100,
      "netDebt": 50,
      "currentPrice": 10
    }
  }'
Returns a per-share value, an impliedUpside, and a five-row sensitivity table.
DeterministicArithmetic, not token prediction
SeededMonte Carlo reproduces exactly
Honest gapsunavailableInputs names them
AuditableEvery run has a decision record
One endpoint, three tools

Pick the tool with the tool field.

tool: "dcf"

Two-stage discounted cash flow

Required inputs are freeCashFlow, growthRatePhase1, growthRatePhase2, terminalGrowthRate, discountRate, and sharesOutstanding. Add netDebt to bridge enterprise to equity value and currentPrice to get impliedUpside back.

The response carries a five-row sensitivityTable, so you can show a range rather than a single false-precision figure.

tool: "wacc"

Weighted average cost of capital

Pass equityMarketCap, totalDebt, costOfEquity, costOfDebt, and taxRate. You get the blended rate back, which you can feed straight into a DCF call as discountRate instead of hard-coding 10%.

Chaining the two calls is the common pattern: derive the discount rate, then value against it.

tool: "monte_carlo"

Seeded geometric Brownian motion

Required: initialValue, expectedReturn, volatility, and horizon in years. Optional monthlyContribution models ongoing deposits, and simulations accepts 100–50,000 with a default of 10,000.

seed defaults to 34. Hold it fixed and the distribution is byte-identical across runs — which is what makes the output testable.

The part most APIs get wrong

A missing input is an error, not a guess.

If you call a chat model for a DCF and forget the discount rate, it will quietly pick one. You will never know which, and the number you ship to a user will be unfalsifiable.

This endpoint refuses. Omit a required field and you get status: "insufficient_data" plus an unavailableInputs array naming precisely what it needs. No silent defaults, no interpolation, no plausible-looking placeholder.

That is the behaviour you want behind a product feature, because it converts a hidden accuracy bug into a handled error path.

insufficient-data.json
// request omitted discountRate
{
  "status": "insufficient_data",
  "unavailableInputs": [
    "discountRate",
    "terminalGrowthRate"
  ]
}
Handle this branch and your valuation feature cannot silently fabricate.
Chaining WACC into DCF

Derive the discount rate first.

wacc-then-dcf.js
const call = (body) =>
  fetch("https://stockup.cc/v1/valuation", {
    method: "POST",
    headers: {
      "x-api-key": process.env.STOCKUP_API_KEY,
      "content-type": "application/json"
    },
    body: JSON.stringify(body)
  }).then((r) => r.json());

// 1. Derive the cost of capital from the capital structure.
const { wacc } = await call({
  tool: "wacc",
  inputs: {
    equityMarketCap: 80,
    totalDebt: 20,
    costOfEquity: 0.10,
    costOfDebt: 0.05,
    taxRate: 0.20
  }
});

// 2. Value against the rate you just derived, not a hard-coded one.
const valuation = await call({
  tool: "dcf",
  inputs: {
    freeCashFlow: 100,
    growthRatePhase1: 0.10,
    growthRatePhase2: 0.05,
    terminalGrowthRate: 0.025,
    discountRate: wacc,
    sharesOutstanding: 100,
    netDebt: 20,
    currentPrice: 10
  }
});

if (valuation.status === "insufficient_data") {
  throw new Error(`Missing: ${valuation.unavailableInputs.join(", ")}`);
}
Both calls authenticate with the same key. Authorization: Bearer works if you prefer it to x-api-key.
Why deterministic matters downstream

You can test it, and you can defend it.

It fits in CI. A seeded Monte Carlo and a pure-arithmetic DCF both produce fixed expected values, so a valuation regression is a normal assertion rather than a fuzzy eyeball check.
It survives review. Quantitative runs return a decision record you can retrieve later through the /v1/audit endpoint, including a release fingerprint identifying the engine version that produced the figure.
It caches cleanly. Identical inputs give identical output, so you can memoise aggressively instead of paying for the same computation twice.
It separates the number from the narrative. Compute here, then optionally pass the result into a Quan model for the write-up. The prose never gets to change the arithmetic.
Valuation FAQ

Specifics worth knowing.

Does the API fetch financial statements for me?

No. /v1/valuation is a calculation endpoint and values whatever inputs you supply. If you want figures pulled from filings first, upload the document through the documents API or ask a Quan model to read the filing, then pass the extracted numbers here.

What does the sensitivity table vary?

The DCF response includes a five-row table so a single point estimate is never the only thing you can display. Surfacing the range is strongly recommended — a lone fair-value number reads as far more certain than any DCF deserves.

Can I change the number of simulations?

Yes, via simulations. Values are clamped to between 100 and 50,000, defaulting to 10,000. Higher counts cost more wall-clock time and produce diminishing changes to the percentile bands.

Is this investment advice?

No. This is research and educational software. A DCF is a model conditioned on the assumptions you feed it, not a forecast, and nothing returned by this endpoint is personalized advice. See the risk disclaimer.

How is this billed?

Quantitative endpoints draw on your prepaid balance. Model-backed work starts at $0.50 per million input tokens on Quan 3.4 L; see pricing for the full table and the estimator.

Deterministic by default

Ship a valuation feature you can actually unit-test.

Start with 100,000 free Quan 3.4 L tokens and no card. Add prepaid balance only when you outgrow it.

Create a free API key →