Awesome Open Source
Awesome Open Source


|badge_pypi| |badge_build| |badge_docs| |badge_downloads|

AlphaPy is a machine learning framework for both speculators and data scientists. It is written in Python mainly with the scikit-learn and pandas libraries, as well as many other helpful packages for feature engineering and visualization. Here are just some of the things you can do with AlphaPy:

  • Run machine learning models using scikit-learn, Keras, xgboost, LightGBM, and CatBoost.
  • Generate blended or stacked ensembles.
  • Create models for analyzing the markets with MarketFlow.
  • Predict sporting events with SportFlow.
  • Develop trading systems and analyze portfolios using MarketFlow and Quantopian's pyfolio.

.. image:: :width: 100% :alt: AlphaPy Model Pipeline :align: center



You should already have pip, Python, and optionally XGBoost, LightGBM, and CatBoost installed on your system (see below). Run the following command to install AlphaPy::

pip install -U alphapy


Pyfolio is automatically installed by AlphaPy, but if you encounter
the following error when trying to create a tear sheet:

    *AttributeError: 'numpy.int64' object has no attribute 'to_pydatetime'*

Install pyfolio with this command:

    pip install git+


For Mac and Windows users, XGBoost will not install automatically with pip. For instructions to install XGBoost on your specific platform, go to


For instructions to install LightGBM on your specific
platform, go to


For instructions to install CatBoost on your specific platform, go to


.. image:: :width: 100% :alt: MarketFlow Model :align: center

.. image:: :width: 100% :alt: MarketFlow System :align: center


.. image:: :width: 100% :alt: SportFlow :align: center


The official channel for support is to open an issue on Github.

Follow us on Twitter:


If you like the software, please donate:

.. |badge_pypi| image:: .. |badge_build| image:: .. |badge_docs| image:: .. |badge_downloads| image::

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (55,543
deep-learning (4,081
machine-learning (3,740
tensorflow (2,186
data-science (924
keras (780
cryptocurrency (527
classification (286
pandas (267
trading (233
scikit-learn (213
portfolio (149
regression (119
trading-strategies (86
stocks (55
time-series-analysis (46
trading-platform (44
sports (33