For the complete documentation index, see llms.txt. This page is also available as Markdown.

Var

The Var function in Origami Tech calculates statistical variance to analyze data dispersion, volatility, and performance consistency in trading models.

var(name: str, default: decimal, cache_by: tuple=())

Function that is used for holding dynamic variables. Returns object that supports:

get() -> decimal

returns value of variable or default if unset

set(value: decimal, ttl: decimal=inf) -> decimal

set value to value , returns value

ttl - optional ttl of variable, default to inf

Examples:

get returns 5 if variable unset

Set variable’s value to 10

Example:

Last updated