Financial methods in Python