Quantitative finance dashboard built with Streamlit, Pandas, and Python.
Market Lens is an interactive financial analytics tool designed to visualize market trends and perform quantitative analysis on live data. It leverages yfinance for real-time ingestion and utilizes Pandas vectorization to perform high-speed data manipulation without inefficient loops.
This project serves as a reference for building lightweight, data-intensive dashboards in Python, demonstrating clean separation of concerns between the data layer (data_loader.py) and the presentation layer (app.py).
- Runtime: Python 3.8+
- Framework: Streamlit
- Data Manipulation: Pandas (Vectorized)
- Data Source: yfinance API
- Visualization: Plotly (Planned)
- Linting/Formatting: Ruff
This project includes a Makefile to handle environment setup and execution, abstracting away virtual environment management.
- Python 3.8+
- Make (Standard on Linux/Mac, optional on Windows)
-
Clone the repository
git clone [https://github.com/OneBuffaloLabs/market-lens.git](https://github.com/OneBuffaloLabs/market-lens.git) cd market-lens -
Install Dependencies This command creates a local virtual environment (
venv) and installs all required packages.make install
-
Run the Application Launches the Streamlit server.
make run
If you cannot use make, you can run the standard Python commands:
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install requirements
pip install -r requirements.txt
# Run the app
streamlit run app.py##⚡ Features & UsageThe dashboard provides real-time access to financial markets through an interactive sidebar.
- Select Assets: Use the sidebar to choose multiple tickers (e.g., AAPL, BTC-USD, GOOGL).
- Market Data Inspector: View raw OHLCV (Open, High, Low, Close, Volume) data.
- Quantitative Analysis:
- Normalized Prices: Assets are rebased to 100 at the start of the period for direct relative comparison.
- Daily Returns: Day-over-day percentage changes calculated via vectorized operations.
##⚙️ Developer Command ReferenceWe use make to abstract common development tasks.
| Command | Description |
|---|---|
make install |
Create virtual environment and install dependencies. |
make run |
Run the Streamlit application (hot-reloading enabled). |
make clean |
Remove virtual environment and compiled bytecode. |
make lint |
Run ruff to identify code quality issues. |
make format |
Auto-format code using ruff (fixes spacing/imports). |
make fix |
Auto-fix linting errors. |
##📂 Project Structure
/
├── app.py # Main application entry point & UI layout
├── data_loader.py # Data ingestion logic & vector transformations
├── requirements.txt # Project dependencies
├── Makefile # Command automation
└── .github/ # CI/CD workflows
We enforce code quality standards using Ruff.
# Check for errors
make lint
# Auto-format code
make format
Built by @bana0615 as an experimental tool for One Buffalo Labs.
License MIT - Copyright (c) 2025 One Buffalo Labs