Telescoping replication of a stock-price sum (source code)

= Telescoping replication of a stock-price sum
{title2=$TS_0+\sum_{t=1}^T(T-t+1)\Delta S_t=\sum_{t=1}^TS_t$}

With a constant cash account, holding $T-t+1$ shares during interval $(t-1,t]$ and selling one share at each endpoint replicates $\sum_{t=1}^TS_t$. Each sale is retained in cash; the initial cost is $TS_0$. The proof is a pathwise telescoping identity.