Factors in Strategies

wire connects a source topic to one or more generated plugin types:

(void)wire<"bar://okx/BTCUSDT@1m",
    aurum::alpha::spread,
    aurum::alpha::spread_mean>();

For each source update, Aurum:

  1. decodes the typed source payload;

  2. updates the generated factor state;

  3. publishes ready values to semantic factor:// keys;

  4. exposes those resources through the runtime catalog.

Readiness

Windowed factors are unavailable until they have enough input. ref returns an optional value, so handle the not-ready state explicitly:

auto mean = ref(TOPIC<"factor://spread_mean/btcusdt.okx@bar:1m">);
if (!mean) return;

Window ownership

A fixed ~window:N belongs to the factor declaration. A factor without a fixed window can receive its window from the C++ attachment type when the generated plugin supports an ambient window.

Resource identity

Generated factor keys encode the factor, instrument, venue, source family, and source parameter:

factor://spread_mean/btcusdt.okx@bar:1m

Use the catalog key emitted by the running application. Do not construct keys from display labels in Terminal or an external integration.

Optimization

Athanor may share subexpressions and reorganize the generated implementation, but it preserves the factor expression’s semantics. Treat the generated header as an artifact: review compiler diagnostics, but do not edit it by hand.

See Athanor .at DSL Reference for the complete language.