{"id":28504600,"url":"https://github.com/joachimhodana/quantex","last_synced_at":"2025-07-09T18:32:27.988Z","repository":{"id":181374313,"uuid":"666665905","full_name":"joachimhodana/quantex","owner":"joachimhodana","description":"Powerful trading signals bot, based on ChatGPT sentiment analysis of news headlines.","archived":false,"fork":false,"pushed_at":"2024-01-09T21:10:34.000Z","size":207,"stargazers_count":20,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-07-06T04:37:27.323Z","etag":null,"topics":["bot","chatgpt","python","scraper","sentiment-analysis","signals","trading","trading-bot"],"latest_commit_sha":null,"homepage":"https://t.me/quantex_signals","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joachimhodana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-15T06:57:27.000Z","updated_at":"2025-04-04T04:25:50.000Z","dependencies_parsed_at":"2024-01-09T22:30:50.141Z","dependency_job_id":"b68ad822-a3f1-47c3-8243-f6f325ff2353","html_url":"https://github.com/joachimhodana/quantex","commit_stats":null,"previous_names":["style77/quantex","joachimhodana/quantex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joachimhodana/quantex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joachimhodana%2Fquantex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joachimhodana%2Fquantex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joachimhodana%2Fquantex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joachimhodana%2Fquantex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joachimhodana","download_url":"https://codeload.github.com/joachimhodana/quantex/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joachimhodana%2Fquantex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502387,"owners_count":23618587,"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":["bot","chatgpt","python","scraper","sentiment-analysis","signals","trading","trading-bot"],"created_at":"2025-06-08T18:06:04.031Z","updated_at":"2025-07-09T18:32:27.941Z","avatar_url":"https://github.com/joachimhodana.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantex\n\nTake a look at running scrapper on [Telegram Channel](https://t.me/quantex_signals)\n\nPowerful trading bot, based on ChatGPT sentiment analysis of news headlines.\n\n## Motivation\n\nThe goal of this project is to create a trading bot that can make money on the stock market. The bot will be based on the sentiment analysis of news headlines. The sentiment analysis will be done by a [OpenAi's ChatGPT](https://chat.openai.com/) model that has been trained on a large corpus of data. The bot will use the sentiment analysis to predict the stock market and make trades accordingly. It is inspired by paper released by Alejandro Lopez-Lira and Yuehua Tang from University of Florida on april 6th 2023, named [\"Can ChatGPT Forecast Stock Price Movements? Return Predictability and Large Language Models\"](https://arxiv.org/pdf/2304.07619.pdf)\n\n## Installation\n\nQuantex uses [Docker](https://www.docker.com/) to run. To install Docker, follow the instructions on [Docker's website](https://docs.docker.com/get-docker/). For ease of use [Docker-compose](https://docs.docker.com/compose/) is also used. To install docker-compose, follow the instructions on [docker-compose's website](https://docs.docker.com/compose/install/).\n\nWhile development following tools are used:\n- [Visual Studio Code](https://code.visualstudio.com/)\n- [Git](https://git-scm.com/)\n- [GitFlow](https://github.com/petervanderdoes/gitflow-avh)\n\n- [Python 3.11](https://www.python.org/downloads/release/python-3110/)\n- [Poetry](https://python-poetry.org/docs/)\n\n- [PostgreSQL](https://www.postgresql.org/)\n- [FastAPI](https://fastapi.tiangolo.com/)\n- [SQLAlchemy](https://www.sqlalchemy.org/)\n\n- [Flake8](https://flake8.pycqa.org/en/latest/)\n- [Black](https://black.readthedocs.io/en/stable/)\n- [Mypy](https://mypy.readthedocs.io/en/stable/)\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [ESLint](https://eslint.org/)\n- [Next.js](https://nextjs.org/)\n- [Tailwind CSS](https://tailwindcss.com/)\n- [Prettier](https://prettier.io/)\n\nand many, many more awesome tools.\n\n# Setup\n\nTo setup the project, run the following commands:\n\n```bash\n# Clone the repository\ngit clone https://github.io/style77/quantex.git\n\n# Change directory to the project\ncd quantex\n\n```\n\nNow it depends on you, how would you want to run project.\n\n## Docker\n\nTo run project with docker, you need to have docker and docker compose installed. After that you can run the following command:\n\n**Development version**\n```bash\ndocker-compose -f deploy/docker-compose.yml -f deploy/docker-compose.dev.yml --project-directory . up --build \n```\n\n**Production version**\n```bash\ndocker-compose -f deploy/docker-compose.yml --project-directory . up --build \n```\n\n## Poetry\n\nTo run project with poetry, you need to have python 3.11 and poetry installed. After that you can run the following command:\n\n*Following commends will only run API, that anyway won't work without database - to run **only database** you can run `docker-compose -f deploy/docker-compose.services.yml --project-directory . up --build`*\n```bash\npoetry install\n```\n\n```bash\npoetry run python -m quantex\n```\n\n### PgAdmin\n\nTo access pgadmin, you need to start development version of docker compose. After that to get ip of the pgadmin dashboard, run the following command:\n\n```bash\ndocker inspect pgadmin_container  | grep IPAddress.\n```\n\nThe default email and password for pgadmin is `admin@admin.com root`.\nTo set up connection to the database, you need to create new server with the following details:\n\nconnection address: `quantex-db`\nport: `5432`\nusername: as specified in `.env` file\npassword: as specified in `.env` file\n\n## Migrations\n\nTo run migrations, you need to have python 3.11 and poetry installed. After that you can run the following command:\n\n```bash\npoetry run alembic upgrade head\n```\n\nto create new migration, you can run the following command:\n\n```bash\npoetry run alembic revision --autogenerate -m \"migration name\"\n```\n\nBefore that, it's recommended to change ip of the database in `.env` file to `0.0.0.0` (if you already got database running)\n\n## Chromedriver on ARM64\n\nRunning scraper on ARM64 is a bit tricky, because there is no official chromedriver for ARM64. \nLook at [#727](https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/727) and [#1072](https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1072) for more details.\n\nTo run scraper (on any arch) use following commands:\n\n```bash\n# Create new screen\nscreen -S scraper\n\n# Run scraper\npoetry run python -m quantex-scraper\n```\n\n# Details\n\nWhen you look at `.env.example` file you can see a lot of meaningless variables. In this section I want to explain them.\nFirst in general is that, why is that project so huge, when it could just be one file with scraper, and maybe Telegram bot, the reason for that is that I want to make this project as modular as possible, so that it can be easily extended in the future. That's why it does contain API, Database, frontend, docker etc. Also making your own fullstack project is great way to learn and showoff.\n\nEntire project structure is closed, which means that only getting access to the server will allow attacker to get access to all of the api keys, secrets etc.\nProject is called a \"bot\", however it doesn't have any specific bot functionality, that's because it's bot for sending signals, not really trading bot. In future I might add trading bot functionality, but for now it's just a free signal bot.\n\n### QUANTEX_INVESTMENT_HORIZON\nIf you look at the code, you can see that we are saving both short term and long term investment explanation, why is that variable then specified in `.env` file? Well, the reason is that we are then posting the results to Telegram channel, and posting all of the results would be too much. So we are posting only the results that are in the investment horizon specified in `.env` file. That way we can post only the results that are relevant to the channel.\n\n# License\n\nThis project is licensed under the terms of the GNU GPLv3 license.\n\n# Contributing\n\nIf you want to contribute to this project, please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n# Authors\n\n- **[Joachim Hodana](github.com/style77)** - _Initial work_ - [Quantex](github.com/style77/quantex)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoachimhodana%2Fquantex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoachimhodana%2Fquantex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoachimhodana%2Fquantex/lists"}