Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Workflow:AI4Finance Foundation FinRobot DDM Valuation

From Leeroopedia
Knowledge Sources
Domains Valuation, DDM, Financial_Analysis
Last Updated 2026-10-18 00:00 GMT

Overview

End-to-end process for valuing a dividend-paying company (banks, utilities, insurers) via a deterministic dividend discount model (DDM) seeded from provider dividend, payout, and ROE data.

Description

This workflow runs the standalone DDM pipeline, used when free cash flow is not a meaningful valuation metric (banks, utilities, dividend-paying stocks). The pipeline seeds every DDM assumption from the company's own filings — dividend per share, payout ratio, ROE, beta, book value — computes the equity value per share deterministically, and hands the result to an LLM that only narrates the valuation thesis.

  • Goal: A per-share intrinsic value based on projected dividends discounted at the cost of equity.
  • Scope: From a financial snapshot through deterministic DDM inputs, base-case + sensitivity compute, and an LLM-narrated output.
  • Strategy: `seed_ddm_inputs` derives every parameter from provider data; `calculate_ddm` computes the valuation; the LLM explains, never selects.

Usage

Execute this workflow for banks, utilities, and dividend-paying stocks where traditional free cash flow is not meaningful. The `finrobot dcf` CLI command auto-detects banks via industry/sector and routes to this pipeline; `finrobot ddm` invokes it directly.

  • Input State: A valid public ticker symbol for a dividend-paying company (typically a bank, utility, or REIT).
  • Desired Output: An implied per-share equity value, a cost-of-equity/terminal-growth sensitivity table, and a narrative valuation thesis.

Execution Steps

Step 1: Historical Data

Fetch the financial snapshot and price for the ticker. The data layer pulls financials and price from the primary provider (FMP) with failover to yfinance. The executor produces a validated FinancialData object, with dividend-specific fields (DPS, payout, ROE, BVPS) read from the canonical normalized financials snapshot.

Key considerations:

  • This step is critical — the DDM seed reads this FinancialData, so a validation failure aborts the pipeline.
  • Foreign issuers are FX-normalized to canonical USD so a reporting-currency dividend never mixes with a USD quote price.
  • Book value per share is reconciled to the per-ADR price basis before seeding the P/B distortion guard.

Step 2: DDM Parameter Seeding

Derive every DDM input deterministically from the company's provider data. The executor calls `seed_ddm_inputs` to build a `DDMInputs` object: dividend per share from the snapshot, payout ratio from reported figures, ROE from net income/equity, beta from the market data, cost of equity via CAPM, and terminal growth from the textbook sustainable rate g = ROE×(1−payout). For buyback-distorted franchises (high P/B), the seed grows dividends at the issuer's own DPS CAGR instead of the book-based rate.

Key considerations:

  • No LLM call — the executor is deterministic.
  • Non-life insurers (P&C, diversified, reinsurance) degrade at source: their underwriting-cycle ROE and buyback-driven low payout make the DDM structurally unreliable, so the pipeline degrades to P/B comps with a machine-readable reason.
  • Declared dividend history is fetched best-effort to correct buyback-distorted growth estimates.

Step 3: DDM Calculation

Compute the DDM base case and sensitivity grid deterministically. The executor runs `calculate_ddm` to produce the equity value per share, upside/downside vs current price, and cost of equity. It then builds a cost-of-equity×terminal-growth sensitivity table via `calculate_ddm_sensitivity`. If the upstream seed degraded (non-life insurer), this step passes through the not-applicable state with a structured None.

Key considerations:

  • Pure compute — no LLM, no I/O beyond the cached seed.
  • The sensitivity range is extracted from the grid for the narrative summary.

Step 4: Narrative Output

The report agent writes a natural-language valuation thesis interpreting the DDM result. The LLM receives the computed equity value, cost of equity, terminal growth, sensitivity range, and upside/downside as context, and articulates the investment thesis — it does not select any number.

Key considerations:

  • The LLM only narrates; every figure it cites was computed by code.
  • The validator ensures the output is non-empty and structured.

Execution Diagram