To begin, generously season the duck legs with salt and pepper and leave for 10–15 minutes to come to room temperature
Heat the oil in a large, heavy-based casserole and add the legs, skin-side down. Keep the heat on medium-high and brown the legs, rendering the fat for about 15 minutes, decanting as much fat as possible halfway through and adjusting the heat so that the skin crisps and browns but does not burn. Once they are a lovely golden colour, transfer them to a plate. You should have about 4 tbsp duck fat in the pan
Add the onion, reduce the heat to medium and sweat gently for 5 minutes before adding the carrots, fennel and garlic. Season generously and allow the vegetables to soften in the fat for about 10 minutes, stirring occasionally
Now add the herbs, spices, tomatoes, sherry and stock and cook for about 5 minutes, breaking up the tomatoes with a wooden spoon and bringing everything up to a gentle simmer
Return the duck legs, along with any juices, back to the casserole and add a lid, slightly askew to allow some gentle evaporation of the sauce
Stew very gently over low heat, so that the sauce is barely bubbling, for about 1 1/2 hours or until the duck meat is tender and falls away from the bone
About 10 minutes before the end of cooking, stir in the jalapeños, capers and olives. Check and adjust the seasoning and serve with brown basmati rice and some sautéed greens