Skip to content

ashishsalunkhe/Detecting-Anomalies-and-Influence-of-External-Factors-over-Time-Series-Data

Repository files navigation

Detecting-Anomalies-and-Influence-of-External-Factors-over-Time-Series-Data

Stock Price Forecasting is one of the most important areas in financial domains and time series forecasting is analogous to it. Stock Markets are highly volatile and several factors are responsible for prices to change over a period of time. This work aims at understanding the correlation between Google Trends and Stock Prices. We aim to emphasize how search trends related to a particular organization can be used as one of the aspects in peripheral data in understanding and finding its relationship with the stock price. While doing that, various anomaly detection techniques over time series data are used in understanding their significance in finding different types of anomalies. We try to compare statistical techniques with machine learning models such as DBSCAN, Isolation forest, and PyCaret’s Unsupervised Anomaly Detection Module and draw observations explaining their importance in point and group anomalies. We are using Python as the programming language and different Python packages. Some of the main packages used - pytrends (for Google Trends data), yfinance (for Stock Price data), statsmodels (for statistical models).

Project Title: Google Trends and Stock Price Analysis with Anomaly Detection

Objective

  • Investigated the relationship between Google Trends data and stock prices to gain insights into how search trends impact stock price movements.
  • Explored the application of anomaly detection techniques to identify and analyze anomalies in time series stock price data.

Methodology

  • Utilized Python programming language and relevant packages such as pytrends, yfinance, and statsmodels for data retrieval, preprocessing, and analysis.
  • Collected historical Google Trends data and corresponding stock price data using pytrends and yfinance libraries.
  • Conducted comprehensive data preprocessing, including cleaning, normalization, and alignment of the time series data.
  • Applied statistical models and machine learning algorithms (DBSCAN, Isolation forest, PyCaret's Unsupervised Anomaly Detection Module) for anomaly detection in the stock price data.

Findings

  • Identified significant correlations between Google Trends data and stock price movements, indicating the potential influence of search trends on stock market behavior.
  • Detected and analyzed various types of anomalies in the stock price time series, providing insights into irregularities and potential market trends.
  • Compared the performance and effectiveness of different anomaly detection techniques, highlighting the strengths and limitations of each approach.

Impact

  • Improved understanding of the relationship between online search behavior and stock prices, enabling better informed investment decisions and risk management strategies.
  • Enhanced the ability to identify and interpret anomalies in stock price data, contributing to more accurate forecasting and early detection of unusual market behavior.
  • Demonstrated the value of incorporating alternative data sources and advanced analytics techniques in financial analysis, showcasing the potential for data-driven insights in the field of stock market forecasting.

Conclusion

  • Successfully executed a data-driven project that combined Google Trends data analysis, stock price forecasting, and anomaly detection.

About

Timeseries Analysis based on Google Trends and Anomaly Detection

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published