===========================================================
Mlfin.py - Advance Machine Learning application in Finance
===========================================================
.. image:: https://img.shields.io/pypi/v/mlfinpy.svg
:target: https://pypi.python.org/pypi/mlfinpy
:alt: PyPI Version
.. image:: https://img.shields.io/pypi/pyversions/mlfinpy.svg
:target: https://pypi.python.org/pypi/mlfinpy
:alt: Python Versions
.. image:: https://img.shields.io/badge/Platforms-linux--64,win--64,osx--64-orange.svg?style=flat-square
:target: https://pypi.python.org/pypi/mlfinpy
:alt: Platforms
.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg
:target: https://pypi.python.org/pypi/mlfinpy
:alt: MIT License
.. image:: https://img.shields.io/github/actions/workflow/status/baobach/mlfinpy/main.yml
:target: https://github.com/baobach/mlfinpy
:alt: Build Status
.. image:: https://codecov.io/github/baobach/mlfinpy/coverage.svg?branch=main
:target: https://codecov.io/github/baobach/mlfinpy
:alt: Coverage
.. image:: https://readthedocs.org/projects/mlfinpy/badge/?version=latest
:target: https://mlfinpy.readthedocs.io/en/latest/?version=latest
:alt: Documentation Status
**MLfin.py** is an Advance Machine Learning toolbox for financial applications. The main ideas is using
proprietary works and code snippent by Dr. Marcos López de Prado to build a morden Pythonic package
that implements newest tech stacks from various libraries such as Numpy, Pandas, Numba, and Scikit-Learn.
This work inspired by the library `MlFinLab <https://github.com/hudson-and-thames/mlfinlab>`_ by
**Hudson and Thames**. Unfortunately, the library is closed-source and I believe in the power of open
source projects, it motivates me to build this package from ground up.
Leverage best practice in packaging Python library, morden documentation style and comprehensive examples,
**MLfin.py** will be the great tool for Quant Researchers, Algorithmic Traders, and Data Scientists as well as
Finance students to reproduce the complex data transformation, labeling, sampling and feature engineering
techniques with ease.
Installation
============
Installation can then be done via pip::
pip install mlfinpy
For the sake of best practice, it is good to do this with a dependency manager. I suggest you
set yourself up with `poetry <https://github.com/sdispater/poetry>`_, then within a new poetry project
run:
.. code-block:: text
poetry add mlfinpy
.. note::
If any of these methods don't work, please `raise an issue
<https://github.com/baobach/mlfinpy/issues>`_ with the ``packaging`` label on GitHub.
For developers
--------------
If you are planning on using Mlfinpy as a starting template for significant
modifications, it probably makes sense to clone the repository and to just use the
source code:
.. code-block:: text
git clone https://github.com/baobach/mlfinpy
Alternatively, if you still want the convenience of a global ``from mlfinpy import x``,
you should try:
.. code-block:: text
pip install -e git+https://github.com/baobach/mlfinpy.git
Work with HFT Data
==================
In reality, testing code snippets through the first 3 chapters of the book is challenging as it relies on HFT data to
create the new financial data structures. Sourcing the HFT data is very difficult and thus `TickData LLC`_ provides
the full history of S&P500 Emini futures tick data and available for purchase.
I am not affiliated with TickData in any way but would like to recommend others to make use of their service. The full
history costs $750 and is worth every penny. They have really done a great job at cleaning the data and providing
it in a user friendly manner.
.. _TickData LLC: https://www.tickdata.com/
Download Sources
----------------
TickData does offer about 20 days worth of raw tick data which can be sourced from their website `link`_.
For those of you interested in working with a two years of sample tick, volume, and dollar bars, it is provided for in
the `research repo`_. You should be able to work on a few implementations of the code with this set.
.. _link: https://s3-us-west-2.amazonaws.com/tick-data-s3/downloads/ES_Sample.zip
.. _research repo: https://github.com/hudson-and-thames/research/tree/master/Sample-Data
Searching for free tick data can be a challenging task. The following three sources may help:
1. `Dukascopy`_. Offers free historical tick data for some futures, though you do have to register.
2. Most crypto exchanges offer tick data but not historical (see `Binance API`_). So you'd have to run a script for a few days.
3. `Blog Post`_: How and why I got 75Gb of free foreign exchange “Tick” data.
.. _Dukascopy: https://www.dukascopy.com/swiss/english/marketwatch/historical/
.. _Binance API: https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md
.. _Blog Post: https://towardsdatascience.com/how-and-why-i-got-75gb-of-free-foreign-exchange-tick-data-9ca78f5fa26c
Project principles and design decisions
=======================================
- It should be easy to swap out individual components of each module
with the user's proprietary improvements.
- Usability is everything: it is better to be self-explanatory than consistent.
- The goal is creating a framework to build a robust and functional library for
machine learning applications.
- Everything that has been implemented should be tested and formatted with lattest
requirements.
- Inline documentation is good: dedicated (separate) documentation is better.
The two are not mutually exclusive.
- Formatting should never get in the way of good code: because of this,
I have deferred **all** formatting decisions to `Black
<https://github.com/ambv/black>`_, `Flake8
<https://github.com/PyCQA/flake8>`_, and `Isort
<https://github.com/PyCQA/isort>`_.
Credits
=======
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
Raw data
{
"_id": null,
"home_page": "https://github.com/baobach/mlfinpy",
"name": "mlfinpy",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": "finance, machine learning, algorithmic trading, quant, investing",
"author": "Robert Bach",
"author_email": "robert@quantfin.net",
"download_url": "https://files.pythonhosted.org/packages/30/ab/10305d10d44ce556fcc0aec66b27a6ca21e3f1f089d78e7e75535d30b1c3/mlfinpy-0.1.2.tar.gz",
"platform": null,
"description": "===========================================================\nMlfin.py - Advance Machine Learning application in Finance\n===========================================================\n\n.. image:: https://img.shields.io/pypi/v/mlfinpy.svg\n :target: https://pypi.python.org/pypi/mlfinpy\n :alt: PyPI Version\n\n\n.. image:: https://img.shields.io/pypi/pyversions/mlfinpy.svg\n :target: https://pypi.python.org/pypi/mlfinpy\n :alt: Python Versions\n\n\n.. image:: https://img.shields.io/badge/Platforms-linux--64,win--64,osx--64-orange.svg?style=flat-square\n :target: https://pypi.python.org/pypi/mlfinpy\n :alt: Platforms\n\n\n.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg\n :target: https://pypi.python.org/pypi/mlfinpy\n :alt: MIT License\n\n\n.. image:: https://img.shields.io/github/actions/workflow/status/baobach/mlfinpy/main.yml\n :target: https://github.com/baobach/mlfinpy\n :alt: Build Status\n\n\n.. image:: https://codecov.io/github/baobach/mlfinpy/coverage.svg?branch=main\n :target: https://codecov.io/github/baobach/mlfinpy\n :alt: Coverage\n\n\n.. image:: https://readthedocs.org/projects/mlfinpy/badge/?version=latest\n :target: https://mlfinpy.readthedocs.io/en/latest/?version=latest\n :alt: Documentation Status\n\n\n**MLfin.py** is an Advance Machine Learning toolbox for financial applications. The main ideas is using\nproprietary works and code snippent by Dr. Marcos L\u00f3pez de Prado to build a morden Pythonic package\nthat implements newest tech stacks from various libraries such as Numpy, Pandas, Numba, and Scikit-Learn.\nThis work inspired by the library `MlFinLab <https://github.com/hudson-and-thames/mlfinlab>`_ by\n**Hudson and Thames**. Unfortunately, the library is closed-source and I believe in the power of open\nsource projects, it motivates me to build this package from ground up.\n\nLeverage best practice in packaging Python library, morden documentation style and comprehensive examples,\n**MLfin.py** will be the great tool for Quant Researchers, Algorithmic Traders, and Data Scientists as well as\nFinance students to reproduce the complex data transformation, labeling, sampling and feature engineering\ntechniques with ease.\n\nInstallation\n============\nInstallation can then be done via pip::\n\n pip install mlfinpy\n\n\nFor the sake of best practice, it is good to do this with a dependency manager. I suggest you\nset yourself up with `poetry <https://github.com/sdispater/poetry>`_, then within a new poetry project\nrun:\n\n.. code-block:: text\n\n poetry add mlfinpy\n\n.. note::\n If any of these methods don't work, please `raise an issue\n <https://github.com/baobach/mlfinpy/issues>`_ with the ``packaging`` label on GitHub.\n\n\n\nFor developers\n--------------\n\nIf you are planning on using Mlfinpy as a starting template for significant\nmodifications, it probably makes sense to clone the repository and to just use the\nsource code:\n\n.. code-block:: text\n\n git clone https://github.com/baobach/mlfinpy\n\nAlternatively, if you still want the convenience of a global ``from mlfinpy import x``,\nyou should try:\n\n.. code-block:: text\n\n pip install -e git+https://github.com/baobach/mlfinpy.git\n\nWork with HFT Data\n==================\nIn reality, testing code snippets through the first 3 chapters of the book is challenging as it relies on HFT data to\ncreate the new financial data structures. Sourcing the HFT data is very difficult and thus `TickData LLC`_ provides\nthe full history of S&P500 Emini futures tick data and available for purchase.\n\nI am not affiliated with TickData in any way but would like to recommend others to make use of their service. The full\nhistory costs $750 and is worth every penny. They have really done a great job at cleaning the data and providing\nit in a user friendly manner.\n\n.. _TickData LLC: https://www.tickdata.com/\n\nDownload Sources\n----------------\n\nTickData does offer about 20 days worth of raw tick data which can be sourced from their website `link`_.\nFor those of you interested in working with a two years of sample tick, volume, and dollar bars, it is provided for in\nthe `research repo`_. You should be able to work on a few implementations of the code with this set.\n\n.. _link: https://s3-us-west-2.amazonaws.com/tick-data-s3/downloads/ES_Sample.zip\n.. _research repo: https://github.com/hudson-and-thames/research/tree/master/Sample-Data\n\nSearching for free tick data can be a challenging task. The following three sources may help:\n\n1. `Dukascopy`_. Offers free historical tick data for some futures, though you do have to register.\n2. Most crypto exchanges offer tick data but not historical (see `Binance API`_). So you'd have to run a script for a few days.\n3. `Blog Post`_: How and why I got 75Gb of free foreign exchange \u201cTick\u201d data.\n\n.. _Dukascopy: https://www.dukascopy.com/swiss/english/marketwatch/historical/\n.. _Binance API: https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md\n.. _Blog Post: https://towardsdatascience.com/how-and-why-i-got-75gb-of-free-foreign-exchange-tick-data-9ca78f5fa26c\n\nProject principles and design decisions\n=======================================\n\n- It should be easy to swap out individual components of each module\n with the user's proprietary improvements.\n- Usability is everything: it is better to be self-explanatory than consistent.\n- The goal is creating a framework to build a robust and functional library for\n machine learning applications.\n- Everything that has been implemented should be tested and formatted with lattest\n requirements.\n- Inline documentation is good: dedicated (separate) documentation is better.\n The two are not mutually exclusive.\n- Formatting should never get in the way of good code: because of this,\n I have deferred **all** formatting decisions to `Black\n <https://github.com/ambv/black>`_, `Flake8\n <https://github.com/PyCQA/flake8>`_, and `Isort\n <https://github.com/PyCQA/isort>`_.\n\nCredits\n=======\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Mlfin.py is an Advance Machine Learning toolbox for financial applications.",
"version": "0.1.2",
"project_urls": {
"Documentation": "https://mlfinpy.readthedocs.io/en/latest/",
"Homepage": "https://github.com/baobach/mlfinpy",
"Issues": "https://github.com/baobach/mlfinpy/issues",
"Personal website": "https://quantfin.net",
"Repository": "https://github.com/baobach/mlfinpy"
},
"split_keywords": [
"finance",
" machine learning",
" algorithmic trading",
" quant",
" investing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4fd009eb537055b76d7c429241dd3d731591e04d25f28745b9792131b587fb28",
"md5": "a3d96c06b4067163522458f6cb142c9e",
"sha256": "2e0237e0a5f693bb1c7e9758e52ec03033a4d24ecee1162899d8241d7340e3f2"
},
"downloads": -1,
"filename": "mlfinpy-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a3d96c06b4067163522458f6cb142c9e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 1357868,
"upload_time": "2024-10-09T12:28:14",
"upload_time_iso_8601": "2024-10-09T12:28:14.322192Z",
"url": "https://files.pythonhosted.org/packages/4f/d0/09eb537055b76d7c429241dd3d731591e04d25f28745b9792131b587fb28/mlfinpy-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "30ab10305d10d44ce556fcc0aec66b27a6ca21e3f1f089d78e7e75535d30b1c3",
"md5": "ab4de018a887ecf6d958e1b32f50f997",
"sha256": "33623528e720be86198d45bedcf994f87f35ae49517896a05ce2ab1e8cd00c0a"
},
"downloads": -1,
"filename": "mlfinpy-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "ab4de018a887ecf6d958e1b32f50f997",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 1139921,
"upload_time": "2024-10-09T12:28:15",
"upload_time_iso_8601": "2024-10-09T12:28:15.824981Z",
"url": "https://files.pythonhosted.org/packages/30/ab/10305d10d44ce556fcc0aec66b27a6ca21e3f1f089d78e7e75535d30b1c3/mlfinpy-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-09 12:28:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "baobach",
"github_project": "mlfinpy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "mlfinpy"
}