This script generates a graph of the specified stock symbol using data from the Yahoo Finance API. The graph includes a line plot of the price_type
and a bar plot of the volume of the stock over the specified start
and end
dates.
- yfinance
- plotly
To use the script, specify the following input parameters:
symbol
: Ticker symbol of the stock to graphstart
: Start date for the graph in the formatYYYY-MM-DD
end
: End date for the graph in the formatYYYY-MM-DD
price_type
: Type of stock price to plot (Open
,High
,Low
,Close
)
The script generates a graph in an interactive Plotly format. The user can choose to save the graph as a PNG and HTML file in the output
folder. The file names will be in the format [symbol]_[price_type]_[start]-[end]
.