Code written while learning QuantLib