Solution (source code)

= Solution

Normalize by a riskless <bank account> with $B_0=1$, $B_1=R>0$. For $d$ risky assets let $Y=S_1/R-S_0$ be the vector of discounted gains, and let $H$ denote a discounted square-integrable <contingent claim>. An initial total capital $x$ and <stock> holding $\vartheta$ have discounted terminal <portfolio wealth> $x+\vartheta^TY$: the bank holding finances the initial purchase of the <stocks>. Thus the space of <attainable claims> is
$$
\mathcal A=\operatorname{span}\{1,Y^1,\ldots,Y^d\}\subset L^2(P).
$$
It is finite-dimensional and hence closed. The market is <complete market> when every square-integrable claim is in this span; with finitely many assets this is also equivalent to replication of every bounded claim.

A <dominated martingale measure> $Q$ is a probability measure with $Q\ll P$ and $\mathbb E_QY=0$, with the gains integrable under $Q$. Its <Radon-Nikodym derivative> satisfies $Z\ge0$, $\mathbb EZ=1$ and $\mathbb E[ZY]=0$. An <equivalent martingale measure> has $Z>0$ almost surely. A <signed martingale measure> obeys the same normalization and pricing equations without requiring nonnegativity. The distinction matters for quadratic hedging. For the completeness assertion use the usual no-<arbitrage> hypothesis, expressed here by existence of an <equivalent martingale measure> $Q_0$.

The unrestricted <one-period quadratic hedge> minimizes
$$
\mathbb E(H-x-\vartheta^TY)^2.
$$
Put $m=\mathbb EY$, $C=\operatorname{Cov}(Y)$ and $k=\operatorname{Cov}(Y,H)$. Remove redundant gains so that $C$ is invertible. Differentiating in $x$ gives $x=\mathbb EH-\vartheta^Tm$. The remaining squared error is
$$
\operatorname{Var}(H)-2\vartheta^Tk+\vartheta^TC\vartheta
=\operatorname{Var}(H)-k^TC^{-1}k+(\vartheta-C^{-1}k)^TC(\vartheta-C^{-1}k).
$$
Therefore
$$
\boxed{\vartheta_*=C^{-1}k,\qquad x_*=\mathbb EH-m^TC^{-1}k.}
$$
The residual is orthogonal in $L^2(P)$ to $1$ and every gain, making the fitted claim the <orthogonal projection onto a finite-dimensional subspace> onto $\mathcal A$. Its minimum mean-square error is $\operatorname{Var}(H)-k^TC^{-1}k$, and it vanishes exactly when $H$ is attainable. If initial capital $x$ is fixed instead, the normal equation is
$$
(C+mm^T)\vartheta=k+m(\mathbb EH-x).
$$
This separates hedging with prescribed capital from simultaneous optimization of capital and risky holdings.

The <minimal martingale measure in a one-period market> is characterized by leaving unchanged the <expectation> of every centered square-integrable $L$ orthogonal to the <martingale> part $Y-m$. For square-integrable pricing densities this forces $Z-1$ into the span of $Y-m$: the orthogonal complement consists exactly of those $L$. The pricing equation then determines
$$
\boxed{Z_*=1-m^TC^{-1}(Y-m).}
$$
Indeed $\mathbb EZ_*=1$ and $\mathbb E[Z_*Y]=m-CC^{-1}m=0$. For every such orthogonal $L$, $\mathbb E[Z_*L]=0$. Conversely a normalized density preserving all these $L$ must have the displayed form, since its coefficients must satisfy $C\beta=-m$. The least-squares initial capital is consequently $x_*=\mathbb E[Z_*H]$.

For any other square-integrable signed pricing density $Z$, put $L=Z-Z_*$. Both densities price $1$ and all gains, so $L$ is orthogonal to their span, including $Z_*$. Hence
$$
\boxed{\mathbb EZ^2=\mathbb EZ_*^2+\mathbb E(Z-Z_*)^2\ge\mathbb EZ_*^2=1+m^TC^{-1}m.}
$$
Equality holds only when $Z=Z_*$. Densities with infinite second moment cannot improve this finite minimum. This proves the requested minimum over <dominated martingale measures> whenever $Z_*\ge0$, and over all square-integrable <signed martingale measures> without that extra condition. If $Z_*>0$, it is also an <equivalent martingale measure>.

\b[Absence of arbitrage alone does not guarantee that the minimal density is a probability density.] For a concrete example, let a single discounted gain take values $-1,1,10$ with probabilities $1/10,4/5,1/10$. Then $m=17/10$, $C=801/100$ and $Z_*(10)=-610/801$. Nevertheless pricing probabilities $(109/200,89/200,1/100)$ are strictly positive and give mean gain zero, so an <equivalent martingale measure> exists. This is <negative minimal density in an arbitrage-free one-period market>. If the term <martingale> measure is reserved for probabilities, the printed minimum assertion needs the extra nonnegativity hypothesis; otherwise it is the signed minimum-norm assertion just proved. Minimizing over the nonnegative pricing densities instead is a different constrained projection problem.

Finally, prove <completeness and uniqueness of dominated martingale measures>. If the market is <complete market>, every event indicator can be replicated. Under any <dominated martingale measure>, its <expectation> equals its initial discounted cost. Consequently any two such measures agree on every event and are equal; existence is supplied by $Q_0$.

Conversely suppose $\mathcal A$ has dimension $k$ and is a proper subspace of the whole payoff space. Choose $k+1$ disjoint events $A_i$ of positive probability. Such events exist whenever $L^2(P)$ has dimension greater than $k$: otherwise the space has at most $k$ atoms and dimension at most $k$. Let $f_1,\ldots,f_k$ be a basis of $\mathcal A$. The $k+1$ vectors
$$
\bigl(\mathbb E_{Q_0}[f_j\mathbf1_{A_i}]\bigr)_{j=1}^k
$$
are linearly dependent. Choose coefficients $a_i$, not all zero, whose linear combination is zero, and set $h=\sum_i a_i\mathbf1_{A_i}$. It is bounded, not almost surely zero under $Q_0$, and satisfies $\mathbb E_{Q_0}[hf]=0$ for every $f\in\mathcal A$, in particular for $1,Y^1,\ldots,Y^d$. For $0<\varepsilon<\|h\|_\infty^{-1}$ define
$$
\frac{dQ_\pm}{dP}=\frac{dQ_0}{dP}(1\pm\varepsilon h).
$$
These densities are strictly positive, normalized, have zero gain means, and are different. Thus incompleteness contradicts uniqueness, proving
$$
\boxed{\text{Under an equivalent pricing measure, completeness}\iff\text{a unique dominated martingale measure}.}
$$
The existence hypothesis cannot be discarded: with three positive-probability states and gain $Y=0,1,2$, the sole dominated <martingale> probability concentrates on $Y=0$, yet the two-dimensional attainable space does not span all three states. That market permits <arbitrage>.