Crate paft_fundamentals

Crate paft_fundamentals 

Source
Expand description

Fundamentals types for financial statements, analysis, holders, and ESG.

Provider-agnostic, strongly-typed models for company/fund profiles, ownership, analyst coverage, and financial statements used across the paft ecosystem. Types prefer canonical string forms for serde/display and validated builders where appropriate.

§Quickstart

use paft_fundamentals::{Earnings, EarningsYear, Profile, CompanyProfile};

let earnings = Earnings {
    yearly: vec![EarningsYear { year: 2023, revenue: None, earnings: None }],
    quarterly: vec![],
    quarterly_eps: vec![],
};
assert_eq!(earnings.yearly[0].year, 2023);

let profile = Profile::Company(CompanyProfile {
    name: "Example Corp".to_string(),
    sector: Some("Technology".to_string()),
    industry: None,
    website: None,
    address: None,
    summary: None,
    isin: None,
});
match profile {
    Profile::Company(c) => assert_eq!(c.name, "Example Corp"),
    _ => unreachable!(),
}

§Feature flags

  • rust-decimal (default): paft-money uses rust-decimal
  • bigdecimal: paft-money uses bigdecimal
  • dataframe: enable polars/df-derive integration for dataframe export

§Serde

All models serialize with stable, human-readable representations; dataframe support emits string codes for enums.

Re-exports§

pub use analysis::AnalysisSummary;
pub use analysis::Earnings;
pub use analysis::EarningsQuarter;
pub use analysis::EarningsQuarterEps;
pub use analysis::EarningsTrendRow;
pub use analysis::EarningsYear;
pub use analysis::PriceTarget;
pub use analysis::RecommendationAction;
pub use analysis::RecommendationGrade;
pub use analysis::RecommendationRow;
pub use analysis::RecommendationSummary;
pub use analysis::UpgradeDowngradeRow;
pub use esg::EsgInvolvement;
pub use esg::EsgScores;
pub use esg::EsgSummary;
pub use holders::InsiderPosition;
pub use holders::InsiderRosterHolder;
pub use holders::InsiderTransaction;
pub use holders::InstitutionalHolder;
pub use holders::MajorHolder;
pub use holders::NetSharePurchaseActivity;
pub use holders::TransactionType;
pub use profile::Address;
pub use profile::CompanyProfile;
pub use profile::FundKind;
pub use profile::FundProfile;
pub use profile::Profile;
pub use profile::ShareCount;
pub use statements::BalanceSheetRow;
pub use statements::Calendar;
pub use statements::CashflowRow;
pub use statements::IncomeStatementRow;

Modules§

analysis
Analyst, recommendations, and earnings-related types under paft_fundamentals::fundamentals::analysis.
esg
ESG scores and involvement types.
holders
Holder, insider activity, and ownership summary types.
profile
Profile-related types under paft_fundamentals::fundamentals::profile.
statements
Financial statements and calendar types under paft_fundamentals::fundamentals::statements.