{"id":16359321,"url":"https://github.com/gaborvecsei/stocks-pattern-analyzer","last_synced_at":"2025-04-09T09:07:39.890Z","repository":{"id":43339589,"uuid":"330409300","full_name":"gaborvecsei/Stocks-Pattern-Analyzer","owner":"gaborvecsei","description":"This tool should help discover different patterns based on similarity measures in historical (financial) data","archived":false,"fork":false,"pushed_at":"2023-06-20T05:30:34.000Z","size":1179,"stargazers_count":234,"open_issues_count":3,"forks_count":83,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-02T05:09:06.350Z","etag":null,"topics":["finance","forecasting","hacktoberfest2021","heroku","restapi","similarity-search","stock-data","stock-market","stock-price-prediction","stocks","stocks-pattern-analyzer","timeserie-indexing","timeseries","timeseries-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaborvecsei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-17T14:27:08.000Z","updated_at":"2025-03-26T06:29:44.000Z","dependencies_parsed_at":"2023-09-25T03:52:49.574Z","dependency_job_id":null,"html_url":"https://github.com/gaborvecsei/Stocks-Pattern-Analyzer","commit_stats":{"total_commits":53,"total_committers":2,"mean_commits":26.5,"dds":"0.018867924528301883","last_synced_commit":"72ebded1862419c8c65a95f4d6c8277b9b693143"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaborvecsei%2FStocks-Pattern-Analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaborvecsei%2FStocks-Pattern-Analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaborvecsei%2FStocks-Pattern-Analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaborvecsei%2FStocks-Pattern-Analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaborvecsei","download_url":"https://codeload.github.com/gaborvecsei/Stocks-Pattern-Analyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","forecasting","hacktoberfest2021","heroku","restapi","similarity-search","stock-data","stock-market","stock-price-prediction","stocks","stocks-pattern-analyzer","timeserie-indexing","timeseries","timeseries-analysis"],"created_at":"2024-10-11T02:08:05.393Z","updated_at":"2025-04-09T09:07:39.867Z","avatar_url":"https://github.com/gaborvecsei.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stocks Pattern Analyzer\n\n\u003cimg src=\"art/homepage.png\" width=\"800\" alt=\"homepage\"\u003e\u003c/a\u003e\n\n\u003e *As I am not a a frontend guy, the client does not look good at all on mobile devices.\nThis is the best I could do. Help is greatly appreciated.*\n\n## Run it locally\n\nInclude ticker symbols with the `symbols.txt` file - put each symbol here in a new line. Check `symbols.txt.example` for\nan example use case.\n\nThere are 2 special symbols which you can use as a shortcut\n- `$SP500` to include all S\u0026P500 symbols\n- `$CURRENCY_PAIRS` to include currency pairs where the base currency is EUR\n\n### Build \u0026 Run with Docker\n\n(Execute these in the root folder of the project)\n\n```shell script\n# Build the image\n$ docker build -t stock -f docker/Dockerfile .\n# Run it\n$ docker run --rm --name stock -v $(pwd):/code -p 8050:8050 stock start.sh\n```\n\nAfter this you can access it at `localhost:8050`\n\n\u003e *Disclaimer*: in a proper setup you would create 2 different images, on for the RestAPI and one for the Client App.\nThen with a `docker-compoase.yml` you could create the services. But just like with Heroku, this is a toy and local\ndeployment, so I won't do fancy stuff here. \n\n### Run directly\n\n- `python rest_api.py`\n    - Wait until the data creation and search model creation is done (1-2 mins)\n- `python dash_app.py`\n    - The environment variable `$REST_API_URL` controls the connection with the RestAPI. It should be the base URL\n- Enjoy :sunglasses:\n\n## Deployment to Heroku (toy deployment)\n\nFirst of all, this is a mono-repo which is not ideal, but the deployment is just an example.\nThis is why a multi-buildpack solution is used with `heroku-community/multi-procfile`.\n\n```shell script\n$ heroku create stock-restapi --remote restapi\n$ heroku buildpacks:add -a stock-restapi heroku/python\n$ heroku buildpacks:add -a stock-restapi -i 1 heroku-community/multi-procfile\n$ heroku config:set -a stock-restapi PROCFILE=Procfile_restapi\n$ git push restapi master\n$\n$ heroku create stock-dash-client --remote dash\n$ heroku buildpacks:add -a stock-dash-client heroku/python\n$ heroku buildpacks:add -a stock-dash-client -i 1 heroku-community/multi-procfile\n$ heroku config:set -a stock-dash-client PROCFILE=Procfile_dash\n$ heroku config:set -a stock-dash-client REST_API_URL=https://stock-restapi.herokuapp.com --\u003e this is the URL where we can reach the RestAPI\n$ git push dash master\n```\n\nHeroku Files:\n- `runtime.txt` describes the Python version\n- `Procfile_restapi` Heroku Procfile for the RestAPI app \n- `Procfile_dash` Heroku Procfile for the Dash Client app \n\n## TODOs\n\n- Backend\n    - Proper logging and getting rid of `print`s\n    - RAM and Speed measurements for the different Search Models\n- Frontend\n    - React frontend instead of the dash app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaborvecsei%2Fstocks-pattern-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaborvecsei%2Fstocks-pattern-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaborvecsei%2Fstocks-pattern-analyzer/lists"}