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:
decodes the typed source payload;
updates the generated factor state;
publishes ready values to semantic
factor://keys;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.