Calculation:
Obtain quantities, prices and invested values of all funds at t0, t1, t2, t3, …
Calculate quantity delta (q_{t1} - q_{t0}). Multiply with new prices (p_{t1} * q_{t1} - p_{t1} * q_{t0} = \Delta q * p_{t1}) . Remember this.
Calculate price delta and its ratio (\frac{p_{t1} - p_{t0}}{p_{t0}}). It’ll look nice on file.
Calculate price delta at old quantities: ( p_{t1} * q_{t0} - p_{t0} * q_{t0} = \Delta p * q_{0}). Remember this.
Sum up all quantity deltas. Sum up all price deltas.
Substract price delta from actual performance (p_{t1} * q_{t1} - p_{t0} * q_{t0}) - (p_{t1} * q_{t0} - p_{t0} * q_{t0}). Remember this as outperformance.
You’ll see that you can further decompose it into the delta from quantity differences (vs never-rebalanced buy and hold) and price differences (from changed quantities vs t_0).
As to period - I’ve been contributing to one portfolio weekly from early 2022 on which if you remember was anything but a bull market (-25% from peak), with similarly good results (as discussed above). The reason those results don’t factor in here is because I’m more curious what happens vs portfolios otherwise “at rest”, which I can calculate rather easily (see above).