A numerical method for backward stochastic differential equations with applications in finance.