Functionals of Multidimensional Diffusions with Applications to Finance