Configuration API¶
Public author inputs parse once into AuthorInputs; resolution binds them to an
operator configuration and retained market facts before parameters exist.
almanak.configuration.unresolved
¶
The public author root, with connector-owned inputs and gateway-resolved facts.
These inputs are never strategy parameters. Supported connector bindings share this loader, which has no legacy-format fallback.
InventoryInput
¶
Bases: Model
Owned cash a composed root declares; never spending authority.
diagnostic
¶
Locate a validation or configuration failure in the author's own file.
author_field
¶
A discriminated union inserts its connector tag, which the author never wrote.
public_root
¶
Public roots carry no execution block and identify every market chain by CAIP-2 text.
require_bindings
¶
Every market names a canonical connector that has a public author binding.
inject_connectors
¶
Positions take the connector tag from their named market; the author never writes it.
read_inputs
¶
The author inputs; fields names the strategy's typed parameter model's fields.
read_frozen_inputs
¶
A workspace's inputs as frozen in JSON; YAML would read 1e-05 back as a string.
require_one_allocation_per_fund
¶
The DEX connectors' own per-fund rule, refused here before any resolution.
known_assets
¶
The position assets the author file names; pool coins need resolution.
require_composed_inventory
¶
Composed inventory states every fund asset; check the ones known before resolution.
require_chain_support
¶
Offline checks refuse a market chain its connector never declared, in any mode.
unknown_reference
¶
Report local-name typos without selecting a replacement automatically.
almanak.configuration.parameters
¶
Construct complete parameters only from matching, replay-checked resolution.
admit_new_positions
¶
Preflight for a new run only: connector refusals that need the resolved reads.
Retained parameters (resume, exit) and backtests never pass through here, so a check added later cannot strand a deployment whose parameters are already frozen.
check_resolved_positions
¶
Connector checks that need the market's resolved reads, not only its frozen facts.
grouped_positions
¶
Resolved positions grouped by the connector of their named market.
fork_rescope
¶
Positions move to the generated fixture chains; targets keep their origin identity.
assemble
¶
Build one authoritative parameter instance across all named markets.
resolved_inventory
¶
Resolve shared owned cash once, using verified precision and bound fund scope.
resolved_metadata
¶
Verified precision per asset, named by the author or else by the token itself.
Backtest inputs resolve against those same parameters and explicit operator provider bindings.
almanak.configuration.backtest_inputs
¶
Public backtest settings: syntax-checked inputs that resolve with verified parameters.
Historical provider bindings come from the operator configuration, never from the author's backtest file, so retained runs carry no provider identity.
BacktestInputs
¶
Bases: Model
anchors
¶
One anchor per account chain: the last block at the window start.
resolve_backtest
¶
resolve_backtest(
document: BacktestDocument,
parameters: Model,
history: tuple[HistoryBinding, ...],
vendors: tuple[VendorBinding, ...] = (),
)
The settings wire of whichever connector the resolved parameters name.
refuse_strategy_prices
¶
Only the strategy declares a pool price series; a backtest never repeats one.
A single strategy price (an Aave V4 economic input) may still be listed here, and must then equal the strategy's declaration.
bind_vendor_access
¶
Bind only author-selected vendors to operator-owned access settings.
aave_wire
¶
Aave V4 keeps the flat fund identity and models no separate gas payer.
connector_wire
¶
Every other connector carries a simulation profile and its own gas payers.
composed_wire
¶
A composed run pairs one data policy, one cost policy and one model per connector.
refuse_payers
¶
Aave V4 simulates one account identity, so its inputs carry no payer.
payer_wire
¶
A payer keeps the same deterministic identity as a hypothetical fund.
Runtime artifacts use the resolved parameter codecs. Archived author fixtures are
private evidence inputs under scripts/legacy_configuration/; they are not an SDK
configuration API.