Class FundamentalsHistory
asOf(String, long) returns only what was published by then.
A fundamentals snapshot taken today and used to score history is
look-ahead: today's P/E is today's price over trailing earnings, so
"cheap" in the snapshot means "fell over the sample" and a value backtest
on it measures sample-path reversal. The fix is the publication date.
A filing for the quarter ending periodEnd is not usable until it
is released, typically 30 to 90 days later in US equities (the SEC 10-Q
deadline is 40 to 45 days after quarter end, 10-K 60 to 90 days); research
convention is to assume a conservative fixed lag when the true release
date is unknown (Fama and French 1992 use a six-month lag on fiscal
year-end accounting data).
Ratio fields (peRatio, pbRatio) are taken as recorded,
that is, at the price on the record's own date. Factors.value()
prefers eps / close(t) for the earnings yield when eps is
present, so the price side updates every bar.
Timestamps use the same epoch units as the BarSeries panel. Not
thread-safe while being filled; safe to share once filled.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne published record. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance; the explicit form of the default constructor. -
Method Summary
Modifier and TypeMethodDescriptionadd(String symbol, long periodEnd, long publishedAt, Fundamentals fundamentals) Adds a record with its actual publication time.addWithLag(String symbol, long periodEnd, long reportingLag, Fundamentals fundamentals) Adds a record whose release date is unknown, assuming it became publicreportingLagafterperiodEnd.The latest record published at or beforetimestamp, ornullwhen nothing about the symbol was public yet.All records for a symbol in publication order (unmodifiable).
-
Constructor Details
-
FundamentalsHistory
public FundamentalsHistory()Creates an instance; the explicit form of the default constructor.
-
-
Method Details
-
add
public FundamentalsHistory add(String symbol, long periodEnd, long publishedAt, Fundamentals fundamentals) Adds a record with its actual publication time.- Parameters:
periodEnd- end of the fiscal period the record describespublishedAt- when the record became public (>= periodEnd)
-
addWithLag
public FundamentalsHistory addWithLag(String symbol, long periodEnd, long reportingLag, Fundamentals fundamentals) Adds a record whose release date is unknown, assuming it became publicreportingLagafterperiodEnd. -
asOf
The latest record published at or beforetimestamp, ornullwhen nothing about the symbol was public yet. -
entries
All records for a symbol in publication order (unmodifiable).
-