This collection respresents a set codes aiding my learning of core fianancial engineering concepts and AI algorithms developed to be applied in a financial context. This repo contains codes for time series analysis, the Holt-winters explonential smoothing models, ARIMA and SARIMA, time series forecasting, time series forecasting, portofolio optimisation and the CAPM algorithm, algorithmic trading, statistical factor models, regime detection with hidden Markov models and reinforcement (Q-)learning.
These codes are inspired by a course created by the Lazy Programmer. More information can be found at these two links:
https://deeplearningcourses.com/c/ai-finance
https://www.udemy.com/course/ai-finance/
In order to install the packaged, the user will require the presence of Python3 and the pip3 installer.
For installation on Linux or OSX, use the following commands. This will create an environment and automatically install all the requirements.
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools wheel
pip install -e .
Alternativelly, run the setup.sh file as follows:
./setup.sh
If using a conda environment, use the following steps and the provided requirements.txt file (similar to setup.py):
conda create -y --name AIforFinancialEngineering python=3.9.7
conda activate AIforFinancialEngineering
pip install --upgrade pip setuptools wheel
conda install --force-reinstall -y --name AIforFinancialEngineering -c conda-forge --file requirements.txt
In order to run the solver, type the following commands int the activated python environment.
python file_name.py
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.