fix the last trading day bug