TradeMind
This is a project for conducting technical analysis on U.S. stocks to identify market conditions and trading opportunities.
Install / Use
/learn @yagami1997/TradeMindREADME
🚀 TradeMind Lite
TradeMind Lite is an open-source U.S. stock technical analysis system that combines indicator analysis, candlestick pattern recognition, trend and pressure-level analysis, HTML reporting, and both CLI and Web workflows.
Current version: Beta 0.3.4
📍 An open-source technical analysis workspace for U.S. stocks and ETFs, built for practical daily use, local reports, and Chinese-speaking developers who want to study or extend the system.
⚠️ Disclaimer
TradeMind Lite is a research and learning tool. Its analysis results are for reference only and must not be treated as investment advice, trading instructions, or risk-control guidance. Markets are risky, and all trading decisions remain your own responsibility.
📌 What This Project Does
TradeMind Lite focuses on technical analysis for U.S. equities and ETFs. The system can:
- analyze one or multiple tickers in batch
- calculate core indicators such as RSI, MACD, KDJ, Bollinger Bands, and volume-based signals
- detect candlestick patterns
- generate trading advice from combined signals
- estimate support/resistance and trend strength
- run built-in backtest calculations as part of the analysis pipeline
- generate HTML reports
- provide both an interactive terminal workflow and a browser-based workflow
✨ Highlights
🎯 Core Capabilities
- Dual interface: interactive CLI and Web UI
- Batch analysis: analyze multiple symbols in one run
- Watchlist support: grouped watchlists stored in JSON
- HTML reports: saved locally under
reports/stocks - Trend analysis: pressure levels, trend state, and ADX-related output
- Open source: distributed under GPL-3.0
🧩 Built Into the Workflow
- local report generation with no external dashboard dependency
- persistent watchlist files that are easy to fork and edit
- built-in backtest output as part of the analysis pipeline
- repository-level development documentation for secondary development
🖼️ Screenshots
🧭 Main Menu
<div align="center"> <img src="https://github.com/user-attachments/assets/e2b1dcf3-f0e4-47a5-ae20-26b4f71ac95d" alt="TradeMind main menu" width="900" /> </div>🌐 Web Analysis Workflow
<div align="center"> <img src="https://github.com/user-attachments/assets/9ea15bdb-7936-4dce-93e6-c6d6be9fcff1" alt="TradeMind web analysis screen" width="900" /> </div>📊 Generated Report View
<div align="center"> <img src="https://github.com/user-attachments/assets/c4b00dd6-8632-43d4-8f8c-2bf191c0ac43" alt="TradeMind HTML report" width="900" /> </div>🗂️ Watchlist Editor
<div align="center"> <img src="https://github.com/user-attachments/assets/df1786f7-27d6-47be-9437-57f2623a2220" alt="TradeMind watchlist editor" width="900" /> </div>⚡ Quick Start
If you only want the shortest working path:
✅ Recommended for first-time setup: create a fresh virtual environment, install from
requirements.txt, then start withpython trademind.py.
git clone https://github.com/yagami1997/TradeMind.git
cd TradeMind
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python trademind.py
On Windows PowerShell, activate the environment with:
venv\Scripts\Activate.ps1
🧰 System Requirements
- Python
3.8+ - Windows, macOS, or Linux
- Internet access for market data retrieval
- A modern browser for Web mode and HTML reports
💻 Installation Guide
The project is source-first. There is no packaged installer in this repository, so the recommended workflow is to create a virtual environment and install from requirements.txt.
1. 📥 Clone the Repository
git clone https://github.com/yagami1997/TradeMind.git
cd TradeMind
2. 🧪 Create a Virtual Environment
🪟 Windows
python -m venv venv
venv\Scripts\Activate.ps1
If PowerShell blocks activation, run this once in a user shell:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
🍎 macOS / 🐧 Linux
python3 -m venv venv
source venv/bin/activate
3. ⬆️ Upgrade pip
python -m pip install --upgrade pip
If your shell maps python to Python 2 or an unavailable interpreter, use python3 instead.
4. 📦 Install Dependencies
pip install -r requirements.txt
Core runtime dependencies include:
richfor the terminal UIFlaskandflask-corsfor the Web UIyfinance,pandas,numpy, andscipyfor data and analysismatplotlib,seaborn, andplotlyfor reports and visualization
5. ✅ Verify the Environment
python --version
pip --version
Optional sanity check:
python -c "import rich, flask, yfinance, pandas, numpy; print('Environment OK')"
🧭 Platform Notes
🪟 Windows
- Install Python from the official Python website and make sure
Add Python to PATHis checked. - If you use Command Prompt instead of PowerShell, activate the environment with:
venv\Scripts\activate.bat
🍎 macOS
- If
python3is missing, install it with Homebrew:
brew install python
- If some compiled packages fail, install Xcode command line tools:
xcode-select --install
🐧 Ubuntu / Debian
Install Python and common build tools first:
sudo apt update
sudo apt install -y python3 python3-venv python3-pip build-essential git
▶️ Running the Application
TradeMind Lite provides one main launcher and two shortcut entry scripts.
💡 If you are not sure which mode to use, start with the main launcher and enter Web mode from the menu.
🏁 Main Launcher
python trademind.py
This opens the main menu, where you can choose:
1for CLI mode2for Web modeqto quit
⌨️ Launch CLI Mode Directly
python trademind.py --cli
Or use the shortcut:
python trademind_cli.py
🌐 Launch Web Mode Directly
python trademind.py --web
You can also specify host and port:
python trademind.py --web --host 0.0.0.0 --port 3336
Or use the shortcut:
python trademind_web.py
⌨️ CLI Usage Guide
CLI mode is useful if you prefer terminal-driven analysis and quick report generation.
⚡ Best for quick single-symbol checks, batch runs, and local report browsing from the terminal.
📋 CLI Menu Options
The CLI menu includes:
- analyze a single stock
- batch analyze multiple stocks
- view available watchlists
- open recent reports
- adjust analysis-related menu settings exposed by the CLI
🔍 Analyze a Single Symbol
- Start CLI mode.
- Choose option
1. - Enter a symbol such as
AAPL. - Wait for the analysis to finish.
- TradeMind Lite generates an HTML report and opens it in your browser.
📈 Analyze Multiple Symbols
- Start CLI mode.
- Choose option
2. - Enter multiple symbols separated by spaces, for example:
AAPL MSFT GOOGL NVDA
- Wait for the analysis batch to complete.
- The generated report is saved to
reports/stocks.
🗂️ View Watchlists
Watchlists are loaded from:
config/users/default/watchlists.json
You can use CLI mode to inspect the available groups, or edit the JSON file directly if you want to manage symbols manually.
🧾 View Historical Reports
TradeMind Lite stores generated HTML reports in:
reports/stocks
From CLI mode, you can browse recent reports and open them in your browser.
🌐 Web Usage Guide
Web mode is the most convenient workflow for normal daily use.
🖥️ Best for routine use if you want a visual workflow, watchlist editing, and recent-report access in the browser.
🚀 Starting the Web UI
Run:
python trademind.py --web
By default, the application starts a local server on port 3336. In normal conditions, it will open the browser automatically.
If the browser does not open automatically, visit:
http://localhost:3336
🔄 Typical Web Workflow
- Start Web mode.
- Open the browser page.
- Enter one or more symbols, or use an existing watchlist.
- Start the analysis.
- Wait for the progress indicator to finish.
- Open the generated report from the results area or the recent reports list.
🗃️ Watchlist Management in Web Mode
The Web UI includes watchlist editing and import workflows. User watchlist data is stored under:
config/users/default/watchlists.jsonconfig/users/default/groups_order.jsonconfig/users/default/watchlist_edited.json
This means your watchlist changes are persisted locally in the project directory.
📁 Output and File Locations
Important runtime directories:
reports/stocks: generated HTML stock analysis reportslogs: runtime logs for the analyzer, CLI, and Web serverconfig/users/default: default user watchlists and ordering dataresults: additional generated artifacts used by the project
🗃️ Most Important Paths
trademind.py: main launcherreports/stocks: generated HTML reportslogs: runtime logsconfig/users/default/watchlists.json: default watchlist source
🧠 How the Analysis Works
At a high level, TradeMind Lite does the following during analysis:
- Downloads market data with
yfinance. - Calculates technical indicators.
- Detects candlestick patterns.
- Generates trading advice and signal output.
- Runs built-in backtest calculations on the generated signals.
- Performs trend and pressure-level analysis.
- Builds an HTML report and saves it locally.
📡 Data Source and Rate Limits
TradeMind Lite currently relies on Yahoo Finance data through yfinance.
This is practical and convenient, but it also means:
- requests can be rate-limited
- certain regions or networks may have access issues
- delayed or incomplete responses can happen
If data retrieval starts failing:
- wait and retry later
- reduce request frequency and batch size
- verify that the symbol exists on Yahoo Finance
- update `yfina
Related Skills
node-connect
348.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
