Add COMPARE and STAIR examples.

Fixed a bug in trader input.