⚠️ Disclaimer — Anchor is for educational purposes only, not financial advice. Markets carry risk; you may lose money. Use at your own risk.
⭐ If Anchor helps you, star this repo so others can find it. ⭐ 如果这套体系对你有帮助,欢迎点击 Star,让更多人看到它。
| 109 live trades | 80% decision accuracy | 0% chase violations | 13 mo track record |
|---|---|---|---|
| 实操交易笔数 | 决策判定准确率 | 追高违规次数 | 持续运行记录 |
Anchor is a rules-driven personal investment management system for individual investors.
It turns a personal portfolio process into a repeatable workflow:
- maintain a four-layer allocation model
- encode investment discipline into executable checks
- generate a private local dashboard from a single portfolio data file
- publish sanitized public demo pages without exposing private holdings
Four-layer pyramid (weight = role):
| Layer | Weight | Role | Rule |
|---|---|---|---|
| 🛡️ Bedrock | 45% | low-volatility ballast, portfolio foundation | hold long-term · 0-1 ops/year |
| 🚀 Core Growth | 20% | broad-index core assets | DCA + valuation gate |
| 🔥 Satellite Attack | 20% | high-beta offense, capped per position | -8% stop · ≤4 trades/month |
| 💰 Cash Reserve | 15% | safety buffer, waiting for extreme opportunities | deploy on crashes |
Six iron rules:
- 🛑 Never add to a losing position — no averaging down while underwater
- 🔒 72-hour freeze after selling — proceeds cool in cash before re-entry
- 📉 -8% stop-loss (1-day buffer + next-day 14:30 sector confirm)
- 📊 Portfolio drawdown lines — -5% / -10% / -15% trigger escalating cuts
- ⏱ 30-day time stop — satellite held >30 days and underperforming ≥5% → exit
- 🌐 Entry premium ≤3% — no chasing QDII at high premium, wait for NAV reversion
Permanently banned: ❌ averaging down · ❌ switching targets same day · ❌ buying without a plan
"No predictions. Discipline only." — 不靠预测,靠纪律
Anchor combines three things into one system:
- Portfolio structure — Bedrock / Core / Satellite / Cash layers
- Rule execution — drawdown lines, operation limits, freeze state, dynamic holdings
- Output surfaces — private dashboard, public demo pages, snapshots, and smoke checks
It is not:
- a stock-picking engine
- an auto-trading bot
- a public repository for your real portfolio data
- Docs index — entry point for all guides
- Setup · FAQ · Troubleshooting
- Contributing · Changelog
- Live demo · Track record (simulated backtest)
Anchor is intentionally split into two worlds.
These stay on your machine and should not be pushed to GitHub:
- your real
portfolio_data.json - local reviews, rules, strategy notes, and memory backups
- private dashboard outputs built from real holdings
These are safe to publish:
- code under
05-scripts/that does not embed private data - sanitized example input:
06-dashboard/portfolio_data_example.json - public overview page:
08-website/anchor-pro.html - GitHub Pages example homepage:
06-dashboard/portfolio_analysis_example.html
The repository is configured so the private workspace stays local while public assets remain shareable.
Generated locally from your real portfolio data.
Main output:
portfolio_analysis.htmlon your Desktop
Use it for:
- daily decision-making
- risk review
- allocation checks
- weekly and monthly review support
08-website/anchor-pro.html
Use it for:
- explaining the Anchor method
- showing the structure and rule model
- sharing a sanitized version publicly
06-dashboard/portfolio_analysis_example.html
Use it for:
- public-facing landing page
- example dashboard preview
- safe online demo
git clone https://github.com/killian99cm/anchor-system.git
cd anchor-systemUse the example file as the base:
cp 06-dashboard/portfolio_data_example.json portfolio_data.jsonThen replace the example values with your own holdings locally.
python "05-scripts/rebuild.py"This generates your private outputs from local data.
Open:
portfolio_analysis.html
That is your main daily cockpit.
Refresh your local portfolio_data.json with the latest close, holdings, and notes.
Run:
python "05-scripts/rebuild.py"Focus on:
- decision strip
- KPI matrix
- allocation drift
- risk board
- action queue
- trend cards
Use the dashboard to check:
- current state
- freeze conditions
- drawdown lines
- operation count
- signal-specific rules such as DDX / premium-rate / time-stop
Once per week:
- review the four-layer allocation
- scan pending actions and red lights
- check whether any layer drift requires attention
- generate and read the weekly summary from your local workflow
Once per month:
- review monthly attribution
- inspect which rules protected you
- inspect which rules triggered too late or too often
- update the system only if a change is justified by real behavior and repeatable evidence
To refresh the sanitized public pages:
python "05-scripts/gen_anchor_pro.py"This updates both:
08-website/anchor-pro.html06-dashboard/portfolio_analysis_example.html
The public generator uses only sanitized example data and checks for private token leakage.
Run the smoke test before publishing or after larger changes:
python "05-scripts/smoke_test.py"It verifies:
- rebuild output exists
- snapshots are consistent
- public pages stay sanitized
- dynamic holding contracts are present
- inline scripts still parse correctly
- GitHub Pages example page remains valid
05-scripts/data_processor.py— computes portfolio state, drawdown, risk, freeze, and layer contracts05-scripts/rebuild.py— builds the private dashboard from local portfolio data05-scripts/gen_anchor_pro.py— injects sanitized example data into public pages05-scripts/smoke_test.py— validates output integrity and privacy boundaries05-scripts/gen_monthly_attribution.py— supports monthly attribution workflow05-scripts/test_calculations.py— verifies core calculation behavior
- Discover the repo on GitHub
- Read the public README and public demo page
- Clone the repo
- Create a local private
portfolio_data.json - Run
rebuild.py - Open the private dashboard
- Use the dashboard daily after market close
- Run weekly checks and monthly attribution locally
- Use the public pages only for sharing the framework, never for exposing real holdings
This repository is built around a strict rule:
Real portfolio data stays local. Public GitHub pages use sanitized examples only.
If you use Anchor, keep your real holdings out of GitHub and only publish the public example assets.

