Recently I used Python to build a defined benefit (DB) pension simulator for Nicaragua’s social security system. It works as a software for Windows that allows users to simulate their future pension benefits under different scenarios. Take a look:
https://alvaroeconomia.blog/2018/01/21/simulador-calculadora-de-pensiones-para-nicaragua/
I have the formulas for 34 systems (DCs, CDs and mix) in Latin America and the Caribbean and I would share the code with partners willing to build such simulators for other LAC countries.