pub struct RebalanceStep {
pub expected_returns: Option<Vec<f64>>,
pub previous_weights: Option<Vec<f64>>,
pub benchmark_weights: Option<Vec<f64>>,
pub budget: Option<f64>,
pub equality_rhs: Option<Vec<f64>>,
pub inequality_rhs: Option<Vec<f64>>,
}Expand description
Per-date data changes for one PortfolioSequence::solve_next call.
Every field is optional; None keeps the current value. The default value
changes nothing, so RebalanceStep::default() re-solves the current data
(useful for the first solve of a sequence).
Only factorization-preserving updates are expressible. Anything structural
— covariance, constraint matrices, bounds, the turnover penalty — needs a
new PortfolioProblem and a new sequence.
Fields§
§expected_returns: Option<Vec<f64>>New expected returns (length must match the number of assets).
previous_weights: Option<Vec<f64>>New turnover anchor. Requires the base problem to have been built
with PortfolioProblem::with_quadratic_turnover and/or
PortfolioProblem::with_l1_turnover; both terms share this single
anchor. The L2 penalty and the L1 costs themselves stay fixed for
the whole sequence.
benchmark_weights: Option<Vec<f64>>New tracking benchmark. Requires the base problem to have been built
with PortfolioProblem::with_tracking_benchmark. The benchmark
only shifts the linear cost, so cached factorizations survive.
budget: Option<f64>New budget. Requires the base problem to have a budget constraint.
equality_rhs: Option<Vec<f64>>New right-hand side for the user-supplied equality constraints (excluding the budget row).
inequality_rhs: Option<Vec<f64>>New right-hand side for the inequality constraints.
Trait Implementations§
Source§impl Clone for RebalanceStep
impl Clone for RebalanceStep
Source§fn clone(&self) -> RebalanceStep
fn clone(&self) -> RebalanceStep
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more