A python UWSGI server for availing stock predictions to external clients. It contains two submodules that generate stock price predictions: StockMl - Predictions based on historical data, Sentiment Analysis - Prediction based on market confidence in publications.
- API address: http://45.63.97.7:9090
- Predictions endpoint: /predictions
- Angular dashboard: Angular dashboard showing predictions
- Motivation
- Built With
- Submodules
- Code Example
- Prerequisites
- Installation
- Tests
- Deployment
- Contributions
- Bug / Feature Request
- Authors
- License
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.8 - The programming language used.
- Pytest - The testing framework used.
- StockML - Implementation of various machine learning algorithms in the prediction of Kenya's stock market performance.
- SentimentAnalysisStockML - Implementation of various machine learning algorithms in the prediction of Kenya's stock market performance.
def application(env, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
return [b'Hello World!']
What things you need to install the software and how to install them
- python 3
Linux:
sudo apt-get install python3.8
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 while updating submodules:
git clone --recurse-submodules https://github.com/SpencerOfwiti/Stock-API
To set up virtual environment and install dependencies:
source setup.sh
To run web server:
uwsgi --http :9090 --wsgi-file server.py
To update submodules:
git submodule update --remote <submodule_name>
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.
This project is licensed under the GNU General Public License V3.0 - see the LICENSE.md file for details