A unified quantitative framework for physical trading and derivatives