Bring a pot of salted water to a boil. Add onions, and cook 3 minutes to loosen skins. Drain, and cool slightly. Cut root ends from onions. Squeeze onions at stem end (onions will slip out of skins). If using frozen pearl onions, skip this step and simply defrost them.
Combine pearl onions, sherry, raisins, honey, water, butter and thyme in a heavy large skillet. Bring to a boil over medium-high heat. Cover, reduce heat to low, and simmer until liquid evaporates and onions begin to caramelize, stirring often, about 45 minutes. Season with salt and pepper.
Remove from heat and stir in almonds and vinegar. Add a few teaspoons of water if mixture is too dry. Serve warm.