Add dynamic universe and subscription controls
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user