Preheat the oven to 350 degrees. Butter and flour a loaf pan.
Melt the butter in a large skillet over medium heat. Toss the apples and stir to coat them with the butter. Add the lemon juice and the apple cider. Cook until the apples have softened and the cider has reduced by half. Transfer the apple mixture to a food processor and pulse into a coarse paste. Reserve.
In a large mixing bowl combine the flour, cinnamon, baking soda, nutmeg, both of the sugars and a pinch of salt. Make a well in the dry ingredients and add he pureed apples, the egg, and vanilla. Stir to combine. Toss in the walnuts and raisins.
Pour the batter in the loaf pan and bake 40 to 45 minutes or until a toothpick comes out clean.
Let the cake cool 10 minutes. Remove the cake from the pan and cool completely. Cut the cake in half lengthwise.
To prepare the icing:.
In a mixing bowl, beat all the ingredients. Spread a 1/3 of the icing on one half of the cake. Top with the other half of cake. Spread remaining icing over the top of the cake.