Assume we start at $t=0$ with $P_0$, there are $t=1...N$ subsequent periods, and at each period-end $t$ an (entirely arbitrary) portion $c$ of our portfolio $P_t$ is churned and $(1-c)$ remains untouched. $P$ grows over each period by a factor $(1+g)$: $P_t = P_{t-1}(1+g)$.
We can partition $P_t$ into sub-portfolios, each with its own churn history, as in:
$P_1 = P_0(1+g) \equiv P_0(1+g)(c+(1-c))$
$P_2=P_1(1+g)\equiv P_0(1+g)^2(c(1-c)+(1-c)^2+c^2+(1-c)c)$
At period $t=N$, we will have $2^N$ such sub-portfolios together forming $P_N$, each representing a particular history of churn/no-churn over $t=1...N$.
$P_N \equiv P_0(1+g)^N((1-c)^N+(1-c)^{N-1}c+(1-c)^{N-2}c^2+\cdots+c^N)$
Now let's place ourselves at period-end $T=N+1$ and let's consider the third term:
- $c^N$ is the portion of $P$ that has been churned at each preceding period. This particular sub-portfolio has been held for 1 period only at this stage (since it was last churned at $t=N$), with cumulative growth $g$.
- Similarly $(1-c)^N$ is the portion that has never been churned, and has been held for N+1 periods, with cumulative growth $(1+g)^{N+1}-1$.
- Finally, there are far more in-between "churn histories" than the few $(1-c)^{N-k}c^k$ I've written here. For example, a large number of sub-portfolios have been churned $k$ times, some in the first $k$ periods, some in the last $k$ periods, and many more over any $k$ periods. There are in fact $\binom{N}{k}$ such sub-portfolios, for each $k=0...N$ (this covers $c^N$ and $(1-c)^N$ above).
Let's then rewrite $P_N \equiv P_0(1+g)^N(\sum_{k=0}^{N}\binom{N}{k}c^k(1-c)^{N-k})$.
Let's look at $\binom{N}{k}c^k(1-c)^{N-k}$, all the sub-portfolios that have been churned $k$ times: clearly some have been last churned at $t=N$ and held 1 period since, and some have been churned before that, but the earliest such sub-portfolio could have been last churned is $t=k$. If we call $N-h$ the last churn date of a sub-portfolio churned $k$ times, then $h\in[0,N-k]$.
We can now rearrange these sub-portfolios by $h$: there are $\binom{N-h-1}{k-1}$ sub-portfolios churned $k$ times whose last churn date is $t=N-h$, and since $h\in[0,N-k]$, we can rewrite:
$\binom{N}{k}\equiv \sum_{h=0}^{N-k}\binom{N-h-1}{k-1}$
From which follows
$P_N \equiv P_0(1+g)^N(\sum_{k=1}^{N}\sum_{h=0}^{N-k}\binom{N-h-1}{k-1}c^k(1-c)^{N-k}+(1-c)^N)$
The last term for that portion that was never churned, and now we can rearrange the sum to show
$P_N \equiv P_0(1+g)^N(\sum_{h=0}^{N-1}\sum_{k=1}^{N-h}\binom{N-h-1}{k-1}c^k(1-c)^{N-k}+(1-c)^N)$
And so there is a fraction $\sum_{k=1}^{N-h}\binom{N-h-1}{k-1}c^k(1-c)^{N-k}$ of the portfolio which was last churned at $t=N-h$, and has a holding period of $h+1$ as seen from $T=N+1$ with cumulative growth $G_h=(1+g)^{h+1}-1$ (this is your capital gain).
There is also a fraction $(1-c)^N$ which has been held for $T+1$ periods, and never churned.
And we have $\mathbb{E}(C_{N+1})=\sum_{h=0}^{N-1}G_h\sum_{k=1}^{N-h}\binom{N-h-1}{k-1}c^k(1-c)^{N-k}+G_N(1-c)^N$.
$\mathbb{E}(C_{N+1})$ is the expected capital gain of any randomly sampled portion of our portfolio at $T=N+1$ and in particular of the portion $c$ we churn on that date.
Now for some numerical examples:
- $N=10, g=3\%, c=0\%, \mathbb{E}(C_{N+1})= 38.42\% = (1+3\%)^{11}$
- $N=10, g=3\%, c=100\%, \mathbb{E}(C_{N+1})=3\%$
- $N=10, g=3\%, c=10\%, \mathbb{E}(C_{N+1})=23.24\%$