Hi Raghav; I suggest forecast package's code if you can read R [*]. A collection of measures related to time-series forecasting would be nice [*] Best, Mehmet [*] https://cran.r-project.org/web/packages/forecast/forecast.pdf