Summary
Keywords
Full Transcript
@MattMacarty ## π Python Stock Screener: Calculate Close to 52-Week High Ratio (EOD API & Pandas) | Part 9 Welcome to Part 9 of the **Python Stock Analysis Course**! This video concludes the "macro analysis" section of the course by walking you through the creation of a simple, yet powerful, **stock screener**. This tool allows you to quickly filter a large list of stocks based on a quantitative metric. You will learn how to integrate data from two different API feedsβ**current closing prices** and **52-Week High technical data**βinto a single **Pandas DataFrame** and calculate the screening ratio (`Close Price / 52-Week High`). This ratio helps identify stocks that are trading far below their annual high. ### π― Key Learning Outcomes: 1. **Fundamental Data API:** Understand the structure and complexity of calling fundamental/technical data from the **EOD Historical Data API**. 2. **Bulk vs. Symbol Calls:** Implement logic to retrieve current close prices in **bulk** and then loop through the list to get the **52-Week High** data on a **symbol-by-symbol** basis. 3. **Data Merging:** Combine the two disparate datasets (prices and 52-week highs) into a single, clean Pandas DataFrame using a **merge** operation. 4. **Screener Logic:** Calculate the final **Close to 52-Week High Ratio** column to rank securities for further investigation. ### β±οΈ Video Chapters (Jump Ahead!): 0:00 - Introduction & Section 1 Wrap-up (Moving to Stock Screener) 0:46 - **Reviewing the EOD Fundamental Data API Structure** (Nested Data) 2:10 - Setting up the API Call to **Bulk Download Recent Closing Prices** 3:00 - Filtering the Bulk Data to a Selected List of Tickers 3:50 - Looping Through Symbols to Fetch **52-Week High** Technicals 5:15 - Building a **Mask** to Filter Close Prices 5:50 - Converting Dictionary Data to a **Pandas Series** 6:05 - **Merging** Prices and 52-Week High DataFrames 6:25 - Calculating the **Close / 52-Week High Screener Ratio** 6:45 - Testing the Function with a Subset of S&P 500 Stocks 7:25 - Preview of Part 10: Starting the **Individual Security Analysis Class** ### π Course Series & Resources: * **Part 8 (Financial Events):** [https://youtu.be/qkLBdazECss](https://youtu.be/qkLBdazECss) * **Get the Code:** https://github.com/mjmacarty/python-stock-analysis ***Disclaimer: This video is for educational purposes only. The information provided should not be construed as investment advice. *** \#PythonStockScreener \#52WeekHigh \#EODHistoricalData \#APIIntegration \#PandasMerge \#StockScreening \#PythonForFinance \#QuantitativeFinance \#Part9
