Financial Time-Series Foundations
10 algorithms in Financial Mathematics, Statistics, and Data Foundations · 10 with asserted arithmetic.
In this family#
-
Time Order, Frequency, Regularity, and Financial Calendars verified
Checks whether a timestamped series runs in chronological order and whether its observations are evenly spaced, reporting the common spacing in seconds when there is one.
timeOrderFrequencyRegularityAndFinancialCalendars(input) -
Levels, Changes, Differences, and Returns verified
Converts a level series into its period-over-period differences and its simple returns, keeping the original levels alongside them.
levelsChangesDifferencesAndReturns(input) -
Lags, Leads, and Temporal Dependence verified
Pairs every observation with the value
lagpositions behind it, and exposes the same series shifted forward as the lead.lagsLeadsAndTemporalDependence(input) -
Rolling and Expanding Windows verified
Computes a fixed-length rolling mean of the series next to its expanding mean, so a window that forgets can be compared with one that never does.
rollingAndExpandingWindows(input) -
Resampling, Aggregation, and Time Alignment verified
Cuts the series into consecutive fixed-size buckets and averages each one, coarsening the sampling frequency.
resamplingAggregationAndTimeAlignment(input) -
Trend, Seasonality, Cycles, and Remainder verified
Separates a series into a rolling-mean trend, a seasonal difference taken
periodsteps back, and the remainder left once the trend is removed.trendSeasonalityCyclesAndRemainder(input) -
Autocovariance and Autocorrelation verified
Measures how far a series moves with its own past at a given lag, using the population convention that divides by the full observation count.
autocovarianceAndAutocorrelation(input) -
Stationarity and Differencing Intuition verified
Compares the average level of the second half of a series with the first half, and reports the first differences, as a rough read on whether the level drifts.
stationarityAndDifferencingIntuition(input) -
Smoothing, Baselines, and Naive Forecasts verified
Runs simple exponential smoothing over the series and reports both the naive last-value forecast and the smoothed one.
smoothingBaselinesAndNaiveForecasts(input) -
Look-Ahead Leakage and Time-Aware Data Splits verified
Splits a timestamped series at a given position and reports whether the training block reaches into the testing block's time range.
lookAheadLeakageAndTimeAwareDataSplits(input)
What they share#
Every topic here is a record-transform, so once you have
called one the rest follow the same shape. Import paths differ only in the final segment:
import { timeOrderFrequencyRegularityAndFinancialCalendars } from "fintech-algorithms/foundations/financial-time-series-foundations/time-order-frequency-regularity-and-financial-calendars";
import { levelsChangesDifferencesAndReturns } from "fintech-algorithms/foundations/financial-time-series-foundations/levels-changes-differences-and-returns";Read them in the order above — the sequence is pedagogical, not alphabetical.
Where this sits#
Financial Mathematics, Statistics, and Data Foundations collects 120 algorithms across 12 families. For the concept behind this family rather than the call signatures, see the concept guides.