= Solution
The pathwise identity $(S_t-S_{t-1})^2=S_t^2-S_{t-1}^2-2S_{t-1}(S_t-S_{t-1})$ telescopes to
$$
\sum_{t=1}^T(S_t-S_{t-1})^2
=S_T^2-S_0^2-2\sum_{t=1}^TS_{t-1}(S_t-S_{t-1}).
$$
This is the <discrete realized-variance replication identity>. Replicate $S_T^2$ using part (b). Add a <self-financing portfolio> with initial wealth $-S_0^2$ and <stock> holdings $-2S_{t-1}$ during $(t-1,t]$.
To give the cash positions explicitly, let
$$
G_{t-1}=-S_0^2-2\sum_{u=1}^{t-1}S_{u-1}(S_u-S_{u-1}).
$$
The added portfolio holds $G_{t-1}+2S_{t-1}^2$ units of the bond over that interval. Its starting value is $G_{t-1}$ and its change is exactly $-2S_{t-1}(S_t-S_{t-1})$. The combined holdings are therefore
$$
\boxed{\text{stock: }1-2S_{t-1},\quad
\text{bond: }G_{t-1}+2S_{t-1}^2,\quad
\text{calls: }2\text{ of each strike}.}
$$
The terminal value equals the squared-increment sum by the telescoping identity. Its initial cost is
$$
\boxed{S_0+2\sum_{K=1}^NC_0(K)-S_0^2
=2\sum_{K=1}^NC_0(K)+S_0(1-S_0).}
$$
The dynamic <stock> hedge uses only prices known before each interval, while the calls remain static.
Back to article page