Using must or ought to to express a past obligation
You ought to come yesterday.
You ought to have come yesterday. Or; You should have come yesterday.
In indirect speech use must and ought to as past tenses: He said he must do it. Don’t use must and ought to as past tenses To express a past duty (which wasn’t done) use the perfect infinitive without to after ought to or should, or expressions such as had to, was obliged to.