Add dynamic universe and subscription controls

This commit is contained in:
boris
2026-04-23 07:12:56 -07:00
parent 5265f82fef
commit 152b5c3141
12 changed files with 963 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ use fidc_core::{
CnSmallCapRotationConfig, CnSmallCapRotationStrategy, DataSet, JqMicroCapConfig,
JqMicroCapStrategy, PortfolioState, Strategy, StrategyContext,
};
use std::collections::BTreeSet;
use std::path::PathBuf;
#[test]
@@ -17,6 +18,7 @@ fn strategy_emits_target_weights_and_diagnostics() {
cfg.short_ma_days = 3;
cfg.long_ma_days = 5;
let mut strategy = CnSmallCapRotationStrategy::new(cfg);
let subscriptions = BTreeSet::new();
let decision = strategy
.on_day(&StrategyContext {
@@ -26,6 +28,8 @@ fn strategy_emits_target_weights_and_diagnostics() {
data: &data,
portfolio: &portfolio,
open_orders: &[],
dynamic_universe: None,
subscriptions: &subscriptions,
process_events: &[],
active_process_event: None,
})
@@ -57,6 +61,7 @@ fn jq_strategy_emits_same_day_decision() {
cfg.stock_mid_ma_days = 4;
cfg.stock_long_ma_days = 5;
let mut strategy = JqMicroCapStrategy::new(cfg);
let subscriptions = BTreeSet::new();
let decision = strategy
.on_day(&StrategyContext {
@@ -66,6 +71,8 @@ fn jq_strategy_emits_same_day_decision() {
data: &data,
portfolio: &portfolio,
open_orders: &[],
dynamic_universe: None,
subscriptions: &subscriptions,
process_events: &[],
active_process_event: None,
})