name: equity-fundamental-data
description: Use to look up the exact path or spelling of any Morningstar fundamental data point on a QuantConnect/LEAN Fundamental object f — every field under pyf.financial_statements.*csf.FinancialStatements.* (income statement, balance sheet, cash flow statement), the operation / valuation / earning ratios, earning reports, company profile, company & security reference, and asset classification — plus the Morningstar sector and industry classification code constants. Triggers — a missing-attribute / compile error on a Fundamental property path; questions like "what's the path to net income / operating cash flow / shares outstanding / PE ratio / sector code". Skip when — you need how to build or screen a universe (see the fundamental-universes skill).
Fundamental data-point attributes — QuantConnect / LEAN
Every readable Morningstar data point on a Fundamental object, written as a full path from the snapshot f with its description. Copy the path you need rather than guessing from English names — a wrong path wastes a backtest run. Get f from an pyadd_universe(...)csAddUniverse(...) selection callback (each element is a Fundamental), from pyself.securities["SPY"].fundamentalscsSecurities["SPY"].Fundamentals, or from a history request.
Reading the paths
- A path ending in
.[value 1M 2M 3M 6M 9M 12M]is aMultiPeriodField— append one period accessor to read the number. py.valuecs.Valueis the most recent reported period; the1M–12Mtokens are py.one_month .two_months .three_months .six_months .nine_months .twelve_monthscs.OneMonth .TwoMonths .ThreeMonths .SixMonths .NineMonths .TwelveMonthsrespectively (trailing-twelve-month at12M). e.g. pyf.financial_statements.income_statement.net_income.twelve_monthscsf.FinancialStatements.IncomeStatement.NetIncome.TwelveMonths. Forgetting the accessor is silent — the wrapper compares as truthy and numeric inequalities give nonsense. - A path with no bracket is read directly. e.g. py
f.valuation_ratios.pe_ratiocsf.ValuationRatios.PERatio. - The integer
*_codefields underasset_classificationcompare against the named constants in the Classification code constants section at the end, e.g. pyf.asset_classification.morningstar_sector_code == MorningstarSectorCode.TECHNOLOGYcsf.AssetClassification.MorningstarSectorCode == MorningstarSectorCode.Technology.