A new method for generating approximation algorithms for financial mathematics applications