pub struct IndexSnapshot {
pub index: IndexId,
pub year_month: YearMonth,
pub constituents: Vec<Constituent>,
}Expand description
A full snapshot of index constituents for a given month.
constituents may contain rows from multiple calendar dates within the
month (when daily-resolution data exists) or just one row per holding
(when only monthly N-PORT data is available). Rows are sorted by
(as_of, -weight).
Fields§
§index: IndexIdThe index this snapshot represents.
year_month: YearMonthMonth of the snapshot.
constituents: Vec<Constituent>Holdings. Multi-date if daily data is available.
Implementations§
Source§impl IndexSnapshot
impl IndexSnapshot
Sourcepub fn has_weights(&self) -> bool
pub fn has_weights(&self) -> bool
Whether this snapshot carries weight data.
Returns true if at least one row has a finite weight value
(i.e. it came from a CDN, Wayback, or N-PORT source). Returns
false if every row is ticker-only (all GitHub mirror sources)
or the snapshot is empty.
Useful as a quick gate for analytics code: a snapshot with
has_weights() == false is a ticker universe only, not a weight
vector.
Trait Implementations§
Source§impl Clone for IndexSnapshot
impl Clone for IndexSnapshot
Source§fn clone(&self) -> IndexSnapshot
fn clone(&self) -> IndexSnapshot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more