pub struct BatchAccount {
pub problem: PortfolioProblem,
pub steps: Vec<RebalanceStep>,
pub chain_previous_weights: bool,
}Expand description
One account in a batch: its own portfolio problem plus its per-date steps.
The problem carries the account’s structure and first date’s data; steps
are applied in order exactly like
solve_sequence, so pass
RebalanceStep::default() first to solve the base data as-is.
Fields§
§problem: PortfolioProblemThe account’s portfolio problem (structure plus first date’s data).
steps: Vec<RebalanceStep>Per-date data changes, in order. Only factorization-preserving
updates are expressible; see RebalanceStep.
chain_previous_weights: boolWhen true, every date after a Solved one anchors the turnover
terms at that date’s solved weights — the standard backtest
convention (“previous weights” are what the account actually holds)
— unless the step provides previous_weights explicitly, which
wins. Dates that did not reach Solved leave the anchor where it
was, because the account did not trade. Requires the problem to have
been built with a turnover term.
Trait Implementations§
Source§impl Clone for BatchAccount
impl Clone for BatchAccount
Source§fn clone(&self) -> BatchAccount
fn clone(&self) -> BatchAccount
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more