Installation¶
FinOL is available on PyPI,
we recommend to install FinOL via pip:
$ pip install --upgrade finol
You can also install the development version of FinOL
from master branch of Git repository:
$ pip install git+https://github.com/jiahaoli57/finol.git
Install ta-lib dependency¶
ta-lib is an open-source technical indicator library for financial applications, and unlike other dependencies,
this library is not a mandatory requirement for the basic operation of FinOL.
It is specifically utilized when advanced data processing and analysis are required to enhance the model’s capabilities.
Follow the steps below based on your operating system to install ta-lib:
Hint
For users using Anaconda, it is highly recommended to prioritize installing ta-lib using conda, as conda installation is very convenient.
Try installing ta-lib via pip first
$ pip install TA-Lib
If an error occurs, then install package corresponding to your Python manually from the talib whl collection website
Python Version |
ta-lib WHL File |
|---|---|
3.6 |
TA_Lib-0.4.28-cp36-cp36m-win_amd64.whl |
3.7 |
TA_Lib-0.4.28-cp37-cp37m-win_amd64.whl |
3.8 |
TA_Lib-0.4.28-cp38-cp38-win_amd64.whl |
3.9 |
TA_Lib-0.4.28-cp39-cp39-win_amd64.whl |
3.10 |
TA_Lib-0.4.28-cp310-cp310-win_amd64.whl |
3.11 |
TA_Lib-0.4.28-cp311-cp311-win_amd64.whl |
3.12 |
TA_Lib-0.4.28-cp312-cp312-win_amd64.whl |
For example, with Python 3.10 and the whl file downloaded to the local path C:\Users\John\Downloads. After downloading the whl file, all you need to do is run the following command:
$ pip install C:\Users\John\Downloads\TA_Lib-0.4.28-cp310-cp310-win_amd64.whl
To verify if the installation is successful, run:
$ python -c "import talib; print(talib.__version__)"
If the installation is successful, it should output the current version of ta-lib without any errors.
Try installing ta-lib via pip first
$ pip install TA-Lib
If an error occurs, manually compile and install ta-lib from source:
$ wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
$ tar xvzf ta-lib-0.4.0-src.tar.gz
$ cd ta-lib/
$ ./configure --prefix=/usr
If you encounter an error like configure: error: no acceptable C compiler found in $PATH, install a C compiler using the appropriate command for your Linux distribution:
- Ubuntu / Debian:
$ sudo apt update $ sudo apt install build-essential
- Fedora:
$ sudo dnf groupinstall 'Development Tools'
- CentOS / RHEL:
$ sudo yum groupinstall 'Development Tools'
- Arch Linux:
$ sudo pacman -S base-devel
- openSUSE:
$ sudo zypper install -t pattern devel_C_C++
Then continue with:
$ make
$ sudo make install
$ cd ..
$ pip install TA-Lib
To verify if the installation is successful, run:
$ python -c "import talib; print(talib.__version__)"
If the installation is successful, it should output the current version of ta-lib without any errors.
Todo
Will be completed later.
If you are using Anaconda, installation becomes very simple at this point. With just one line of command, you can complete the installation on 64-bit Windows, Linux and Mac OSX systems, including Macs with Apple M1/M2 chips using the Arm architecture:
$ conda install -c conda-forge ta-lib -y
To verify if the installation is successful, run:
$ python -c "import talib; print(talib.__version__)"
If the installation is successful, it should output the current version of ta-lib without any errors.
Install mplfinance dependency¶
FinOL relies on the mplfinance library for converting data into images suitable for model input.
Please note that the mplfinance is not an essential dependency for the basic functionality of FinOL.
It is specifically required for the optional task of extracting image representations of the data.
If image-based OLPS tasks are desired, mplfinance can be employed to enhance the model’s ability to
identify complex patterns and trends within the financial data.
However, this step is not mandatory for most models of the FinOL.
Follow the steps to install mplfinance:
$ pip install mplfinance
To verify if the installation is successful, run:
$ python -c "import mplfinance as mpf; print(mpf.__version__)"
If the installation is successful, it should output the current version of mpf without any errors.