Stoink for Stock Price Prediction is a system that uses deep learning LSTM model to predict the price increase or decrease of one or more stocks for the next three months.
The client aims to present the option of using our model to predict what the increase or decrease in percentage is going to be of a certain stock or multiple stocks.
AlphaVantage API : AlphaVantage provides data from fundamental data to technical indicators. The system is not only based the learning algorithm on the listing/opening/closing prices, but to go deeper by using the fundamental data provided by AlphaVantage. By using the fundamental data of companies we will be able to read data such as what assets the company has and their investments, their inventory and liabilities and the cash flow of the company and the earnings etc. The free API version is limited to 5 requests per minute and 500 total per day.
Numpy, Matplotlib, Tensorflow , Keras , Pandas, Scikit-learn
- Python
- Django
- Bootstrap3
- HTML
- CSS
- LSTM
-
1. Install Anaconda(Recommended) Install Anaconda that matches your system via Anaconda webpage Install ML packages either use Anaconda Navigator or conda via terminal:
(base)$ conda install numpy scipy matplotlib scikit-learn pandas
-
2. Install Django and SQLite Install pip3 via following command:
(base)$ pip3 install django
-
3. Run server Ensure that you are in
client
directory and run the following command:python manage.py runserver
then open it with Chrome browser: http://127.0.0.1:8000/ Or runpython manage.py runserver 8080
, then open it with Chrome browser: http://127.0.0.1:8080/ if you haveYou're accessing the development server over HTTPS, but it only supports HTTP.
issue with 8000 port.
- 1. Build and run
docker build -t <repoName>/<imageName>:<tagName> . # Build image with Tag
docker run -it -p <port:port> <image>:[Tag] # Check if it works
docker tag samgun6/stoink:<Tag> samgun6/stoink:latest # Tag same image with latest
docker push --all-tags samgun6/stoink # Push all tags for selected image to docker hub
- 2. Open browser and head to "http://localhost:8000/"
Prerequisites
- 1. Kubernetes
- 2. Minikube
- 3. Docker
-
Start fresh with minikube
-
1. Build and push latest docker image
-
2. Start/ reset minikube
minikube delete # Only needed when starting fresh
minikube start
- 3. Apply deployments
cd kubernetes
kubectl apply -f stoink-job.yaml
kubectl apply -f stoink-service.yaml
kubectl apply -f stoink-deploy.yaml
-
4. Update deployment
-
- Build and push latest docker image
-
- Start minikube
minikube start
-
5. Reapply deployment file
kubectl get deployments # Shows current deployment kubectl get pods # Shows current pods # Change version in stoink-deploy.yaml kubectl apply -f stoink-deploy.yaml
Or
kubectl set image deployment <deployment name> <container name>=<repo/image>:<new tag> kubectl set image deployment stoink-deploy stoink=samgun6/stoink:v1.2.0 # Example
-
6. Run service
minikube service stoink-service
-
7. Check deployment
minikube dashboard # In browser # or in terminal kubectl get pods kubectl get deployments