Skip to content

Repository files navigation

Anchor

CI

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

What Anchor does

Anchor combines three things into one system:

  1. Portfolio structure — Bedrock / Core / Satellite / Cash layers
  2. Rule execution — drawdown lines, operation limits, freeze state, dynamic holdings
  3. 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

Public vs private

Anchor is intentionally split into two worlds.

Private, local-only

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

Public, shareable

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.


Core pages

Private dashboard

Generated locally from your real portfolio data.

Main output:

  • portfolio_analysis.html on your Desktop

Use it for:

  • daily decision-making
  • risk review
  • allocation checks
  • weekly and monthly review support

Public system overview

  • 08-website/anchor-pro.html

Use it for:

  • explaining the Anchor method
  • showing the structure and rule model
  • sharing a sanitized version publicly

GitHub Pages example homepage

  • 06-dashboard/portfolio_analysis_example.html

Use it for:

  • public-facing landing page
  • example dashboard preview
  • safe online demo

Quick start

Step 1 — clone the repo

git clone https://github.com/killian99cm/anchor-system.git
cd anchor-system

Step 2 — create your local private data file

Use the example file as the base:

cp 06-dashboard/portfolio_data_example.json portfolio_data.json

Then replace the example values with your own holdings locally.

Step 3 — build your private dashboard

python "05-scripts/rebuild.py"

This generates your private outputs from local data.

Step 4 — open the dashboard

Open:

  • portfolio_analysis.html

That is your main daily cockpit.


Daily usage flow

Update local data

Refresh your local portfolio_data.json with the latest close, holdings, and notes.

Rebuild outputs

Run:

python "05-scripts/rebuild.py"

Read the private dashboard

Focus on:

  • decision strip
  • KPI matrix
  • allocation drift
  • risk board
  • action queue
  • trend cards

Only trade after rules pass

Use the dashboard to check:

  • current state
  • freeze conditions
  • drawdown lines
  • operation count
  • signal-specific rules such as DDX / premium-rate / time-stop

Weekly usage flow

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

Monthly usage flow

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

Public page generation

To refresh the sanitized public pages:

python "05-scripts/gen_anchor_pro.py"

This updates both:

  • 08-website/anchor-pro.html
  • 06-dashboard/portfolio_analysis_example.html

The public generator uses only sanitized example data and checks for private token leakage.


Validation

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

Key scripts

  • 05-scripts/data_processor.py — computes portfolio state, drawdown, risk, freeze, and layer contracts
  • 05-scripts/rebuild.py — builds the private dashboard from local portfolio data
  • 05-scripts/gen_anchor_pro.py — injects sanitized example data into public pages
  • 05-scripts/smoke_test.py — validates output integrity and privacy boundaries
  • 05-scripts/gen_monthly_attribution.py — supports monthly attribution workflow
  • 05-scripts/test_calculations.py — verifies core calculation behavior

Typical end-to-end user journey

  1. Discover the repo on GitHub
  2. Read the public README and public demo page
  3. Clone the repo
  4. Create a local private portfolio_data.json
  5. Run rebuild.py
  6. Open the private dashboard
  7. Use the dashboard daily after market close
  8. Run weekly checks and monthly attribution locally
  9. Use the public pages only for sharing the framework, never for exposing real holdings

Privacy note

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.

About

⚓ Rules-driven investment system — 109 live trades · 13mo validated · 4-layer pyramid · 4 iron laws · 6 bans. mx-data API → Python rebuild → pure HTML dashboard (zero deps). AI-assisted reviews, position checks, weekly & monthly reports. 30s to launch. ⭐ Discipline over impulse, data over intuition.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages