Started to flesh out the trade logic.