Fix typo in context variable

issue3860
review5231002
Add test for forecast calculation

issue3860
review5231002