Preheat oven to 350 degrees F. Grease a 9x5 inch loaf pan with nonstick cooking spray. Set aside.
In a large bowl, whisk together the flour, baking powder, baking soda, cinnamon, salt, nutmeg, ginger, and cloves.
In a medium bowl, whisk together the oil, brown sugar, granulated sugar, eggs, buttermilk, and vanilla extract. Stir in the shredded carrots and raisins, if using.
Add the liquid ingredients to the dry ingredients and stir until just combined. Do not over mix!
Spread the batter evenly into the prepared loaf pan. Place on the middle rack in the oven and bake for 45 to 60 minutes or until a toothpick inserted in the center comes out clean. Every oven is different so check early to make sure you don’t over bake. Mine takes about 50 minutes. If the top starts to brown too quickly, you can loosely cover the top with aluminum foil hallway through.
Remove from the oven and let the loaf cool in the pan for 15 minutes. Carefully remove the loaf from the pan and let cool completely on a wire rack.
While the loaf is cooling, make the cream cheese frosting. Use a stand mixer or hand mixer to beat the cream cheese, butter, confectioner’s sugar, vanilla and salt together on medium speed until smooth, about 1 minute.
Spread the frosting over the cooled bread. Sprinkle with chopped walnuts or pecans, if desired. Cut into thick slices and enjoy!