1. With a sharp pairing knife, cut a small x shape into the rounded side of each chestnut shell. Toss the chestnuts in a large bowl with a drizzle of olive oil until lightly coated.
2. Heat a large saute pan over medium heat and add the chestnuts. Cook, stirring the chestnuts occasionally to prevent them from burning, about 10 minutes. Add 1/2 cup water to the pan and cover. Lower the heat and allow the chestnuts to steam for 15 to 20 minutes, until they are quite tender and more of the water has evaporated from the pan. Remove the chestnuts and allow them to cook until they can be handled comfortably.
3. Peel the chestnuts; the shells and skins should be easy to pull off. Heat the same pan over medium-high heat and lightly coat the bottom of the pan with olive oil. Add the leeks and fennel, and saute until the vegetables are golden brown, about 10 minutes. Add teh stock, peeld chestnuts, the raisins, and salt and pepper to taste. Cover the pan and lower the heat to a simmer. Simmer the chestnuts until they are tender and the liquid has reduced to a glaze, about 20 minutes. Add the thyme and adjust seasoning to taste with salt and pepper.