Prices result: private API

Types

Functions

PortfolioOptimisers.assert_nonneg_where_presentFunction
assert_nonneg_where_present(val::AbstractArray, sym::Union{Symbol, <:AbstractString} = :val) -> nothing

Refuse a negative or an infinite value, and let an absence through.

The ingestion layer carries an absent implied volatility as NaN, exactly as it carries an absent price, and the carriers admit one: the estimator that reads the series narrows its Coverage Universe to the columns whose values are complete, so an absence excludes the asset from the fit rather than failing it. What the carrier still refuses is a present value that is not a volatility: a negative one, and an infinite one, which is neither a value nor the marker of an absence — the rule assert_cross_sectional_matrix applies to a returns matrix. A missing — the other spelling of absence a hand-built carrier may hold — is an absence here too, because the conversion unifies it before any reader sees it.

Arguments

  • val: The array to check.
  • sym: Symbolic name used in the error message.

Validation

  • Every element is missing, NaN, or finite and non-negative. A breach raises a DomainError.

Returns

  • nothing.

Related

source