{"id":16105582,"url":"https://github.com/charlesyuan02/sentiment-analysis-stock-trader","last_synced_at":"2025-10-27T18:38:42.323Z","repository":{"id":222214226,"uuid":"605280957","full_name":"CharlesYuan02/sentiment-analysis-stock-trader","owner":"CharlesYuan02","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-15T21:06:54.000Z","size":698,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T23:04:35.557Z","etag":null,"topics":["finbert","marketwatch","reddit-api","sentiment-analysis","web-scraping"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CharlesYuan02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-02-22T20:40:55.000Z","updated_at":"2024-08-19T18:51:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6ae7a45-2438-46fb-9643-290d87ff2a22","html_url":"https://github.com/CharlesYuan02/sentiment-analysis-stock-trader","commit_stats":null,"previous_names":["chubbyman2/sentiment-analysis-stock-trader","charlesyuan02/sentiment-analysis-stock-trader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesYuan02%2Fsentiment-analysis-stock-trader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesYuan02%2Fsentiment-analysis-stock-trader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesYuan02%2Fsentiment-analysis-stock-trader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesYuan02%2Fsentiment-analysis-stock-trader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CharlesYuan02","download_url":"https://codeload.github.com/CharlesYuan02/sentiment-analysis-stock-trader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674679,"owners_count":21143760,"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":["finbert","marketwatch","reddit-api","sentiment-analysis","web-scraping"],"created_at":"2024-10-09T19:10:05.137Z","updated_at":"2025-10-27T18:38:42.242Z","avatar_url":"https://github.com/CharlesYuan02.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sentiment-analysis-stock-trader\n\n## Prerequisites\nAll code was written in Python 3.7.9. Please see \u003ca href=\"https://github.com/Chubbyman2/sentiment-analysis-stock-trader/blob/main/requirements.txt\"\u003erequirements.txt\u003c/a\u003e for dependencies.\n```\nbeautifulsoup4==4.12.0\npandas==1.2.3\npraw==7.7.0\nrequests==2.28.1\nsnscrape==0.3.4\ntqdm==4.56.2\nnumpy==1.24.2\nscikit-learn==1.2.2\ntorch==2.0.0+cu117\ntorchaudio==2.0.1+cu117\ntorchvision==0.15.1+cu117\ntransformers==4.27.3\n```\n\n## Description of Files\n### \u003ca href = \"https://github.com/Chubbyman2/sentiment-analysis-stock-trader/blob/main/create_dataset.py\"\u003ecreate_dataset.py\u003c/a\u003e\nThis file calls functions defined in the other files to create a dataset (this is not the final dataset that we will be using for sentiment analysis, just a preliminary proof of concept).\n\n### \u003ca href = \"https://github.com/Chubbyman2/sentiment-analysis-stock-trader/blob/main/dataset.csv\"\u003edataset.csv\u003c/a\u003e\nThis is the example dataset created using create_dataset.py.\n\n### \u003ca href = \"https://github.com/Chubbyman2/sentiment-analysis-stock-trader/blob/main/finbert.py\"\u003efinbert.py\u003c/a\u003e\nThis file uses the pretrained FinBERT model on the example dataset.\n\n### \u003ca href = \"https://github.com/Chubbyman2/sentiment-analysis-stock-trader/blob/main/scrape_headlines.py\"\u003escrape_headlines.py\u003c/a\u003e\nThis file contains functions to scrape S and P 500 stock tickers and names from Wikipedia, scrape news headlines for any S and P 500 stock from Yahoo Finance, and scrape news headlines for any S and P 500 stock from MarketWatch.\n\n### \u003ca href = \"https://github.com/Chubbyman2/sentiment-analysis-stock-trader/blob/main/scrape_reddit.py\"\u003escrape_reddit.py\u003c/a\u003e\nThis file contains functions to scrape titles and top comments of top posts from a specified subreddit on Reddit. Note that it requires you to have a file called info.txt saved in the same directory, with the first line of this file being your Reddit API client ID, the second line being your Reddit API client secret, and the third and final line of this file being your Reddit API user agent. \n\n## License\nThis project is licensed under the MIT License - see the \u003ca href = \"https://github.com/Chubbyman2/sentiment-analysis-stock-trader/blob/main/LICENSE\"\u003eLICENSE\u003c/a\u003e file for details. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesyuan02%2Fsentiment-analysis-stock-trader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesyuan02%2Fsentiment-analysis-stock-trader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesyuan02%2Fsentiment-analysis-stock-trader/lists"}