A production-ready automated stock trading terminal with local AI integration and Alpaca Markets connectivity.
- AI-Powered Analysis: Integrated with DeepSeek-R1 (via Ollama) for intelligent market sentiment analysis and trade recommendations.
- Live Trading: Native integration with Alpaca Markets for real-time order execution and account management.
- Modern Dashboard: A high-performance, dark-themed UI built with PySide6 and qtawesome.
- Real-Time Data: Dynamic price tracking and 24h change monitoring powered by
yfinance. - Trade Journaling: Automated SQLite-backed trade history for performance review and auditing.
- Portfolio Management: Real-time tracking of holdings, entry prices, and profit/loss metrics.
- Ollama: Install the LLM runner from ollama.com.
- AI Model: Pull the DeepSeek-R1 model:
ollama pull deepseek-r1
- Alpaca Account: Sign up for a free Paper Trading account at alpaca.markets.
-
Clone the repository:
git clone https://github.com/QuantumPixelator/StockSimulator.git cd StockSimulator -
Configure Environment: Create a
.envfile in the root directory and add your Alpaca credentials:ALPACA_API_KEY=your_api_key_here ALPACA_API_SECRET=your_api_secret_here ALPACA_API_BASE_URL=https://paper-api.alpaca.markets/v2
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
python stockmarket.pyw
stockmarket.pyw: The primary AI trading terminal and dashboard.stocksim.py: Lightweight legacy stock simulator with interactive charting.quantum_trade.db: Persistent SQLite storage for your trade journal and portfolio metrics.requirements.txt: List of required Python packages.
PySide6yfinancealpaca-trade-apirequestspython-dotenvqtawesomepandasloguru- Python 3.10+
- Ollama (running DeepSeek-R1)
MIT License
Copyright (c) 2026 QuantumPixelator
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Feel free to submit issues or pull requests.