This project shows how to calculate and plot Fibonacci retracement levels using Python and Matplotlib on real stock data from Yahoo Finance.
Itโs beginner-friendly and perfect for learning technical analysis + data analytics together.
Fibonacci retracement levels are horizontal lines drawn at key percentage points between a stock's high and low price.
Traders use them to identify potential support and resistance zones, where the price may pause or reverse.
Common levels: 23.6%, 38.2%, 50%, 61.8%, 78.6%
- Download real stock data using
yfinance - Calculate recent high and low prices
- Compute Fibonacci retracement levels
- Plot stock price with Fibonacci lines
- Works with any stock ticker (AAPL, TSLA, MSFT, etc.)
Install the required libraries:
pip install yfinance pandas matplotlib