added math functions and some tests. still need to finish valueAtRisk
calculation and more unit tests