Implementation:AI4Finance Foundation FinRobot seed ddm inputs
| Knowledge Sources | |
|---|---|
| Domains | Finance, Valuation, Data_Extraction |
| Last Updated | 2026-10-18 00:00 GMT |
Overview
Concrete tool for deterministically seeding all DDM input assumptions from reported dividends, payout, ROE, and beta, provided by the FinRobot compute layer.
Description
The seed_ddm_inputs function is the single authoritative builder of DDMInputs in the codebase. It deterministically derives every DDM assumption from the provider's reported dividend, payout, ROE, and beta — never letting the LLM "pick" a growth rate. Dividend growth uses the textbook sustainable-growth formula decayed to perpetuity, except for buyback-distorted franchises (high P/B) where the declared-DPS CAGR is the honest growth base.
It normalizes the terminal payout to so the Gordon perpetuity does not carry a low trailing payout forever — the error that values JPM at a third of its price. Provenance is recorded for each assumption.
Usage
- DDM_Valuation workflow (Step 2): Called after the financial data step to build DDMInputs from FinancialData + NormalizedFinancials.
- Equity_Research workflow (Step 4): Produces the DDM inputs for the DDM branch of the valuation synthesis.
- Import this when you need a typed, provenance-tracked DDMInputs for a bank, utility, or dividend-paying stock. Pass dividend_history (annual DPS map) for buyback-distorted franchises.
Code Reference
Source Location
- Repository: FinRobot
- File: finrobot_desktop/finrobot/engine/compute/operators/ddm_seed.py
Signature
def seed_ddm_inputs(
financials: FinancialData,
normalized: NormalizedFinancials,
*,
dividend_history: dict[str, float] | None = None,
risk_free_rate: float = DEFAULT_RISK_FREE_RATE, # ~0.043
equity_risk_premium: float = DEFAULT_EQUITY_RISK_PREMIUM, # ~0.0423
terminal_growth_rate: float = DEFAULT_TERMINAL_GROWTH, # ~0.03
projection_years: int = DEFAULT_PROJECTION_YEARS, # 10
) -> DDMInputs:
"""Build a complete DDMInputs from one ticker's snapshot.
Args:
financials: Validated market fields (shares, price, beta, net income).
normalized: Dividend-specific fields (DPS, payout, ROE, book value)
that FinancialData does not carry.
dividend_history: Optional {"YYYY": total_dps} map for the declared-DPS
CAGR used as growth base for buyback-distorted franchises (P/B > 4).
None => growth stays on g = ROE × (1 - payout).
Returns:
DDMInputs ready to pass to calculate_ddm.
Raises:
ValueError: when no positive dividend can be established (DDM
inapplicable to a non-dividend-payer).
"""
Import
from finrobot.engine.compute.operators.ddm_seed import seed_ddm_inputs
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| financials | FinancialData | Yes | Market fields: shares, price, beta, net income, industry |
| normalized | NormalizedFinancials | Yes | Dividend fields: DPS, payout, ROE, book value, dividend yield |
| dividend_history | dict[str, float] | No | Annual DPS map {"YYYY": total_dps} for buyback-distorted CAGR |
| risk_free_rate | float | No | 10Y Treasury yield (default ~0.043) |
| equity_risk_premium | float | No | Market risk premium (default ~0.0423) |
| terminal_growth_rate | float | No | Perpetuity growth (default ~0.03) |
| projection_years | int | No Explicit forecast horizon (default 10) |
Outputs
| Name | Type | Description |
|---|---|---|
| DDMInputs | DDMInputs | dividend_per_share, payout_ratio, dividend_growth_rates, terminal_payout_ratio, return_on_equity, beta, risk_free_rate, equity_risk_premium, terminal_growth_rate, current_price, assumption_provenance |
Usage Examples
Bank DDM Seeding
from finrobot.engine.compute.operators.ddm_seed import seed_ddm_inputs
ddm_inputs = seed_ddm_inputs(
financials=financial_data,
normalized=normalized_financials,
# dividend_history omitted: bank with reasonable P/B uses g = ROE × (1 - payout)
)
print(f"DPS: ${ddm_inputs.dividend_per_share:.2f}")
print(f"Growth rates: {ddm_inputs.dividend_growth_rates}")
print(f"Terminal payout: {ddm_inputs.terminal_payout_ratio:.1%}")
Buyback-Distorted Franchise
# KO: high P/B → use declared-DPS CAGR instead of ROE × (1 - payout)
annual_dps = {"2021": 1.64, "2022": 1.76, "2023": 1.82, "2024": 1.92}
ddm_inputs = seed_ddm_inputs(
financials=financial_data,
normalized=normalized_financials,
dividend_history=annual_dps,
)