The present invention relates to a polymer dispersion of polymer particles comprising phosphorous-containing (meth)acrylate monomers and phosphorus-containing allylic monomers. The present invention further relates to a coating composition made from the polymer dispersion with both satisfactory coating viscosity stability and improved coating performances such as scrub resistance, stain resistance, corrosion resistance and durability.