Pnlclaw Community
PnLClaw — local-first crypto and prediction market quant engine.
Install / Use
npx skills add YicunAI/Pnlclaw-communityInstalls into whichever agent you are using.
README
<br /><br />
<a href="https://github.com/YicunAI/Pnlclaw-community/releases/latest"> <img src="https://img.shields.io/badge/%E2%AC%87%EF%B8%8F_Download-Windows_Desktop_App-28a745?style=for-the-badge&logo=windows&logoColor=white" alt="Download" /> </a> <br /> <sub>No setup required — download, install, and start trading in minutes.</sub><br /><br /> <img src="apps/desktop/public/sl/首页.png" alt="PnLClaw Dashboard" width="800" />
</div>Overview & Design Philosophy
PnLClaw Community is an open-source, local-first platform for crypto quantitative research and prediction market workflows.
The fundamental difference from traditional quant tools: you don't write code. Describe your trading ideas in natural language, and the AI Agent handles everything from strategy design to backtest validation — then keeps iterating through multi-turn conversation to autonomously explore better parameters.
Unlike cloud-based quant platforms, PnLClaw runs entirely on your machine. We designed it with these core principles:
- Chat is Quant: Built-in AI Agent with a ReAct reasoning loop and full multi-turn conversation context. Describe your strategy idea in natural language, and the Agent generates YAML configs, runs backtests, analyzes results, and suggests optimizations — forming a complete closed loop: Design → Validate → Backtest → Iterate → Deploy.
- Local-First & Privacy: No subscription, no data leaving your system, no intermediary. Your API keys and strategies stay on your hardware.
- Unified Event-Driven Architecture: Streams live market data directly from exchange native WebSocket APIs. Backtesting, paper trading, and live execution all share the exact same event loop and unified L2 orderbook data models. Write your strategy once, run it anywhere.
- Skill-Driven Agent Architecture: 8 built-in quantitative Skills covering strategy drafting, backtest explanation, market analysis, risk reporting, and more. Extensible via MCP (Model Context Protocol), with support for custom user Skills. LLM-agnostic — works with any OpenAI-compatible endpoint or local Ollama.
- Security-by-Design: High-risk capabilities are gated. Secrets never enter prompts or logs, and the agent has no ambient shell or file authority by default.
PnLClaw Community is open-source (AGPLv3) and focused on local-first workflows. Multi-tenant SaaS, cloud execution, and HFT capabilities are not included in this release — coming soon.
Why PnLClaw
<table> <tr> <td width="50%">🗣️ Chat = Strategy, Zero Code Barrier
Describe your trading idea in natural language. The Agent auto-generates executable YAML strategies and runs backtests. No Python or Pine Script needed — just speak your mind.
</td> <td width="50%">🧠 Long-Term Memory, Precise Intent Tracking
The Agent retains full memory of the entire conversation. Say "backtest that strategy above" or "change the stop-loss to 3%," and it locates the prior config and continues — context never gets lost.
</td> </tr> <tr> <td>🔄 Full Closed-Loop Workflow, AI Self-Optimization
Design → Validate → Backtest → Analyze → Optimize → Deploy, all within a single conversation. The Agent analyzes backtest metrics and autonomously explores better parameter combinations.
</td> <td>🎯 8 Built-in Quant Skills
Each Skill is a specialized workflow: strategy drafting, code generation, backtest interpretation, market analysis, PnL attribution, risk reporting, indicator education, exchange setup. Custom Skills supported.
</td> </tr> <tr> <td>🔮 Native Prediction Market Support, Blue Ocean Advantage
Rare native Polymarket CLOB integration — live orderbook, event lifecycle tracking, implied probability analysis. Also supports Binance / OKX spot and futures for cross-market strategy research.
</td> <td>🛡️ Extreme Privacy, Data Never Leaves Your Machine
No cloud dependency, no subscription fees. API keys live only on your machine. LLM can be local Ollama. Secrets are redacted by the Security Gateway and never enter prompts or logs.
</td> </tr> </table>Core Features
| Area | What you get | |---|---| | AI Agent | ReAct reasoning loop · Multi-turn conversation context · Natural language strategy generation · Autonomous backtest analysis · Strategy iteration suggestions · Hallucination detection | | Skills System | 8 built-in quant Skills · Multi-source registry (project / user / workspace level) · Custom Skill support · Automatic tool dependency validation | | Strategy Closed-Loop | Conversational design → YAML validation → Event-driven backtest → Metric analysis → Parameter optimization → Version save → Paper deployment → Continuous monitoring | | Real-time Market Data | Native L2 orderbook streams · Kline/OHLCV · Ticker · Unified event model across all exchanges (Binance, OKX, Polymarket) | | Strategy Engine | YAML-based strategy configs · Indicator registry (SMA, EMA, RSI, BBANDS, MACD, …) · Strict Schema validation | | Backtesting | Event-driven engine · Full portfolio accounting · Sharpe, max drawdown, win rate, Calmar, Sortino, Recovery Factor, and more | | Paper Trading | Simulated fills from live L2 data · Position & balance tracking · Real-time unrealized PnL · Multi-account isolation | | Security Gateway | Secrets never enter prompts or logs · Per-tool risk policy · Shell & file-write disabled by default | | MCP Protocol | Runtime MCP server registration · Dynamic Agent tool extension · Compatible with mainstream MCP ecosystem | | Desktop App | Next.js + Tauri native app · Candlestick charts · Live orderbook panel · Agent chat · Strategy & backtest manager |
<div align="center"> <img src="apps/desktop/public/sl/回测报告.png" alt="Full backtest report" width="600" /> <br /> <sub>Full backtest report — K-line with trade markers, equity curve, monthly return heatmap, signal distribution, and trade records</sub> </div>Conversational Quant Workflow
PnLClaw's core experience is a conversation-driven strategy lifecycle. The Agent is not just a chat window — it's your quant research partner that maintains context across turns, autonomously calls tools, and completes full workflows.
One Conversation, Full Strategy Lifecycle
You: Design an EMA crossover strategy for BTC/USDT, 1-hour timeframe
Agent: [calls strategy_validate] Generated strategy config: EMA(20) crosses above EMA(50) to go long,
crosses below to close...
You: Backtest it for the last 90 days
Agent: [calls backtest_run] Backtest complete. Total return +12.3%, Sharpe 1.45, max drawdown -6.8%.
Suggestion: Win rate at 52% is low — consider adding an RSI filter to reduce false signals.
You: OK, add an RSI > 40 entry filter
Agent: [calls strategy_validate → backtest_run] Updated strategy and re-ran backtest.
Sharpe improved to 1.72, win rate up to 58%, max drawdown narrowed to -5.1%. Clear improvement.
You: Nice, deploy it to paper trading
Agent: [calls create_paper_account → deploy_strategy] Created strategy account and deployed...
<div align="center">
<img src="apps/desktop/public/sl/AI回测2.png" alt="AI Agent reasoning through strategy design" width="800" />
<br />
<sub>AI Agent reasoning through strategy design — analyzing market data, calling tools, and generating strategies autonomously</sub>
<br /><br />
<img src="apps/desktop/public/sl/AI回测3.png" alt="Strategy generated with backtest results" width="800" />
<br />
<sub>Strategy generated with complete backtest metrics and equity curve</sub>
</div>
Key Multi-Turn Capabilities
- Full Context Memory: The Agent has complete memory of all messages in the conversation. Say "backtest the strategy above," and it automatically extracts the full config from earlier messages.
- Intent Continuity: When you selected "1. Validate" or "2. Backtest" in the previous turn, the Agent carries forward all relevant context — it never treats follow-ups as isolated requests.
- Progressive Optimization: The Agent analyzes backtest metrics and proactively suggests improvements. You can iterate parameters back and forth in conversation while the Agent explores better combinations.
- Smart Context Compression: When conversations grow long, the Agent auto-compresses older turns while preserving key information, ensuring it stays within model context limits.
Autonomous Strategy Iteration
The Agent doesn't just execute your instructions — it proactively analyzes results and suggests next steps:
- Sharpe too low? Suggests adjusting stop-loss ratios or adding trend filters
- Low win rate but high risk-reward? Suggests maintaining strategy logic but reducing p
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
