Skip to content

This will compare the price action of 2 tickers and export a image file in the form of a graph.

Notifications You must be signed in to change notification settings

Lilneo786/compare2tickers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

compare2tickers

This will compare the price action of 2 tickers and export a image file in the form of a graph. Stock Price Comparison Tool This Python script allows you to compare the historical stock prices of two different companies and visualize the comparison using line charts. You can specify the stock symbols, the time period, and whether you want to compare daily or weekly prices.

Prerequisites Python 3.x yfinance library for fetching historical stock data. Install it using pip install yfinance. matplotlib library for creating line charts. Install it using pip install matplotlib.

Here's an example of how to use the script:

Enter the first stock symbol: AAPL Enter the second stock symbol: MSFT Enter the start date (YYYY-MM-DD): 2020-01-01 Enter the end date (YYYY-MM-DD): 2022-12-31 Choose interval (daily/weekly): daily Two line charts comparing the daily closing prices of AAPL and MSFT between January 1, 2020, and December 31, 2022, will be generated and saved as image files.

About

This will compare the price action of 2 tickers and export a image file in the form of a graph.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages