  We prove the equivalence of two hierarchies of soliton equations associated
to a simply-laced finite Dynkin diagram. The first was defined by Kac and
Wakimoto using the principal realization of the basic representations of the
corresponding affine Kac-Moody algebra. The second was defined in
arXiv:math/0307176 using the Frobenius structure on the local ring of the
corresponding simple singularity. We also obtain a deformation of the principal
realization of the basic representation over the space of miniversal
deformations of the corresponding singularity. As a by-product, we compute the
operator product expansions of pairs of vertex operators defined in terms of
Picard-Lefschetz periods for more general singularities. Thus, we establish a
surprising link between twisted vertex operators and deformation theory of
singularities.
