Got rid of deprecated warning message for raise_error
Refactor latest_market to current_market