18 min

Popular Python Time Series Packages

Published on December 5, 2020

This note lists Python libraries relevant to time series prediction. They are ranked by monthly downloads in the last 30 days, which is no guarantee of quality.

For some we've added a "hello" example in timeseries-notebooks to help you cut through the dozens of different conventions, and get straight to something like "predict the n'th number".  

Online (Incremental) Time Series Prediction

This includes some filtering packages where estimation might not be entirely incremental. 

  Downloads Hello? Remarks Discuss?
pykalman 81,857 notebook    
filterpy 25,004 notebook  no estimation  
control 22,053      
pydlm 18,766 notebook    
microprediction 8,686    api univariate  
simdkalman 8,173 notebook vectorized  
river 6,581 notebook formerly "creme"  
timecast 399      
proust 341      
onelearn 330      
state-space 91   symbolic derivs  
  The following are not packaged      
robust-kalman     github paper  

Time Series Prediction

Prediction focussed packages only, and some yet to be moved to other categories. If you have a suggestion for these lists, please file an issue.

  Downloads Hello? Remarks, examples Discuss?
fbprophet 769,124 notebook    
pmdarima 300,638 notebook    
hmmlearn 122,000      
stldecompose 65,607      
gluonts 23,459   paper paper  
cronston 22,459      
forecast 22,207   broken  
tbats 17,200      
timeseries 14,811      
pyflux 12,773 notebook    
ppscore 5,596      
pyculiar 5,031      
cesium 4,422      
neuralprophet 3,000 notebook new!  linkedin
pytorch-forecasting 3,372 notebook notebook almost done  
seglearn 3,100      
tsai 2,635      
skits 2,630      
autots 2,493   auto  
nitime 2,441      
time-series-predictor 2,021      
nbeats-keras 1,898   paper  post  c.f. nbeats-forecast, nbeats etc  
pytorchts 1,759   paper  
pydbm 1,700      
da-dapper 1,501      
autotime 1,360      
u8darts 1,355      
atspy 1,125      
tsmoothie 1,012      
causality 1,008   broken  
autotsf 1,000      
flood-forecast 1,000   a.k.a. flow-forecast  
anticipy 934      
arimafd 898      
pyCWT 739      
pyinform 744      
gendis 692      
cond-rnn 640      
thyus-timeseries 557      
scifin 573      
openseries 538      
autoregressive 488      
va-timeseries 465      
pyaf 460      
theano-lstm 430      
esrnn 417   paper  
firets 390      
darts 380      
time-series-generator 375   keras  
proust 341   online  
auto_ts 320 notebook    
tods 323      
pysf 269      
timeseries_fastai 274      
giotto-time 266      
pyFTS 263      
pandas-timeseries 214      
pycatchmod 269      
timecopts 199      
phased_lstm_keras 177      
u8timeseries 155      
nonlincausality 109   broken  
rnn 109      
tsf 103      
karas-on-lstm 90      
autoregression 80      
raptorarima 60      
pyda 59      
divinity 54 notebook    
  The following are not packaged on PyPI      
dcrnn     github  paper  
tensor-learning     github paper  multivariate, traffic  
lstnet     github paper lstm traffic  
dpsom     github paper clustering  
dilate     github  paper  
mtgnn     github paper graph NN  
dsanet     github paper transformer  
dts     github paper electricity  
deepglow     github paper  
dvmst-net     github paper  
forecastnet     github paper  
mlcnn-multivariate-time-series     github paper  
mlip_m5     github paper  
forgan     github paper  
gru_ode_bayes     github paper sporadic  
latent_ode     github paper irregular  
processsequenceprediction     github paper  
cycle_prediction     github doc arrival  

If I have left something obvious out, please add it to the timeseries by popularity column.  Download statistics can be misleading, of course, and I think we all know the better metric is how well they perform in real-time on live data. Don't forget that many algorithms on the leaderboards have code badges allowing you to click through to the implementation. 

General purpose analytic libraries such as scipy and statsmodels are not included, though it goes without saying the time series capabilities are popular. You'd be crazy not to consider the big ones, though here the download statistics are even less relevant as time series is only a small part of their capability. Another good list is at paperswithcode

Time Series inside Larger Packages

  Monthly downloads Notes
sklearn 2,157,986  
numpy 42,091,102  
scipy 14,107,552 scipy.stats etc
statsmodels 2,552,523 statsmodels.tsa
pandas 26,263,006  


Eye candy here.

  Downloads Hello ? Remarks, examples
tigramite 412 notebook gallery  paper 
misso 283    
pycute 88    


Eye candy here.

  Downloads Hello ? Discuss
copulas 184,467 gallery linkedin
copulabayesnet 553    
cvinemodel 371    
pycopula 296    
copulalib 272   broken?
copula 110    
copent 98    

If you have a suggestion for these lists, please file an issue.

Change-point Detection


  Downloads Hello? Remarks, examples Discuss
ruptures 559,553     paper
changefinder 15,899      
changepy 11,419      
bayesian-changepoint-detection 3,408      
changepoint_cython 475   from R changepoint  
bocd 138      
roufcp 138      
changepoint 109   paper  


Features, Outliers, Ensembles, Anomalies

If you have a suggestion for these lists, please file an issue.

  Downloads Hello ? Remarks, examples Discuss
tsfresh 168,000   features  
traces 39,432   irregular  
stationarizer 647      
mvtsdata_toolkit 600   bitbucket  
luminaire 500      
magi 480   dask  
changepoint_cython 475   from R changepoint  
bocd 138   change point  
roufcp 138   change point  
changepoint 109   paper  
pytsmp 47      
  The following are not on PyPI      
anomalyMulti     blog  

Classification, Motifs, Nearest Neighbors, Wavelets 

See also previous category and list of papers. If you have a suggestion for these lists, please file an issue.

  Downloads Hello ? Remarks, examples Discuss
tslearn 50,000      
stumpy 21,000  notebook post  
pyEDM 9,328      
sktime 8,864   paper classification  
matrixprofile 5,839      
pyts 2,584      
mcfly 658      
kymatio 482   wavelets  
knn-lbenhanced 56   paper  
  The following are not on PyPI      
rocket     paper  
os-cnn     paper  

Synthetic Time Series Generation

New category. Needs improvement. 

  Downloads Hello? Remarks, examples Discuss
deepecho 3,200 notebook new!  linkedin
timesynth 166      
tsBNgen 98 notebook paper  
data-generation 76      
  The following are not released on PyPI      
tsgan     ML-AIM Lab  
timegan     paper  

If you have a suggestion for these lists, please file an issue.


New category

  Downloads Hello ? Remarks, examples
pycausalimpact 11,032    
causallib 1,689    

Distribution Fitting

See also scipy, statsmodels etc

  Downloads Notes
tdigest 432,000 Online. See blog article. 
iminuit 25,122 Robust likelihood distributions
fitter 9,806  
powerlaw 6,128  
reliability 5,906 Censored

There's a bit of a fine line between distribution fitting packages and optimization. 

Derivative Free Global Optimization

Hyper-parameter optimization is inevitable. Here are some suggestions, limited to derivative-free methods although many can dive into local searches where you supply a Jacobian.  Please add more to this issue in the tuneup package. Some in the list below were compared in Comparing Python Global Optimizers and you can very marginally help this effort by yelling and screaming on Linked-in about it or joining discussions listed here, should you feel so inclined.

There's also a library discussed here that you might want to try in conjunction with these. It modifies the objective function, so is uncoupled from the optimizer itself.  Again, don't overlook the big guys like scipy.optimize, but I've added an asterisk if the library is part of a general purpose tool. 

  Downloads Benchmarked Notes
sklearn     sklearn.gaussian_process etc
hyperopt 525,297 benchmarked  
ray 246,120*   ray.tune
gpyopt 240,550   benchmarked soon
optuna 166,445 benchmarked  
bayesian-optimization 78,512   benchmarked soon
ax-platform 22,144*   benchmarked soon
swarmpackagepy 16,316    
nevergrad 8,486    
spotpy 7,477    
shgo n/a benchmarked scipy.optimize.sgho, and 
pymoo 3,241 benchmarked  
pysot 3,094 benchmarked surrogate
bolib 2,666    
swarmlib 2,130    
bayesianoptimization 1,921    
mealpy 1,615   meta
niapy 1,507   nature
bayeso 986    
pypesto 523    
mipego 521   mixed integer
pyriad 396   pytorch
pygpgo 390   bayes
platypus 321 benchmarked  
pysmac 221    
tgo 88   Supplanted by shgo which is reviewed.
  The following are not on PyPI    
spearmint     Murky license. Only github


Equities and crypto mostly 

  Downloads Notes  
backtrader 15,023 crypto  
prophet 10,872    
octobot 9,542    
jesse 5,012 crypto  
bt 4,563 fixed income  
vectorbt 4,192    
backtesting 4,182    
finlab-crypto 4,179    
zipline 4,178    
qtpylib 4,064    
rqalpha 2,260 chinese doc  
pyalgotrade 900    
zvt 900 chinese doc  
btrccts 880 crypto  
qstrader 426    
quant 280    
pinkfish 157    
quantdom 174    

If you have a suggestion for these lists, please file an issue.

Privacy Preservation for Time Series

New category

  The following are not deployed on PyPI  
pategan   paper

Notable But Not Exclusively for Time Series

Some potentially underestimated statistical libraries. 

  Downloads Remarks    
combo 86,774 emsembles    
suod 86,215 outliers    
pyod 85,000 outliers    
hyppo 3,400 multivariate hypothesis    
baycomp 3,300 classification evaluation    


To ensure articles like this are in your thread, or category updates here consider following microprediction on Linked-In. We're trying to make powerful bespoke AI free to the world, and you are welcome to contribute in large or small ways. If you have a suggestion for these lists, please file an issue.