Python Code for the article: Gaillardetz, P. and Essis-Breton, N., Valuation of the Premium Options for Flexible Premium Equity-Indexed Annuities, to appear.