added a client side statistical code to deal with ratio calculations, betas, correlations and clean time series