We consider the Nernst effect in the underdoped regime of the cuprate high temperature superconductors within the d-density wave (DDW) model of the pseudogap phase. By a combination of analytical and numerical arguments, we show that there is a robust low-temperature positive peak (i.e., maximum) in the temperature dependence of the Nernst coefficient when the DDW state is ambipolar, i.e., when the broken symmetry supports the coexistence of both electron- and hole-like quasiparticles in the excitation spectrum, and the electron pocket dominates at the low temperatures. In contrast, the Nernst coefficient is negative and there is no such positive peak if the underlying state is non-ambipolar, i.e., when it supports only one type of quasiparticles. More generally, in the ambipolar state, the sign of the Nernst coefficient can be positive or negative depending on the dominance of the electron or hole pockets, respectively, in the low temperature thermoelectric transport. By modeling the pseudogap phase by a doping-dependent DDW order parameter with a Fermi surface topology that supports both hole and electron pockets, and assuming energy-independent transport scattering times, we analyze the evolution of the Nernst effect with doping concentration at low temperatures in the cuprate phase diagram.