http://www.etymonline.com/ shows:
"Yankee - 1683, probably applied disparagingly by Dutch settlers in New Amsterdam (New York) to English colonists in neighboring Connecticut. It may be from Du.
Janke, dim. of common personal name
Jan, or from
Jan Kes familiar form of "John Cornelius," or perhaps an alt. of
Jan Kees, dial. variant of
Jan Kaas, lit. "John Cheese," the generic nickname the Flemings used for Dutchmen. It originally seems to have been applied insultingly to Dutch, especially freebooters, before they turned around and slapped it on the English. In Eng. a term of contempt (1750s) before its use as a general term for "native of New England" (1765). Shortened form
Yank in reference to "an American" first recorded 1778."