test: enable rebalance actions in portfolio risk lifecycle fixture
This commit is contained in:
@@ -14696,6 +14696,7 @@ mod tests {
|
|||||||
config.selection_limit_expr = "1".to_owned(); config.max_positions = 1;
|
config.selection_limit_expr = "1".to_owned(); config.max_positions = 1;
|
||||||
config.market_cap_lower_expr = "0.0".to_owned(); config.market_cap_upper_expr = "1000.0".to_owned();
|
config.market_cap_lower_expr = "0.0".to_owned(); config.market_cap_upper_expr = "1000.0".to_owned();
|
||||||
config.exposure_expr = "0.9".to_owned(); config.refresh_rate = 1; config.refresh_rate_expr = "1".to_owned();
|
config.exposure_expr = "0.9".to_owned(); config.refresh_rate = 1; config.refresh_rate_expr = "1".to_owned();
|
||||||
|
config.rebalance_existing_positions = true;
|
||||||
config.portfolio_loss_control = Some(PortfolioLossConfig { lookback: 10, loss_trigger: 0.05, floor_exposure: 0.2, cooldown_trading_days: 3 });
|
config.portfolio_loss_control = Some(PortfolioLossConfig { lookback: 10, loss_trigger: 0.05, floor_exposure: 0.2, cooldown_trading_days: 3 });
|
||||||
let rows = Arc::new(Mutex::new(Vec::new()));
|
let rows = Arc::new(Mutex::new(Vec::new()));
|
||||||
let strategy = Capture { inner: PlatformExprStrategy::new(config), first, rows: Arc::clone(&rows) };
|
let strategy = Capture { inner: PlatformExprStrategy::new(config), first, rows: Arc::clone(&rows) };
|
||||||
|
|||||||
Reference in New Issue
Block a user