This branch combines:
- β
mcp_quantitative_agent/ (from
markets) - Real analysis backend - β
dashboard/ (from
card-interfaces) - Card swipe UI - β Python analysis scripts (weather_test.py, politics_test.py, economics_test.py)
- β Agent system (lib/agents/ still exists!)
- β MCP server (server.py) - can run independently
- β Python quantitative analysis - fully functional
- β Dashboard UI - card swipe interface installed
- β
Agent system code still exists in
dashboard/lib/agents/
β οΈ Dashboard usesuseTradingPicks.ts(mock data)β οΈ Real agent system (useRecommendations.ts,useAgentFeed.ts) not integrated with card UIβ οΈ Card swipe UI doesn't call real agents yet
Time: No changes needed
Best for: Fast demo, UI showcase
Just use the card interface as-is with mock data:
cd dashboard
npm run devDashboard will show pretty cards with fake data.
Time: ~30 minutes
Best for: Real analysis with pretty UI
Connect the card UI to your real agent system.
Currently it generates mock data. Replace with real agent calls:
File: dashboard/lib/useTradingPicks.ts
import { useState, useEffect } from "react";
import { TradingPick } from "./types";
import { useRecommendations } from "./useRecommendations"; // Real agent system!
export function useTradingPicks() {
const [picks, setPicks] = useState<TradingPick[]>([]);
const [loading, setLoading] = useState(true);
// Use REAL recommendations instead of mock data
const {
recommendations,
loading: agentLoading,
processing,
} = useRecommendations();
useEffect(() => {
// Convert real recommendations to TradingPick format
if (!agentLoading) {
const converted = recommendations.map(rec => ({
ticker: rec.market.ticker,
market_question: rec.market.title,
topic: rec.market.domain.toLowerCase(),
decision: rec.decision.action === "BUY_YES" ? "BUY" :
rec.decision.action === "BUY_NO" ? "SHORT" : "PASS",
technical_direction: rec.decision.action === "BUY_YES" ? "buy" :
rec.decision.action === "BUY_NO" ? "short" : null,
market_p: rec.decision.pMarket,
volatility_confidence: rec.decision.confidence,
volume_confidence: rec.decision.confidence,
momentum: rec.decision.edge > 0 ? "bullish" : "bearish",
final_confidence: rec.decision.confidence,
reasoning: rec.decision.rationale,
sentiment: {
label: rec.decision.pSent > 0.5 ? "positive" : "negative",
score: Math.round(rec.decision.pSent * 100),
confidence: rec.decision.confidence > 0.7 ? "high" : "medium",
},
key_themes: rec.decision.sources,
market_impact: rec.decision.edge > 0.15 ? "High" : "Medium",
}));
setPicks(converted);
setLoading(false);
}
}, [recommendations, agentLoading]);
// ... rest of the hook (save, unsave, etc.)
return {
picks,
loading: loading || processing,
refreshPicks: () => {}, // Could trigger re-analysis
savePick,
unsavePick,
};
}Check that useRecommendations still exists:
ls dashboard/lib/useRecommendations.tsIf it exists β great!
If not β it was deleted by card-interfaces merge. Need to restore it.
cd dashboard
npm run devOpen http://localhost:3000/dashboard
Expected behavior:
- β Real markets from Kalshi
- β Real analysis from agents
- β Pretty card swipe UI
- β Auto-refresh every 60s
second_combine/
βββ mcp_quantitative_agent/ β Real Python backend
β βββ server.py β MCP server
β βββ quantitative_agent.py β CLI tool
β βββ ...
β
βββ weather_test.py β Real weather analysis
βββ politics_test.py β Real politics analysis
βββ economics_test.py β Real economics analysis
β
βββ dashboard/ β Card swipe UI
βββ lib/
β βββ agents/ β Real agent system (still here!)
β βββ useRecommendations.ts β Real agent orchestrator
β βββ useTradingPicks.ts β Currently mock, needs update
β
βββ components/
βββ TradingCardDeck.tsx β Card swipe interface
βββ SwipeCard.tsx β Individual cards
βββ AgentFeed.tsx β Old sidebar (still exists)
You now have BOTH UI styles available:
- Component:
TradingCardDeck.tsx - Style: Tinder-like swipe
- Location: Full screen modal
- Component:
AgentFeed.tsx - Style: List view
- Location: Right sidebar
Show cards in main view, keep sidebar for quick reference:
<div className="flex flex-col lg:flex-row gap-6">
{/* Card Swipe (main) */}
<div className="flex-1">
<TradingCardDeck />
</div>
{/* Agent Feed (sidebar) */}
<div className="lg:w-96 shrink-0">
<AgentFeed />
</div>
</div>-
Start Dashboard:
cd dashboard npm run devOpens http://localhost:3000/dashboard
Shows card swipe UI with mock data (fast demo)
-
Start MCP Server (optional, for AI assistants):
cd mcp_quantitative_agent python server.py --httpOpens http://localhost:8000
Allows Claude Desktop/Cline to use your analysis
Follow "Option 2" instructions above to connect useTradingPicks to useRecommendations.
- markets branch: Had 60s auto-refresh β
- card-interfaces: No auto-refresh β
- second_combine: Depends on which hook you use
- If using
useRecommendations: Auto-refresh β - If using mock
useTradingPicks: No auto-refresh β
- If using
| Feature | markets | card-interfaces | second_combine |
|---|---|---|---|
| MCP Server | β Yes | β No | β Yes |
| Python Analysis | β Yes | β No | β Yes |
| Agent System | β Full | β None | β Full (in code) |
| Card Swipe UI | β No | β Yes | β Yes |
| Sidebar UI | β Yes | β No | β Yes (still exists) |
| Real Data | β Connected | β Mock only | |
| Auto-refresh | β 60s | β No |
cd dashboard
npm run devDemo the card swipe UI with fast-loading mock data.
- Update
useTradingPicks.tsto useuseRecommendations - Test that cards show real Kalshi markets
- Verify auto-refresh works
- Add view toggle (cards vs list)
- Improve card UI with real data
- Add trade execution
- Deploy both dashboard + MCP server
For HackPrinceton judges:
-
Show card swipe UI first (instant load, pretty)
- "Here's our trading interface with AI recommendations"
-
Open browser console (show it's real)
- "Behind the scenes, our multi-agent system is running"
- Show logs from
useRecommendations
-
Switch to sidebar view (show technical depth)
- "Here's the full analysis breakdown"
- Show NOAA, FRED data sources
-
Demo MCP server (if time)
- "AI assistants can also use our analysis"
- Run a Claude Desktop query
Cause: useTradingPicks still using mock data, but mock generator broken
Fix: Either:
- Keep mock data working (quick fix)
- Connect to
useRecommendations(proper fix)
Cause: Agents take 2-3s to analyze markets
Fix: Show loading state with:
{loading && <div>Analyzing markets...</div>}Cause: Both trying to render
Fix: Choose one primary view
You now have:
- β Best backend (real Python analysis)
- β Best frontend (card swipe UI)
β οΈ Not connected yet (but all pieces exist!)
Next step:
- Connect
useTradingPickstouseRecommendations - Or just demo with mock data for speed
Best of both worlds is possible! π
Branch: second_combine
Created: From markets + card-interfaces dashboard
Status: Ready to connect or demo as-is