IMLInvestment
Model Library

Reference desk / edition 2026.10

Calculation and verification methods

Input admission, statistical conventions, unavailable results and the boundary between software tests and investment research.

Strict numerical inputs

Each engine call takes a model identifier and exactly the named JSON input fields. Extra keys, missing values, strings presented as numbers, nulls and nonfinite numbers are rejected. Return arrays preserve their supplied order; alignment, timestamps and currency treatment are not inferred. There is no missing-data deletion or silent weight normalization. Array sizes and numerical ranges are bounded for this educational implementation.

Units and dimensions

Weights and returns are decimal fractions. A value of 0.01 represents one percent. Covariance uses squared decimal-return units at a common frequency. The two-asset covariance contract requires exact symmetry, nonnegative diagonal entries and a valid covariance bound. This mathematical admission rule does not establish data provenance or economic accuracy. Annualization occurs only where periods_per_year is an explicit field.

Sample and path conventions

Tracking error uses sample standard deviation with n-1 in the denominator. Regression includes an intercept. Raw-return beta does not subtract a risk-free return. EWMA updates a zero-mean second moment after observing each return. Compounding and drawdown assume no external cash flows; drawdown includes initial wealth one and only supplied endpoints.

Undefined is not zero

An information ratio with zero active-return dispersion is null. Component-volatility contributions at zero portfolio volatility are null. R-squared for constant response is null. A constant explanatory series is rejected. Total-loss wealth can correctly be zero; this is distinct from an unavailable statistic. Exports retain nulls and their explanatory notes.

Two independent arithmetic paths

The JavaScript engine uses locally vendored Simple Statistics 7.12.1 for sample statistics and centered regression. Decimal.js 10.6.0 protects covariance, EWMA and wealth intermediates with 80 significant digits. Inputs first parse as binary64 numbers; added precision does not restore digits lost before parsing. Unrepresentable outputs are rejected. Python independently reconstructs results using centered sums, statistics, Decimal arithmetic and a closed-form EWMA expansion. Tests cover deterministic synthetic variations and pathological inputs, not independent market-validation samples.

Reproduction and interpretation

A complete downloadable kit includes the engine, pinned dependency, licences, fixture inputs, runnable command and tests. It can be checked without the website or a paid data account. Successful reproduction shows which calculation was performed. It does not establish expected profitability, market suitability, institutional approval or a right to redistribute unrelated third-party data.