In the bowl of a stand mixer fitted with the paddle attachment, or using a hand mixer, cream the butter and sugar together until light and fluffy.
Add the eggs slowly in several additions, beating well after each addition until fully incorporated before adding more.
Add the almond flour and cornstarch and mix until well combined and smooth.
Add the rum, if using, and mix until just combined.
Use immediately or transfer to an airtight container and refrigerate. Frangipane must be baked before eating.
Video
Notes
Yield: Makes 1 quart, enough to fill one 9-inch tart shell. Doneness Cue: The filling will puff slightly, turn golden on top, and feel set when the center is pressed lightly. A toothpick inserted into the center should come out with just a few moist crumbs, not wet batter. Storage: Store in an airtight container in the refrigerator for up to 7 days. Frangipane does not freeze well once made, as the emulsion can break when thawed and the texture becomes grainy after baking. Make Ahead: This recipe can be made up to 7 days in advance and kept refrigerated. Let it sit at room temperature for 10 to 15 minutes before using so it is spreadable.