Put the bird in a roasting tin and stuff the onion, halved if necessary, inside the chest cavity. Rub the five-spice powder all over its flesh. You need to massage it in rather than just sprinkling it over.
Put the duck into the hot oven, without any further oil or butter. It already has enough fat of its own. Let the duck roast for 35 minutes, then turn the heat down to 200˚C/Gas 6.
Score the skin of the apples around the middle (this is to stop them exploding in the oven). Remove the duck from the oven and carefully tip off as much of the fat as you can, leaving behind any interesting-looking juices.
Tuck the apples around the bird and return it to the oven for a further 30-45 minutes. Check from time to time to see how it is doing. If the skin appears to be getting a little too dark, then place a piece of foil over it.
Remove the duck from the oven, put it and the apples on a large plate somewhere warm (say in the switched-off oven). Empty out any excessive fat. Keep it for roasting potatoes.
Put the pan over a high heat then pour in the stock or cider. Leave to come to the boil, scraping at the pan-stickings as you go. Check for seasoning, then serve with duck and apples.