
I Built a Stock Scanner with Python and RSI Signals — Here Is What I Learned
As a developer interested in finance, I have been experimenting with building tools to analyze stock markets using technical indicators. In this article, I will share my experience creating a simple stock scanner using Python that uses Relative Strength Index (RSI) signals. What is RSI? The RSI is a momentum indicator by J. Welles Wilder (1978). It measures recent price change magnitude to determine overbought (>70) or oversold (<30) conditions. Fetching Stock Data with yfinance import yfinance as yf symbols = [ " AAPL " , " GOOG " , " MSFT " , " AMZN " ] data = [] for symbol in symbols : ticker = yf . Ticker ( symbol ) hist = ticker . history ( period = " 1y " ) data . append ( hist ) Calculating RSI def rsi ( data , window = 14 ): delta = data [ " Close " ]. diff (). dropna () u = delta . clip ( lower = 0 ) d = ( - delta ). clip ( lower = 0 ) rs = u . ewm ( com = window - 1 , adjust = False ). mean () / d . ewm ( com = window - 1 , adjust = False ). mean () return 100 - ( 100 / ( 1 +
Continue reading on Dev.to Tutorial
Opens in a new tab

