Preheat and Prepare: Begin by preheating your oven to 350°F (177°C). Lightly grease a 9×5-inch loaf pan with butter or nonstick spray, then line it with parchment paper, allowing some overhang for easy removal later.
Mix Dry Ingredients: In a medium bowl, whisk together the flour, baking powder, and salt. This ensures an even distribution of leavening and flavor throughout the batter. Set aside.
Cream Butter and Sugar: In a large mixing bowl, using a hand mixer or stand mixer fitted with the paddle attachment, beat the softened butter and sugar on high speed for about 1 minute, or until light and fluffy. Scrape down the sides and bottom of the bowl.
Add Eggs and Flavorings: Reduce the mixer speed to low. Add the eggs one at a time, mixing just until incorporated after each addition. Then add the sour cream, vanilla extract, and almond extract. Increase the speed to medium-high and beat until the mixture is smooth. Scrape the bowl again.
Combine Wet and Dry Mixtures: With the mixer on low speed, slowly add the dry flour mixture to the wet batter. Mix only until the flour disappears. Avoid overmixing to keep the cake tender.
Create the Raspberry Swirl Mixture: Spoon about 1/2 cup of the batter into a small bowl and stir in the raspberry jam until fully combined. This trick helps prevent the jam from sinking to the bottom during baking.
Assemble the Cake: Spoon roughly two-thirds of the plain batter into the prepared loaf pan and spread it evenly. Layer all of the raspberry batter over it. Finish with the remaining plain batter. Use a thin knife to gently swirl the layers together in a figure-eight motion. A few swirls are enough for a beautiful marbled look.
Bake: Place in the preheated oven and bake for 55 to 70 minutes. Around the 30-minute mark, loosely cover the top with foil to prevent excessive browning. The cake is done when a toothpick inserted in the center comes out mostly clean.
Cool: Remove the cake from the oven and let it cool in the pan for about 15 minutes. Then lift it out using the parchment paper and transfer it to a wire rack to cool completely before icing or slicing.
Optional Icing and Serve: Once cooled, drizzle with lemon or vanilla icing if desired. Slice and serve!