Preheat oven to 350°F (175°C).
Grease a 9x5-inch loaf pan or line it with parchment paper.
In a bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
In another bowl, mix oil, brown sugar, eggs, and vanilla until smooth.
Gradually fold the dry ingredients into the wet mixture until just combined.
Stir in grated carrots, walnuts, and raisins (if using).
Pour batter into the loaf pan and smooth the top.
Bake for 50-60 minutes or until a toothpick inserted comes out clean.
Let cool in the pan for 10 minutes, then transfer to a wire rack.
Slice once completely cooled.