The basic ingredients of homemade sweet and sour sauce are pineapple, tomato sauce or ketchup, vinegar and sugar. Most recipes also use a small amount of soy sauce.
Pineapple juice and brown or granulated sugar account for the sweet flavor in sweet and sour sauce, while tomato ketchup and vinegar provide the sour element. A small amount of soy sauce, roughly a tablespoon in most recipes, adds extra depth of flavor. Combine the ingredients in a saucepan, and heat over a stovetop. To lighten the flavor, add water to the sauce mixture. If a thicker sauce is desired, add cornstarch.