• Stars
    star
    221
  • Rank 179,773 (Top 4 %)
  • Language
    Python
  • License
    Other
  • Created almost 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This tool should help discover different patterns based on similarity measures in historical (financial) data

Stocks Pattern Analyzer

homepage

As I am not a a frontend guy, the client does not look good at all on mobile devices. This is the best I could do. Help is greatly appreciated.

Run it locally

Include ticker symbols with the symbols.txt file - put each symbol here in a new line. Check symbols.txt.example for an example use case.

There are 2 special symbols which you can use as a shortcut

  • $SP500 to include all S&P500 symbols
  • $CURRENCY_PAIRS to include currency pairs where the base currency is EUR

Build & Run with Docker

(Execute these in the root folder of the project)

# Build the image
$ docker build -t stock -f docker/Dockerfile .
# Run it
$ docker run --rm --name stock -v $(pwd):/code -p 8050:8050 stock start.sh

After this you can access it at localhost:8050

Disclaimer: in a proper setup you would create 2 different images, on for the RestAPI and one for the Client App. Then with a docker-compoase.yml you could create the services. But just like with Heroku, this is a toy and local deployment, so I won't do fancy stuff here.

Run directly

  • python rest_api.py
    • Wait until the data creation and search model creation is done (1-2 mins)
  • python dash_app.py
    • The environment variable $REST_API_URL controls the connection with the RestAPI. It should be the base URL
  • Enjoy 😎

Deployment to Heroku (toy deployment)

First of all, this is a mono-repo which is not ideal, but the deployment is just an example. This is why a multi-buildpack solution is used with heroku-community/multi-procfile.

$ heroku create stock-restapi --remote restapi
$ heroku buildpacks:add -a stock-restapi heroku/python
$ heroku buildpacks:add -a stock-restapi -i 1 heroku-community/multi-procfile
$ heroku config:set -a stock-restapi PROCFILE=Procfile_restapi
$ git push restapi master
$
$ heroku create stock-dash-client --remote dash
$ heroku buildpacks:add -a stock-dash-client heroku/python
$ heroku buildpacks:add -a stock-dash-client -i 1 heroku-community/multi-procfile
$ heroku config:set -a stock-dash-client PROCFILE=Procfile_dash
$ heroku config:set -a stock-dash-client REST_API_URL=https://stock-restapi.herokuapp.com --> this is the URL where we can reach the RestAPI
$ git push dash master

Heroku Files:

  • runtime.txt describes the Python version
  • Procfile_restapi Heroku Procfile for the RestAPI app
  • Procfile_dash Heroku Procfile for the Dash Client app

TODOs

  • Backend
    • Proper logging and getting rid of prints
    • RAM and Speed measurements for the different Search Models
  • Frontend
    • React frontend instead of the dash app

More Repositories

1

Color-Tracker

Color tracking with OpenCV
Python
166
star
2

whisper-live-transcription

Live-Transcription (STT) with Whisper PoC
Python
124
star
3

usage-tracker.nvim

NeoVim plugin with which you can track the time you spent on files, projects, repos, filetypes
Lua
91
star
4

SLE-GAN

Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis
Python
69
star
5

memento.nvim

A NeoVim plugin which remembers where you've been
Lua
62
star
6

YouTube-Live-Stream-Docker

Live stream from a USB webcam with your Raspberry Pi to Youtube
Python
59
star
7

Ridurre-Network-Filter-Pruning-Keras

Keras model convolutional filter pruning package
Python
44
star
8

Pdf-Split-Merge

simple pdf file split and merge tool
Python
44
star
9

CDCGAN-Keras

Conditional Deep Convolutional GAN
Jupyter Notebook
43
star
10

Neural-Network-Steganography

Hide some secret 😎 data in a Neural Network - text, malicious software or watermark your NN
Jupyter Notebook
41
star
11

Federated-Learning-Mini-Framework

Federated Learning mini-framework with Keras
Python
35
star
12

Dockerized-Microservice-Template

Microservice with Docker, Flask, Postgres, Nginx
Python
22
star
13

cryptoprice.nvim

NeoVim plugin with which you can check the price of your favourite cryptos
Lua
22
star
14

Home-Security

Home Security System with motion detector, what you can control from a website.
Python
22
star
15

Wakatime-Logger

"Extend" the Wakatime Free Plan so you won't loose your logged data!
Python
19
star
16

Emotion-Recognition

Emotion recognition from face
Python
17
star
17

Prometh-Review

AI Pull-Request Reviewer Companion (in the command line)
Python
13
star
18

Mad-Money-Backtesting

Backtesting recommendations from Mad Money and "The Cramer Effect/Bounce"
Jupyter Notebook
13
star
19

Simple-Console-Chat

Just a simple chat app written in python
Python
8
star
20

Face-Recognizer

Thesis: Face Recognizer
Python
8
star
21

Iris-Classification-with-Heroku

Iris classification problem deployed to Heroku
Python
7
star
22

ConsoleTRON

This is a simple local multiplayer TRON game running on the console window
C
6
star
23

Machine-Learning-Inference-With-GitHub-Actions

This repository demonstrated how you can use Github Actions to perform inference with your ML model
Jupyter Notebook
6
star
24

Straighten-Image

Straighten a rotated image with OpenCV and Java
Java
5
star
25

Neural-Network-Dreams

Learning an abstract representation of the word which is called the dream
Jupyter Notebook
5
star
26

OCR-libraries

Google Cloud Vision, Tesseract and Asprise OCR ibrary tests
Java
4
star
27

Barlow-Twins

Clean Tensorflow 2 Implementation of the Barlow Twins self-supervised learning method
Jupyter Notebook
4
star
28

Finger-Detection

Finger detection and counting with Matlab
MATLAB
4
star
29

Variational-Autoencoder

Variational-Autoencoder w/ Convolutional Layers
Jupyter Notebook
3
star
30

pyTRON

This is a tron game which you can play from the console
Python
3
star
31

Mini-Projects

My mini projects
Python
3
star
32

Swiss-Army-Tensorboard

A tool which helps you to release the true potential of Tensorboard
Python
3
star
33

Console-Car-Racer

Retro car racing game πŸš— πŸš™
Python
2
star
34

OnalloLaboratorium

This is my individual project for University - 2D local multiplayer
HTML
2
star
35

gptj-demo-restapi

Python
1
star
36

Colaboratory-Helper

Python
1
star
37

YouTube-Most-Replayed-Curve

Python
1
star
38

Somnium-Doctrina

Python
1
star