We study the problem of finding the minimal initial capital needed in order to hedge without risk a barrier option when the vector of proportions of wealth invested in each risky asset is constrained to lie in a closed convex domain. In the context of a Brownian diffusion model, we provide a PDE characterization of the superhedging price. This extends the result of Broadie, Cvitani` c, and Soner [Rev. Financial Stud., 11 (1998), pp. 59–79] and Cvitani` c, Pham, and Touzi [J. Appl. Probab., 36 (1999), pp. 523–545] which was obtained for plain vanilla options and provides a natural numerical procedure for computing the corresponding superhedging price. As a by-product, we obtain a comparison theorem for a class of parabolic PDEs with rel...