{"title":"运用 Python 进行情绪分析,探索公众情绪与股价走势之间的联系","authors":"TszYan Lau","doi":"10.54254/2754-1169/102/2024ed0081","DOIUrl":null,"url":null,"abstract":"This study aims to research the relationship between sentiments of public and the trend of the stock. Specially, it focuses on analyzing how positive or negative sentiment correlated to the trend of stocks. In methodology, this research investigates the predictive power of public sentiment on stock market trend by analyzing users comments on Reddit by utilizing Python Reddit API Wrapper (PRAW) to systematically web-scrape relevant financial discussion from a subreddit called stocks. After the data collecting, preprocessing step is conducted to removing noise and standardize text. Eventually, sentiment analysis is applied to analyze the sentiments of comments by using Natural Language Processing (NLP) techniques. This approach allows for an in-depth examination of the correlation between the sentiments expressed in Reddit comments and subsequent stock price fluctuations by comparing the outcome and the actual price movement. Eventually, through the comparison between the sentiment analysis result and actual stocks movement, the sentiment of public comments shares the same trend with the market movement.","PeriodicalId":104305,"journal":{"name":"Advances in Economics, Management and Political Sciences","volume":"51 19","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Application of Sentiment Analysis to Explore the Connection Between Public Sentiment and Stock Price Movement by Python\",\"authors\":\"TszYan Lau\",\"doi\":\"10.54254/2754-1169/102/2024ed0081\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This study aims to research the relationship between sentiments of public and the trend of the stock. Specially, it focuses on analyzing how positive or negative sentiment correlated to the trend of stocks. In methodology, this research investigates the predictive power of public sentiment on stock market trend by analyzing users comments on Reddit by utilizing Python Reddit API Wrapper (PRAW) to systematically web-scrape relevant financial discussion from a subreddit called stocks. After the data collecting, preprocessing step is conducted to removing noise and standardize text. Eventually, sentiment analysis is applied to analyze the sentiments of comments by using Natural Language Processing (NLP) techniques. This approach allows for an in-depth examination of the correlation between the sentiments expressed in Reddit comments and subsequent stock price fluctuations by comparing the outcome and the actual price movement. Eventually, through the comparison between the sentiment analysis result and actual stocks movement, the sentiment of public comments shares the same trend with the market movement.\",\"PeriodicalId\":104305,\"journal\":{\"name\":\"Advances in Economics, Management and Political Sciences\",\"volume\":\"51 19\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-07-25\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Advances in Economics, Management and Political Sciences\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.54254/2754-1169/102/2024ed0081\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Advances in Economics, Management and Political Sciences","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.54254/2754-1169/102/2024ed0081","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
摘要
本研究旨在研究公众情绪与股票走势之间的关系。特别是,它侧重于分析积极或消极情绪与股票走势的相关性。在研究方法上,本研究利用 Python Reddit API Wrapper (PRAW),从名为股票的子红人区中系统地网络抓取相关金融讨论,通过分析用户在 Reddit 上的评论,研究公众情绪对股市趋势的预测能力。数据收集完成后,将进行预处理,以去除噪音并规范文本。最后,使用自然语言处理(NLP)技术对评论进行情感分析。这种方法可以通过比较结果和实际股价走势,深入研究 Reddit 评论中表达的情绪与后续股价波动之间的相关性。最终,通过情绪分析结果与实际股票走势的对比,公众评论的情绪与市场走势具有相同的趋势。
Application of Sentiment Analysis to Explore the Connection Between Public Sentiment and Stock Price Movement by Python
This study aims to research the relationship between sentiments of public and the trend of the stock. Specially, it focuses on analyzing how positive or negative sentiment correlated to the trend of stocks. In methodology, this research investigates the predictive power of public sentiment on stock market trend by analyzing users comments on Reddit by utilizing Python Reddit API Wrapper (PRAW) to systematically web-scrape relevant financial discussion from a subreddit called stocks. After the data collecting, preprocessing step is conducted to removing noise and standardize text. Eventually, sentiment analysis is applied to analyze the sentiments of comments by using Natural Language Processing (NLP) techniques. This approach allows for an in-depth examination of the correlation between the sentiments expressed in Reddit comments and subsequent stock price fluctuations by comparing the outcome and the actual price movement. Eventually, through the comparison between the sentiment analysis result and actual stocks movement, the sentiment of public comments shares the same trend with the market movement.