Fixes trading day generation logic in test source.

This uses more of @fawce's original logic from record_var branch.

TODO: Add unit test to ensure that this function generates only
market days.