How hmdank/finetize works
Project type and purpose
• finetize is a Python‐based, multi‐page analytics and simulation dashboard (built with Streamlit’s “pages” feature).
• The user selects stocks and strategies, runs analysis, simulations, and backtests, then sees interactive plots.
• It’s not a distributed microservice system—rather a single‐process “frontend” (UI) plus layered business logic and data‐access modules.
File structure
• Top level:
• Finetize.py — main Streamlit entrypoint
• pages/1-4 *.py — multi‐page UI (Select, Analyze, Simulate, Backtest)
• functions/ — pure-Python modules for data selection, evaluation, plotting, simulation
• requirements.txt, .devcontainer/ — environment & container config
• Patterns:
• UI layer: Finetize.py + pages/ scripts
• Business-logic layer: functions/*.py
• (Implicit) Data layer: either local cache or external market‐data API
README for insights
• Streamlit UI with four steps: Select → Analyze → Simulate → Backtest
• Core features: precise plots, realistic assumptions, baseline models
• Libraries (in requirements.txt) likely include pandas, numpy, plotly, streamlit
Main components and their interactions
a. UI Layer
• Streamlit main app (Finetize.py) and page modules (pages/1 Select.py etc.)
• Presents controls (date pickers, buttons) and canvases for plots/tables
b. Business Logic Layer
• functions/select.py: symbol and date‐range selection
• functions/evaluate.py: statistical analysis of returns
• functions/simulation.py: run Monte Carlo or rule-based simulations
• functions/plots.py: build charts, graphs
c. Data Layer
• External market‐data API client (e.g., yfinance) or local CSV cache
• Caching component (if implemented) under .conda/Library—optional
d. Config & DevOps
• .devcontainer: Docker/VS-Code devcontainer.json for consistent environment
• requirements.txt: pinned dependencies
Architectural patterns and design principles
• Layered architecture:
UI → Business Logic → Data
• Single‐process, in‐memory data flow
• Clear separation of concerns: plotting, simulating, evaluating, selecting
• Streamlit “pages” pattern for modular UI
Detail without over‐engineering
• 4 pages separately to highlight modular UI
• Expose the functions folder’s four modules distinctly
• Call out the devcontainer as your local‐development “ops” component