Skip to main content
🎯 Goal Reminder
By the end you will have:
- local LLMs running (7B / 14B / 20B)
- your trading data structured
- a working RAG system
- an analysis engine (Phase 4)
- a dashboard UI (Phase 5)
- basic optimization (Phase 6)
🟢 DAY 1 — PROJECT FOUNDATION
🧱 1. Create folder system
Set up:
AI_TRADING_SYSTEM/
Create all subfolders:
- 01_STRATEGIES
- 02_BACKTESTS
- 03_TRADES
- 04_REGIMES
- 05_MARKET_DATA
- 06_ANALYSIS_OUTPUTS
- 07_RAG_KNOWLEDGE_BASE
- 08_MODEL_NOTES
- CACHE
- EMBEDDINGS
---## 📊 2. Import your data- move all spreadsheets in
- standardize formats (CSV preferred)
- ensure each file has:
- strategy name
- date
- returns
- drawdown---## 🧠 3. Define regimes (manual)Create simple file:```text
04_REGIMES/regimes.csv
Include:
- bull
- bear
- high volatility
- crisis periods
🟡 DAY 2 — LOCAL AI SETUP
💻 1. Install tools
- Ollama
- Python 3.10+
- VS Code
(Optional: LM Studio just for testing)
🧠 2. Download models
Run:
- 7B model (fast)
- 14B model (main workhorse)
- 20B model (deep reasoning only)
⚙️ 3. Test models
Run simple prompts:
- “Summarize this strategy”
- “Compare momentum vs mean reversion”
Confirm:
- speed is acceptable
- memory usage stable (32GB system)
🔵 DAY 3 — RAG SYSTEM (FIRST REAL INTELLIGENCE)
📦 1. Chunk your data
Split into:
- strategy summaries
- backtest results
- regime-specific slices
🧠 2. Create embeddings
Use Python:
- sentence-transformers or similar
- generate embeddings for all chunks
📚 3. Store in vector DB
- install ChromaDB (or FAISS)
- store:
- embeddings
- metadata (strategy, regime, date)
🔍 4. Test retrieval
Example queries:
- “high volatility momentum performance”
- “best strategies in bear markets”
🟣 DAY 4 — PHASE 4 (ANALYSIS ENGINE)
🧠 1. Build retrieval pipeline
Flow:
- user question → vector search → top results
🧾 2. Create prompt template
Fixed structure:
- Summary
- Strategy Breakdown
- Regime Behavior
- Risk Analysis
- Comparison
- Improvements
🤖 3. Connect LLM
Route logic:
- 7B → fast tasks
- 14B → default analysis
- 20B → deep reasoning
📊 4. Test full pipeline
Run:
“Why did momentum fail in volatile markets?”
Confirm:
- retrieval works
- output is structured
- no hallucinated data
🟠 DAY 5 — PHASE 5 DASHBOARD
🖥️ 1. Build Streamlit app
Layout:
- left: data + filters
- center: chat input
- right: results panel
💬 2. Connect Phase 4 engine
- every query goes into analysis engine
📊 3. Add controls
- model selector
- regime filter
- dataset selector
- save report button
📁 4. Save outputs
Store:
/06_ANALYSIS_OUTPUTS/
🔴 DAY 6 — OPTIMIZATION
⚡ 1. Speed improvements
- cache embeddings
- reuse retrieval results
- avoid full dataset loads
🧠 2. Model routing
Rule:
- simple → 7B
- normal → 14B
- complex → 20B
💾 3. Storage cleanup
- cache folder cleanup
- compress embeddings
- avoid duplicate retrievals
🖥️ 4. UI performance
- lazy loading
- paginate tables
- cache dashboard results
🧭 END STATE (AFTER DAY 6)
You now have:
✔ working local LLM stack
✔ structured trading dataset
✔ semantic RAG system
✔ analysis engine (Phase 4)
✔ dashboard interface (Phase 5)
✔ optimized system (Phase 6)
💡 ONE-LINE SUMMARY
In 6 days you build a local Mac-based AI system that turns historical trading data into structured strategy analysis using RAG + LLM reasoning + a research dashboard.
