We theoretically investigate the creation of squeezed states of a Bose-Einstein condensate (BEC) trapped in a magnetic double-well potential. The number or phase squeezed states are created by modulating the tunnel coupling between the two wells periodically with twice the Josephson frequency, i.e., through parametric amplification. Simulations are performed with the multiconfigurational time-dependent Hartree method for bosons. We employ optimal control theory to bring the condensate to a complete halt at a final time, thus creating a highly squeezed state (squeezing factor of 0.12, xi(2)(S) = -18 dB) suitable for atom interferometry.