Hi everyone,

A group of my friends and I have been working hard on an open-source implementation for the research laid out in the textbook Advances in Financial Machine Learning by Marcos Lopez de Prado, called mlfinlab. We have recently released it to the PyPi index.

pip install mlfinlab

We hope that such a package will have uses in this community. I recently wrote a long-form blog article titled: A Laboratory for Machine Learning in Finance which lays out much of the work in depth.

The package is also available on Github:

  1. mlfinlab
  2. Research Notebooks
  3. Slide Show Presentaions & Reports

One of the great outcomes of this project was that we got to spend more time working on some of the great ideas laid out in the book. We spent a lot of time focused on meta-labeling and believe you will find that the results are promising.


  • Package based on the textbook: Advances in Financial Machine Learning
  • It specifically addresses the problems found in financial machine learning
  • The book has some barriers to entry, the package reduces this friction

Features at the moment:

  • Creating new financial data structures and sampling techniques with better statistical properties
  • Fixes some problems with futures trading by making use of the ETF trick
  • Provides a new labeling technique called the Triple Barrier Method (used in classification)
  • Introduces meta-labeling and how it can be used to filter out false positives
  • multiprocessing engine for speed

New features in the pipeline: