Solution (source code)

= Solution

The bond pays one at maturity. If $\tau=\inf\{t<T:P_t^T\leq0\}$ had positive probability of being finite, buy one bond at $\tau$. A negative price supplies immediate consumption and a positive terminal payoff; a zero price supplies a free positive terminal payoff. Trading only on the stopping event gives an arbitrage. Therefore $P_t^T>0$ almost surely for every $t<T$.