{"id":43853971,"url":"https://github.com/2165187809-axe/clawdfolio","last_synced_at":"2026-02-12T07:01:21.825Z","repository":{"id":336793924,"uuid":"1151149423","full_name":"2165187809-AXE/clawdfolio","owner":"2165187809-AXE","description":"AI portfolio monitoring for Clawdbot with v2 finance workflows, option analytics, and a battle-tested options strategy playbook","archived":false,"fork":false,"pushed_at":"2026-02-10T03:43:24.000Z","size":265,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-10T07:56:18.085Z","etag":null,"topics":["claude-code","finance","investment","longport","moomoo","portfolio","portfolio-management","python","quantitative-finance","risk-analysis","stocks","trading"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2165187809-AXE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-06T05:31:56.000Z","updated_at":"2026-02-10T03:43:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/2165187809-AXE/clawdfolio","commit_stats":null,"previous_names":["2165187809-axe/portfolio-monitor"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/2165187809-AXE/clawdfolio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2165187809-AXE%2Fclawdfolio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2165187809-AXE%2Fclawdfolio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2165187809-AXE%2Fclawdfolio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2165187809-AXE%2Fclawdfolio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2165187809-AXE","download_url":"https://codeload.github.com/2165187809-AXE/clawdfolio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2165187809-AXE%2Fclawdfolio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29327808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T03:52:29.695Z","status":"ssl_error","status_checked_at":"2026-02-11T03:52:23.094Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","finance","investment","longport","moomoo","portfolio","portfolio-management","python","quantitative-finance","risk-analysis","stocks","trading"],"created_at":"2026-02-06T08:09:10.612Z","updated_at":"2026-02-11T06:00:49.709Z","avatar_url":"https://github.com/2165187809-AXE.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clawdfolio 🦙📊\n\n[![CI](https://github.com/2165187809-AXE/clawdfolio/actions/workflows/ci.yml/badge.svg)](https://github.com/2165187809-AXE/clawdfolio/actions/workflows/ci.yml)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Clawdbot](https://img.shields.io/badge/Clawdbot-Skill-1f7a4c)](https://github.com/2165187809-AXE/clawdfolio)\n[![Claude Code Compatible](https://img.shields.io/badge/Claude%20Code-Compatible-blueviolet)](https://github.com/anthropics/claude-code)\n\nEnglish | [中文](README_CN.md)\n\n\u003e **AI-powered portfolio monitoring for the Clawdbot ecosystem.**\n\u003e\n\u003e A production-oriented Clawdbot finance skill - aggregates portfolios from multiple brokers, calculates institutional-grade risk metrics, and generates intelligent trading alerts with production-grade data reliability. Its options methodology is synthesized from authoritative books and courses, validated through rigorous backtesting, and refined in multi-year live trading.\n\n---\n\n## Why Clawdfolio?\n\n| Traditional Tools | Clawdfolio |\n|-------------------|------------|\n| Manual data entry | Auto-sync from brokers |\n| Basic P\u0026L tracking | VaR, Sharpe, Beta, Max Drawdown |\n| Single broker view | Multi-broker aggregation |\n| Spreadsheet alerts | Smart RSI/price alerts |\n| No AI integration | **Clawdbot native skill** |\n\n---\n\n## Features\n\n- **Multi-Broker Support** - Longport (Longbridge), Moomoo/Futu, or demo mode\n- **Risk Analytics** - Volatility, Beta, Sharpe Ratio, Value at Risk, Max Drawdown\n- **Technical Analysis** - RSI, SMA, EMA, Bollinger Bands\n- **Concentration Analysis** - HHI index, sector exposure, correlation warnings\n- **Smart Alerts** - Price movements, RSI extremes, P\u0026L thresholds\n- **Earnings Calendar** - Track upcoming earnings for holdings\n- **DCA Analysis** - Dollar-cost averaging signals\n- **Options Toolkit** - Option quote/Greeks, option chain snapshot, buyback trigger monitor\n- **Options Strategy Playbook (v2.1)** - Dedicated methodology for Covered Call and Sell Put lifecycle management, with delta/gamma/margin guardrails\n- **Finance Workflow Suite (v2)** - 20 migrated production workflows from local `~/clawd/scripts`, categorized and runnable via `clawdfolio finance`\n\n---\n\n## What's New in v2.1.0\n\n- **Dedicated options strategy documentation** - Added `docs/OPTIONS_STRATEGY_PLAYBOOK_v2.1.md` as the canonical playbook for CC and Sell Put\n- **Research-to-execution alignment** - Formalized a framework synthesized from authoritative options books and courses, data-driven backtesting, and multi-year live trading\n- **Risk-first policy upgrade** - Added explicit gamma-risk, margin, leverage, roll, assignment, and pause-condition decision rules\n- **Feature mapping clarity** - Connected strategy decisions to `clawdfolio options` and `clawdfolio finance` workflows\n\nRead the full playbook: `docs/OPTIONS_STRATEGY_PLAYBOOK_v2.1.md`\n\n---\n\n## What's New in v2.0.0\n\n- **Full finance migration** - Migrated all active local finance workflows (reports, briefs, alerts, market intel, snapshots, DCA, security) from `~/clawd/scripts`\n- **Structured orchestration** - Added `clawdfolio finance` command group to list, initialize, and run workflows by id\n- **Organized layout** - Added categorized workflow catalog and bundled `legacy_finance` package content, with archived historical scripts retained\n- **Runtime safety** - Introduced mutable workspace bootstrap (`~/.clawdfolio/finance`) so legacy workflows keep writable config/state without polluting repo root\n- **Prior reliability gains retained** - Wilder RSI smoothing, Longport symbol fix, yfinance hardening, options quote/chain/buyback monitor remain included\n\n---\n\n## Quick Start\n\n### As Clawdbot Skill\n\nRun in Clawdbot:\n\n```\n/clawdfolio summary\n/clawdfolio risk\n/clawdfolio quotes AAPL MSFT NVDA\n/clawdfolio alerts\n```\n\n`clawdfolio` is also CLI-compatible with Claude Code environments.\n\n### CLI Installation\n\n```bash\n# Basic\npip install clawdfolio\n\n# With broker support\npip install clawdfolio[longport]  # Longport\npip install clawdfolio[futu]      # Moomoo/Futu\npip install clawdfolio[all]       # All brokers\n```\n\n### CLI Usage\n\n```bash\nclawdfolio summary              # Portfolio overview\nclawdfolio risk                 # Risk metrics\nclawdfolio quotes AAPL TSLA     # Real-time quotes\nclawdfolio alerts               # Check alerts\nclawdfolio earnings             # Upcoming earnings\nclawdfolio dca AAPL             # DCA analysis\nclawdfolio options expiries TQQQ\nclawdfolio options quote TQQQ --expiry 2026-06-18 --strike 60 --type C\nclawdfolio options chain TQQQ --expiry 2026-06-18 --side both --limit 10\nclawdfolio options buyback      # Trigger check from config option_buyback.targets\nclawdfolio finance list         # List all migrated finance workflows\nclawdfolio finance init         # Bootstrap ~/.clawdfolio/finance workspace\nclawdfolio finance run portfolio_daily_brief_tg_clean\n```\n\n### Finance Workflows (v2)\n\n`clawdfolio finance list` groups workflows by:\n- Portfolio Reports\n- Briefing Cards\n- Alerts and Monitors\n- Market Intelligence\n- Broker Snapshots\n- Strategy\n- Security\n\n---\n\n## Python API\n\n```python\nfrom clawdfolio.brokers import get_broker\nfrom clawdfolio.analysis import analyze_risk\n\n# Connect to broker\nbroker = get_broker(\"demo\")  # or \"longport\", \"futu\"\nbroker.connect()\n\n# Get portfolio and analyze\nportfolio = broker.get_portfolio()\nmetrics = analyze_risk(portfolio)\n\nprint(f\"Net Assets: ${portfolio.net_assets:,.2f}\")\nprint(f\"Sharpe Ratio: {metrics.sharpe_ratio:.2f}\")\nprint(f\"VaR 95%: ${metrics.var_95:,.2f}\")\n```\n\n---\n\n## Risk Metrics\n\n| Metric | Description |\n|--------|-------------|\n| **Volatility** | 20-day and 60-day annualized |\n| **Beta** | Correlation with SPY/QQQ |\n| **Sharpe Ratio** | Risk-adjusted returns |\n| **VaR** | Value at Risk (95%/99%) |\n| **Max Drawdown** | Largest peak-to-trough decline |\n| **HHI** | Portfolio concentration index |\n\n---\n\n## Configuration\n\n### Environment Variables\n\n```bash\n# Longport\nexport LONGPORT_APP_KEY=your_app_key\nexport LONGPORT_APP_SECRET=your_app_secret\nexport LONGPORT_ACCESS_TOKEN=your_access_token\n\n# Moomoo: Run OpenD locally on port 11111\n```\n\n### Config File (optional)\n\nCreate `config.yaml`:\n\n```yaml\nbrokers:\n  longport:\n    enabled: true\n  futu:\n    enabled: true\n    extra:\n      host: \"127.0.0.1\"\n      port: 11111\n\nalerts:\n  pnl_trigger: 500.0\n  rsi_high: 80\n  rsi_low: 20\n\noption_buyback:\n  enabled: true\n  symbol: \"TQQQ\"\n  state_path: \"~/.cache/clawdfolio/option_buyback_state.json\"\n  targets:\n    - name: \"target1\"\n      strike: 60\n      expiry: \"2026-06-18\"\n      type: \"C\"\n      trigger_price: 1.60\n      qty: 2\n      reset_pct: 0.20\n    - name: \"target2\"\n      strike: 60\n      expiry: \"2026-06-18\"\n      type: \"C\"\n      trigger_price: 0.80\n      qty: 1\n      reset_pct: 0.20\n```\n\n---\n\n## Supported Brokers\n\n| Broker | Region | Status |\n|--------|--------|--------|\n| Demo | Global | Built-in |\n| Longport | US/HK/SG | Optional |\n| Moomoo/Futu | US/HK/SG | Optional |\n\n---\n\n## Contributing\n\nContributions welcome! Please submit a Pull Request.\n\n---\n\n## License\n\nMIT License - see [LICENSE](LICENSE)\n\n---\n\n## Links\n\n- [GitHub Repository](https://github.com/2165187809-AXE/clawdfolio)\n- [Report Issues](https://github.com/2165187809-AXE/clawdfolio/issues)\n- [Claude Code Compatibility](https://github.com/anthropics/claude-code)\n\n---\n\n**If Clawdfolio helps you, please give it a ⭐ star!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2165187809-axe%2Fclawdfolio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2165187809-axe%2Fclawdfolio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2165187809-axe%2Fclawdfolio/lists"}