{"id":18369934,"url":"https://github.com/cawfree/crypto-lstm-3","last_synced_at":"2025-10-28T19:46:24.670Z","repository":{"id":88543435,"uuid":"249254294","full_name":"cawfree/crypto-lstm-3","owner":"cawfree","description":"💵 Using word2vec to predict trends in cryptocurrency.","archived":false,"fork":false,"pushed_at":"2020-04-12T00:13:14.000Z","size":334,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T04:41:43.835Z","etag":null,"topics":["bitcoin","cryptocurrency","deep-learning","lstm","network","neural","prediction","tensorflow","twitter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cawfree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2020-03-22T19:12:06.000Z","updated_at":"2023-03-22T18:47:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"63919992-f7ab-485a-a2db-a9837c0834a8","html_url":"https://github.com/cawfree/crypto-lstm-3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Fcrypto-lstm-3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Fcrypto-lstm-3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Fcrypto-lstm-3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Fcrypto-lstm-3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cawfree","download_url":"https://codeload.github.com/cawfree/crypto-lstm-3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531379,"owners_count":20953943,"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":["bitcoin","cryptocurrency","deep-learning","lstm","network","neural","prediction","tensorflow","twitter"],"created_at":"2024-11-05T23:33:58.989Z","updated_at":"2025-10-28T19:46:19.627Z","avatar_url":"https://github.com/cawfree.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/cawfree"],"categories":[],"sub_categories":[],"readme":"# crypto-lstm-3\n💵 Using [Twitter](https://twitter.com) and [word2vec](https://en.wikipedia.org/wiki/Word2vec) to predict trends in cryptocurrency. Normalized human sentiment goes in, the future of [Bitcoin](https://bitcoin.org/en/) comes out.\n\n\u003ca href=\"#badge\"\u003e\n  \u003cimg alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"\u003e\n\u003c/a\u003e\n\n## Foreward\n\nThe application of deep learning to financial forecasting is nothing new. When fed raw historical pricing data, a neural network can propose future trends [based on the time-variant fluctuations](https://machinelearningmastery.com/how-to-develop-lstm-models-for-time-series-forecasting/) of the past. In particular, [Long Short Term Memory Recurrent Networks]() have been proven to be [unreasonably effective](http://karpathy.github.io/2015/05/21/rnn-effectiveness/) at this task.\n\nBut alas, **Economics is the science of _choice_.**\n\nThe vast complexity of financial forecasting simply cannot be expressed by discrete pricing data, since there is an overwhelming _human_ element. Passion, regret, life and death stand at the prescipice of every peak, and slump at the upset of every trough.\n\nWe live in an unprecedented informational era, where the entire breadth of human expression can be freely accessed via an API call. Here, we leverage Twitter to continuously gather and extract ongoing public sentiment, then use this to stimulate a neural network which fights to determine the cross-correlation with the future value of a given crypto.\n\nJust as _fake news_ [quantifiably diminishes the public perception of truth](https://www.sciencedirect.com/science/article/abs/pii/S2214804319303398), tweets about crypto **can and will** transmute [bears into bulls](https://en.wikipedia.org/wiki/Market_trend). After all, Twitter is the Wall Street of blockchain currency.\n\n## Usage\n\nThis project relies upon defining a [`.env`](https://www.npmjs.com/package/dotenv) file to define your access credentials to Twitter. It takes the following form:\n\n```bash\nTWITTER_CONSUMER_KEY=XXXXX\nTWITTER_CONSUMER_SECRET=XXXXX\nTWITTER_ACCESS_TOKEN_KEY=XXXXX\nTWITTER_ACCESS_TOKEN_SECRET=XXXXX\n```\n\nYou can find more info [here](https://www.npmjs.com/package/twitter#for-application-only-based-authentication).\n\nAfter this, you need to [`gunzip`]() the [word2vec-slim](https://github.com/eyaler/word2vec-slim) model to the `public/` directory of your local clone.\n\nLastly, use `yarn` or `npm install` to initialize the project dependencies. Then execute the `start` script to begin training. After every training window, a prediction of the next cryptocurrency price will be made for the future.\n\n## Configurable Properties\n\n  - `backlogMinutes`: The amount of time tweets and values need to be collected to satisfy a training data window.\n  - `predictionMinutes`: The amount of time into the future the network should forecast.\n  - `subscribeTo`: Define the kind of hastags to listen out for.\n\n**Note**: The network will not start making predictions until `backlogMinutes + predictionMinutes` has elapsed.\n\n## FAQ\n\n**Q: Is this project just for predicting bitcoin?**\nA: Any cryptocurrency served via the [Coindesk API]() can be used as a prediction target; you just have to specify the [ISO]() (i.e. `\"ETH\"`), and define the [hashtags]() you think will be in some way related to the rise and fall of the currency's value.\n\n## ✌️ License\n[MIT](https://opensource.org/licenses/MIT)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/cawfree\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy @cawfree a coffee\" width=\"232\" height=\"50\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Fcrypto-lstm-3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcawfree%2Fcrypto-lstm-3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Fcrypto-lstm-3/lists"}