Need help with finance_ml?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

jjakimoto
372 Stars 148 Forks MIT License 32 Commits 3 Opened issues

Description

Advances in Financial Machine Learning

Services available

!
?

Need anything else?

Contributors list

# 183,506
Python
Jupyter...
27 commits

finance_ml

Python implementations of Machine Learning helper functions for Quantiative Finance based on books, Advances in Financial Machine Learning and Machine Learning for Asset Managers , written by

Marcos Lopez de Prado
.

Installation

Excute the following command

python
python setup.py install

or

Simply add

your/path/to/finace_ml
to your PYTHONPATH.

Implementation

The following functions are implemented: * Labeling * Multiporcessing * Sampling * Feature Selection * Asset Allcation * Breakout Detection

Examples

Some of example notebooks are found under the folder

MLAssetManagers
.

multiprocessing

Parallel computing using

multiprocessing
library. Here is the example of applying function to each element with parallelization. ```python import pandas as pd import numpy as np

def apply_func(x): return x ** 2

def func(df, timestamps, f): df_ = df.loc[timestamps] for idx, x in df.items(): df.loc[idx] = f(x) return df_

df = pd.Series(np.random.randn(10000)) from financeml.multiprocessing import mppandas_obj

results = mppandasobj(func, pdobj=('timestamps', df.index), numthreads=24, df=df, f=apply_func) print(results.head())

Output:
0 0.449278 1 1.411846 2 0.157630 3 4.949410 4 0.601459 ```

For more detail, please refer to example notebook!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.