Implementation of stock market price prediction of various Kenyan companies' shares including Safaricom e.t.c. It utilizes various Machine Learning algorithms such as Long Short Term Memory(LSTM), Prophet and Auto-Regressive Intergrated Moving Average(ARIMA). It bases it's analysis on historical trading data dating back more than five years.
- Motivation
- Build Status
- Built With
- Features
- Code Example
- Prerequisites
- Installation
- Tests
- Deployment
- Contributions
- Bug / Feature Request
- Authors
- License
- Acknowledgements
- Reports
This project was born out of the need to make financial literacy and investment options available for the common citizen. Over the years the number of individuals investing in the Kenyan Securities Market has reduced. More and more of the trading is being done by investment companies and wealthy investors. This provides a platform to lower the barriers to entry for everyone keen on investing in the securities market. It provides daily predictions on the stock price for the next day and an overview of what to expect in the coming week.
- Python 3.6 - The programming language used.
- Pytest - The testing framework used.
- Travis CI - CI-CD tool used.
- Aggregate daily stock closing price.
- Exploration and cleaning of companies' stock prices data.
- Application of machine learning algorithms in stock price prediction.
- Visualization of stock price predictions.
def check_null_values(data):
"""
check if processed data has no null variables
:param data:
:return:
"""
return data.isnull().sum().sum()
print(check_null_values(data))
What things you need to install the software and how to install them
- python 3
Linux:
sudo apt-get install python3.6
Windows:
Download from python.org
Mac OS:
brew install python3
- pip
Linux and Mac OS:
pip install -U pip
Windows:
python -m pip install -U pip
Clone this repository:
git clone https://github.com/SpencerOfwiti/stock-ml
To set up virtual environment and install dependencies:
source setup.sh
To set up project path:
source .env
To run python scripts:
python src/data/make_dataset.py
This system uses pytest to run automated tests.
To run automated tests:
pytest
Add additional notes about how to deploy this on a live system
To contribute, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
Alternatively see the GitHub documentation on creating a pull request.
If you find a bug (the website couldn't handle the query and / or gave undesired results), kindly open an issue here by including your search query and the expected result.
If you'd like to request a new function, feel free to do so by opening an issue here. Please include sample queries and their corresponding results.
- Spencer Ofwiti - Initial work
See also the list of contributors who participated in this project.
- Kelvin Minjire - Contributor
- Kevin Wachira - Contributor
This project is licensed under the GNU General Public License V3.0 - see the LICENSE.md file for details
- Investing.com from where the data was sourced.