abaquant.derivatives.validation¶
Import path: abaquant.derivatives.validation
Domain: Derivative pricing, simulation, calibration, diagnostics, and strategy analysis.
Purpose¶
Input-validation helpers for advanced derivatives.
When to use it¶
Centralizes input validation and error messages used by public calculations. Use this package when valuing contingent claims, calculating Greeks, building option strategies, simulating stochastic processes, or fitting models to market observations.
Public objects¶
function:
validate_positive— Require a strictly positive numeric input.function:
validate_nonnegative— Require a numeric input greater than or equal to zero.function:
validate_between— Require a numeric input to lie strictly inside an open interval.function:
validate_positive_integer— Require a positive integer input.function:
validate_option_type— Require an option type supported by vanilla call/put routines.
Detailed reference¶
Input-validation helpers for advanced derivatives.
Purpose¶
The module contains small reusable checks for positivity, non-negativity, intervals, integer counts, and option-type labels.
Conventions¶
Validation helpers raise ValueError for inputs outside their declared domain.
References
[ 1 ] Black, F., and M. Scholes (1973), “The Pricing of Options and Corporate Liabilities”; Merton, R. C. (1973), “Theory of Rational Option Pricing”.
- abaquant.derivatives.validation.validate_positive(name, value)¶
Require a strictly positive numeric input.
- Parameters:
name (str) – Human-readable name of the value being validated.
value (float) – Numerical value being validated or transformed.
- Returns:
The function returns
Nonewhen the value is valid and raisesValueErrorotherwise.- Return type:
None
- abaquant.derivatives.validation.validate_nonnegative(name, value)¶
Require a numeric input greater than or equal to zero.
- Parameters:
name (str) – Human-readable name of the value being validated.
value (float) – Numerical value being validated or transformed.
- Returns:
The function returns
Nonewhen the value is valid and raisesValueErrorotherwise.- Return type:
None
- abaquant.derivatives.validation.validate_between(name, value, lower, upper)¶
Require a numeric input to lie strictly inside an open interval.
- Parameters:
name (str) – Human-readable name of the value being validated.
value (float) – Numerical value being validated or transformed.
lower (float) – Lower root-search or interval bound.
upper (float) – Upper root-search or interval bound.
- Returns:
The function returns
Nonewhen the value is valid and raisesValueErrorotherwise.- Return type:
None
- abaquant.derivatives.validation.validate_positive_integer(name, value)¶
Require a positive integer input.
- Parameters:
name (str) – Human-readable name of the value being validated.
value (int) – Numerical value being validated or transformed.
- Returns:
The function returns
Nonewhen the value is valid and raisesValueErrorotherwise.- Return type:
None
- abaquant.derivatives.validation.validate_option_type(option_type)¶
Require an option type supported by vanilla call/put routines.
- Parameters:
option_type (str) – Option type label, normally
"call"or"put".- Returns:
The function returns
Nonewhen the label is valid and raisesValueErrorotherwise.- Return type:
None