Code for quantitative trading