Skip to content

In this project, dive into an interactive app that brings stock data to life! Explore dynamic candlestick charts, track returns, and analyze rolling alpha and beta with ease. Compare your chosen stock to the S&P 500 Index and uncover trends with eye-catching visualizations. Perfect for data enthusiasts and investors alike!

License

Notifications You must be signed in to change notification settings

Yosri-Ben-Halima/SP500-Investment-Data-Visuals-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S&P 500 Stock Data Visualization & Analysis Web Application

This project is a Streamlit app for visualizing and analyzing stock data from the S&P 500 index. It allows users to select a company, choose different data types to visualize, and compare stock performance against the S&P 500 Index (^GSPC) as a benchmark.

Features

  • Interactive Visualizations: Plot various financial metrics such as OHLC prices, stock returns, and rolling alpha and beta.
  • Customizable Time Range: Select custom start and end dates for data analysis.
  • Comparison with Benchmark: Optionally compare the selected stock's performance against the S&P 500 index.
  • Data Analysis: Includes calculation of stock returns, log returns, and cumulative returns.
  • Advanced Metrics: Plot rolling alpha and beta values with customizable lookback windows.

Dependencies

  • Streamlit
  • Pandas
  • Plotly
  • Scikit-learn
  • NumPy
  • yfinance

Getting Started

  1. Clone the repository:

    git clone https://github.com/Yosri-Ben-Halima/SP500-Investment-Data-Visuals-App
    cd SP500-Investment-Data-Visuals-App
  2. Install the required packages:

    pip install -r requirements.txt
  3. Run the Streamlit app:

    streamlit run app.py

Features and How to Use

  • Select a Company: Choose a company from the dropdown menu in the sidebar.
  • Date Range: Set the start and end dates for data analysis. Optionally, use the current date as the end date.
  • Data Options: Select the data you want to plot (e.g., Candlestick, OHLC, Stock Returns) using the multiselect box.
  • Benchmark Comparison: Check the box to compare the selected stock's performance with the S&P 500 index.
  • Rolling Alpha and Beta: Choose a lookback window for calculating rolling alpha and beta values.

Contributing

Feel free to submit issues or pull requests to enhance the project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Thank you for visiting my GitHub profile! Feel free to reach out if you have any questions or opportunities to collaborate. Let's connect and explore new possibilities together!

LinkedIn Twitter Instagram Email

About

In this project, dive into an interactive app that brings stock data to life! Explore dynamic candlestick charts, track returns, and analyze rolling alpha and beta with ease. Compare your chosen stock to the S&P 500 Index and uncover trends with eye-catching visualizations. Perfect for data enthusiasts and investors alike!

Topics

Resources

License

Stars

Watchers

Forks

Languages