A modularized efficient framework for non-Markov time-series estimation