Solution (source code)

= Solution

Use the standard convention that the <finite-variation process> $X$ has <càdlàg> paths and that the <stochastic integral> starts from zero. Write $V(X)$ for its <total-variation process>. The necessary admissibility condition is $\int_{(0,t]}|H_s|\,dV_s(X)<\infty$ <almost surely> for each finite $t$; it holds, for example, for locally bounded $H$. Define the pathwise <Lebesgue-Stieltjes integral>
$$
\boxed{(H\mathbin\cdot X)_t=\int_{(0,t]}H_s\,dX_s,\qquad(H\mathbin\cdot X)_0=0.}
$$
An atom at $s>0$ contributes $H_s\Delta X_s$, so this convention also fixes the treatment of jumps.

Fix $t$. For a generator $H_s=\mathbf1_A\mathbf1_{(a,b]}(s)$ of the <predictable sigma-algebra>, with $A\in\mathcal F_a$, the <Lebesgue-Stieltjes integral> is
$$
\mathbf1_A\bigl(X_{b\wedge t}-X_{a\wedge t}\bigr).
$$
It vanishes when $t\leq a$ and is $\mathcal F_t$-measurable otherwise. The <total-variation process> is <adapted>: for a <càdlàg> path its value at $t$ is the <supremum> over a countable collection of <partitions of an interval> using rational interior points and endpoint $t$. Thus the positive and negative <Lebesgue-Stieltjes measures> $dX^\pm=(dV(X)\pm dX)/2$ have $\mathcal F_t$-measurable masses on the generator intervals.

The <Monotone class theorem>, applied separately to these positive <random measures> on $[0,t]$, extends this measurability from the generators of the <predictable sigma-algebra> to all nonnegative <predictable processes>. Truncation and positive/negative decomposition then cover every admissible $H$. Consequently \b[$H\mathbin\cdot X$ is <adapted>.]

\b[The integrability condition is essential.] Taken literally, an arbitrary <previsible process> cannot always be integrated against a <finite-variation process>: with $X_t=t$ and deterministic $H_s=s^{-1}$ for $s>0$, $H_0=0$, the proposed value at every $t>0$ diverges. The usual <càdlàg> convention is also what identifies $dX$ by $dX((a,b])=X_b-X_a$.