Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
dzianisv avatar

Portfolio Construction

  • 1 installs
  • Updated July 30, 2026
  • dzianisv/backtest

Builds a diversified, crash-resistant target portfolio by combining a de-concentrated equity core with uncorrelated diversifiers like gold, trend-following, and Treasuries.

About

Produces target allocations for deploying a lump sum using all-weather, risk-parity, and golden-butterfly style mixes with a dry-powder reserve. A developer uses it to allocate a portfolio, diversify away from cap-weight indices, or get multi-asset target weights.

  • Equal-weight, international, value, min-vol equity core
  • Diversifiers: gold, managed futures, Treasuries, TIPS, cash reserve

Portfolio Construction by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #909 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
npx skills add https://github.com/dzianisv/backtest --skill portfolio-construction

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedJuly 30, 2026
Repositorydzianisv/backtest

What it does

Builds a diversified, crash-resistant target portfolio by combining a de-concentrated equity core with uncorrelated diversifiers like gold, trend-following, and Treasuries.

Files

SKILL.mdMarkdownGitHub ↗

Portfolio Construction (Bubble-Aware, All-Weather)

Builds a target allocation that participates in equity upside but survives a concentration-bubble unwind, without requiring a market-timing call. The thesis: at high valuations + extreme concentration, the fix is de-concentrate the equity core + add uncorrelated diversifiers + keep dry powder, not "predict the crash" or "go to cash."

Mandatory framing

  • Educational framework, not personalized advice; consult a fee-only fiduciary at meaningful size.
  • Assumes a long-horizon investor treating this as growth capital, with emergency fund and

high-interest debt already handled.

  • Defense underperforms in bull markets — that lag is the premium paid to cap the left tail.

The four macro regimes (the design principle)

Never bet everything on one. Hold something that wins in each: prosperity (stocks, small-cap value), recession/deflation (long Treasuries, cash), inflation (gold, commodities, TIPS), tight money (T-bills).

Target allocation — pick a risk tier

SleeveETF examplesDefensiveBalancedGrowth-tilt
US large capVOO / RSP (equal-wt)12%18%26%
InternationalVXUS / VEA+VWO10%12%12%
US small/mid valueAVUV / VBR6%8%10%
Min-vol / qualityUSMV / QUAL8%7%6%
GoldGLD / IAU12%10%8%
Trend / managed futuresDBMF / KMLM12%10%8%
Long/intermediate TreasuriesTLT / IEF8%7%4%
TIPS / commoditiesSCHP / PDBC5%3%2%
Dry powder (T-bills)SGOV / BIL25%22%22%
Tail / anti-beta (optional)TAIL / BTAL2%3%2%
Equity beta~36%~45%~54%

Choose by the drawdown the user can actually live through, not by the return they want.

Why this shape (the evidence)

  • Equity is de-concentrated (equal-weight/intl/value/min-vol) instead of ~40% AI mega-caps.
  • Gold + trend are the diversifiers that worked in 2022 when bonds failed; trend is "crisis alpha."
  • Treasuries kept modest (not classic All-Weather's 40%) given the 2022 duration lesson and low-yield start.
  • Dry powder earns ~4-5% and is deployed into declines by rule (hand off to dip-tranches-strategy).
  • Backtest (this repo's backtests/crash_protection_backtest.py): diversified mixes earned ~7-8%/yr 2000-2026 with

−16% to −24% max drawdowns vs the S&P's −55% / QQQ's −83%, and roughly doubled through the 2000-2009 lost decade.

Sizing mechanics

  • Optionally scale the risky sleeves by the exposure_multiplier from regime-detection

(reduce equity/trend, park the difference in T-bills) — keep gold/TIPS as structural diversifiers.

  • Within sleeves, default to the listed weights; for the multi-name equity sleeve use the ETF

(don't stock-pick) unless a separate factor skill is in play.

  • Respect risk-management caps (per-asset, per-sleeve, gross) — it can scale you down, never up.

Outputs (contract)

{
  "as_of": "2026-05-29",
  "tier": "balanced",
  "targets": {"RSP": 0.18, "VXUS": 0.12, "AVUV": 0.08, "USMV": 0.07,
              "GLD": 0.10, "DBMF": 0.10, "TLT": 0.07, "SCHP": 0.03,
              "SGOV": 0.22, "BTAL": 0.03},
  "equity_beta": 0.45,
  "notes": "Dry powder (SGOV) routed to dip-tranches skill for drawdown deployment."
}

Hand-offs

  • Cash deployment schedule + dip reserve → dip-tranches-strategy.
  • Drift/rebalance back to these targets → rebalancing.
  • Exposure scaling → regime-detection (input) and risk-management (override).
  • Loss harvesting on the taxable sleeves → tax-loss-harvesting.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.