Skip to main content

finance_query/models/fundamentals/
earnings_surprise.rs

1//! Earnings-surprise history.
2//!
3//! Served through the [`Capability::FUNDAMENTALS`](crate::Capability::FUNDAMENTALS)
4//! route; FMP and Yahoo both implement it.
5
6use serde::{Deserialize, Serialize};
7
8/// One reported earnings result versus the analyst estimate.
9#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10#[non_exhaustive]
11pub struct EarningsSurprise {
12    /// Ticker symbol.
13    pub symbol: Option<String>,
14    /// Earnings report date (`YYYY-MM-DD`).
15    pub date: Option<String>,
16    /// Actual reported EPS.
17    pub actual_eps: Option<f64>,
18    /// Analyst-estimated EPS.
19    pub estimated_eps: Option<f64>,
20    /// `actual_eps - estimated_eps`.
21    pub surprise: Option<f64>,
22    /// Surprise as a percentage of the estimate.
23    pub surprise_percent: Option<f64>,
24}