Skip to content

A stock screener web application is created using FastAPI. The screener pulls data from yahoo finance from ticker symbols that the user inputs. The data can then be filtered down using a select set of metrics to screen for stocks of interest.

roderpad/StockScreenerUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

In this project, I've created a stock screener web application using FastAPI (a new Python framework built on Starlette) by following along with Part Time Larry's "FastAPI Python Tutorial - Building a Stock Screener with FastAPI" videos on youtube. The project utilizes many of the FastAPI features including pydantic models, dependency injection, background/async tasks, and SQLAlchemy integration. API endpoint testing was done using Insomnia API client.

UI Design

The frontend UI design is done using SemanticUI and Jinja2 templates, including CSS and JavaScript from the CDN.

Database Design

The database design is done using SQLAlchemy models. The database has one table 'stocks.db' that holds stock data retrieved programmatically as a background task to prevent UI hang from yahoo finance (yfinance package).

Links

How To Use

1) Install Packages,

Install required packages using pip install -r requirements.txt.

Install Package Dependencies

2) Run App,

Run the app by executing ./run in the terminal.

Run App

3) Open App,

Open the app by going to http://localhost:8000/ in your browser.

Open App

4) Add Stock Tickers,

Click the Add Stocks button and then type in a list of stock ticker symbols. The app will then fetch up-to-date data on each ticker and insert into a local database stocks.db.

Add Tickers View Table

5) Screen Stocks,

Screen stocks from those in the database by using the filters for price, forward price-to-earnings ratio, forward earnings-per-share ratio, dividend yield,50 day moving average, and 200 day moving average.

Screen Stocks

Built With

  • Python
  • FastAPI
  • SemanticUI
  • Jinja2
  • SQLAlchemy
  • Pydantic

Author

Paden Roder

🤝 Support

Contributions, issues, and feature requests are welcome!

Give a ⭐️ if you like this project!

About

A stock screener web application is created using FastAPI. The screener pulls data from yahoo finance from ticker symbols that the user inputs. The data can then be filtered down using a select set of metrics to screen for stocks of interest.

Topics

Resources

Stars

Watchers

Forks