rebalancing

rebalancing is a skill for Claude Code from JoelLewis/finance_skills. It costs 110 tokens per session (3,484 once invoked), scanned A, original, MIT.

A guide to restoring a portfolio to its intended mix of investments after market movements change the percentages. Rebalancing means buying and selling to bring those percentages back toward their targets.

In plain words
What is it for?
Use it to set rebalancing schedules and tolerance bands, weigh trading costs and taxes, and maintain target portfolio allocations.
Why use it?
A portfolio can become riskier or less diversified when one type of investment grows faster than others. The guide compares scheduled rebalancing with rules that act when an allocation moves too far.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the wealth-management plugin — 38 skills shipped together

Good fit Use it to set rebalancing schedules and tolerance bands, weigh trading costs and taxes, and maintain target portfolio allocations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joellewis/finance_skills/rebalancing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JoelLewis/finance_skills --skill rebalancing
Clone the repo
git clone --depth 1 https://github.com/JoelLewis/finance_skills

Made for: Claude Code.

Or install wealth-management, the plugin that ships this one along with the rest of its 38 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rebalancing

README.md
[![agentmods](https://agentmods.dev/badge/skills/joellewis/finance_skills/rebalancing/github.svg)](https://agentmods.dev/skills/joellewis/finance_skills/rebalancing)
Your own site
<a href="https://agentmods.dev/skills/joellewis/finance_skills/rebalancing"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/rebalancing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rebalancing

Your own site · 80×15
<a href="https://agentmods.dev/skills/joellewis/finance_skills/rebalancing"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/rebalancing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,484 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 15 Sept 2026
  • Snyk pass 15 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.03484
Opus 5.5 $0.00044 $0.01394
Sonnet 5.5 $0.00022 $0.00697
Haiku 4.5 $0.00011 $0.00348

Measured 3d ago against content hash 9b876d579e1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rebalancing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/rebalancing.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/wealth-management/skills/rebalancing/SKILL.md · 245 lines

How it starts

The opening of the file, as written. The whole thing — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rebalancing

Core Concepts

Calendar Rebalancing

Rebalance at fixed time intervals regardless of drift magnitude:

  • Monthly: Tightest tracking to targets; highest transaction costs
  • Quarterly: Common institutional frequency; good balance of tracking and costs
  • Annually: Lowest cost; may allow significant drift between dates

Calendar rebalancing is simple to implement and schedule but may miss large dislocations between dates or trigger unnecessary trades when drift is minimal.

Threshold (Band) Rebalancing

Rebalance when any asset weight drifts beyond a defined tolerance band around its target:

  • Monitor weights continuously (or at regular intervals)
  • Trigger rebalancing when |w_actual - w_target| > tolerance
  • Typical bands: +/- 3% to +/- 5% (absolute) or +/- 20% to +/- 25% (relative)

Threshold rebalancing is more responsive to market dislocations and avoids unnecessary trades when markets are calm. However, it requires more frequent monitoring.

Optimal Band Width (Leland Model)

Leland (2000) derived the optimal no-trade band width as a function of transaction costs, risk aversion, and asset variance:

Band width proportional to (3 * transaction_cost / (2 * risk_aversion * variance))^(1/3)

Key intuition:

  • Higher transaction costs → wider bands (trade less)
  • Higher risk aversion → narrower bands (maintain target more tightly)
  • Higher variance → narrower bands (drift happens faster, risk of deviation is greater)

Rebalancing Premium

Systematic rebalancing generates a "volatility harvesting" or "rebalancing premium" through the buy-low/sell-high mechanism:

  • When an asset rises, its weight increases → rebalancing sells some (sell high)
  • When an asset falls, its weight decreases → rebalancing buys some (buy low)

This effect is sometimes called Shannon's Demon: in a two-asset portfolio with equal expected returns but independent volatility, the constantly rebalanced portfolio outperforms buy-and-hold. The rebalancing premium is larger when:

  • Asset volatilities are higher
  • Correlations are lower
  • Assets have similar expected returns (so mean-reversion dominates trends)

Read the full file on GitHub · 245 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 245 lines · 110 tokens per session scan A 9b876d579e1d

Subscribe to this mod's changes

rebalancing is a skill published in the GitHub repository JoelLewis/finance_skills (272 stars, last pushed 3d ago), licensed MIT. It adds 110 tokens to every session and 3,484 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-27.

Related

rebalancing compared with skills from other repositories

rebalancing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rebalancingJoelLewis/finance_skillsSkill2723d agoMITA110Claude Code
Freelance EmpireLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA71Claude Code, Codex
agent-otc-tradeLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA80Claude Code
agentic-streetLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA91Claude Code, Codex
alpha-vantageforyourhealth111-pixel/Vibe-SkillsSkill3.9k21d agoApache-2.0A126Claude Code, Codex
prompt-proximity-architectureelvisun/newsjackSkill1.7k4d agoMITA67Claude Code
syndicromainsimon/paperasseSkill2.6k18d agoMITA204Claude Code