this will crash if the trade code is nil (which is a legitimate case)