Skip to main content

Heteroskedasticity functions

Advanced: hand-writing the C++ expression directly

Custom likelihoods may still provide h_val_cpp and its Python counterpart. The expression is parsed by ExprTk. Use e, z, and temporary variables x0 through x4. Python ** becomes ExprTk ^.

Multiple statements use ;; the final expression is returned. ExprTk uses := for assignment. Logical and/or are unsupported, so arithmetic masks must express conditions.

Function Meaning
abs(x) Absolute value
sqrt(x) Square root
log(x) Natural logarithm
exp(x) Exponential
sin(x), cos(x), tan(x) Trigonometric functions
floor(x), ceil(x) Rounding
min(x, y), max(x, y) Bounds
sign(x) Sign of a value
x0 := (e + z)^2; (x0 <= 1) * x0^2 + (x0 > 1) * x0

See the ExprTk documentation for parser details.