Python financial functions