Technical Analyst
tradermonty/claude-trading-skills
This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.
Maintain portfolio allocations over time using calendar-based, threshold-based, and tax-efficient rebalancing strategies.
$ npx skills add JoelLewis/finance_skills --skill rebalancing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install JoelLewis/finance_skills rebalancing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/JoelLewis/finance_skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/wealth-management/skills/rebalancing .claude/skills/rebalancing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rebalancing" agent skill from https://github.com/JoelLewis/finance_skills/tree/main/plugins/wealth-management/skills/rebalancing into .claude/skills/rebalancing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rebalancing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/JoelLewis/finance_skills/tree/main/plugins/wealth-management/skills/rebalancingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add JoelLewis/finance_skills --skill rebalancing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install JoelLewis/finance_skills rebalancing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JoelLewis/finance_skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/wealth-management/skills/rebalancing .agents/skills/rebalancing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rebalancing" agent skill from https://github.com/JoelLewis/finance_skills/tree/main/plugins/wealth-management/skills/rebalancing into .agents/skills/rebalancing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rebalancing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add JoelLewis/finance_skills --skill rebalancing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install JoelLewis/finance_skills rebalancing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JoelLewis/finance_skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/wealth-management/skills/rebalancing .cursor/skills/rebalancing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rebalancing" agent skill from https://github.com/JoelLewis/finance_skills/tree/main/plugins/wealth-management/skills/rebalancing into .cursor/skills/rebalancing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rebalancing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/JoelLewis/finance_skills.git --path plugins/wealth-management/skills/rebalancing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add JoelLewis/finance_skills --skill rebalancing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install JoelLewis/finance_skills rebalancing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JoelLewis/finance_skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/wealth-management/skills/rebalancing .gemini/skills/rebalancing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rebalancing" agent skill from https://github.com/JoelLewis/finance_skills/tree/main/plugins/wealth-management/skills/rebalancing into .gemini/skills/rebalancing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rebalancing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install JoelLewis/finance_skills rebalancingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add JoelLewis/finance_skills --skill rebalancing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/JoelLewis/finance_skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/wealth-management/skills/rebalancing .github/skills/rebalancing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rebalancing" agent skill from https://github.com/JoelLewis/finance_skills/tree/main/plugins/wealth-management/skills/rebalancing into .github/skills/rebalancing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rebalancing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add JoelLewis/finance_skills --skill rebalancing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install JoelLewis/finance_skills rebalancing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JoelLewis/finance_skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/wealth-management/skills/rebalancing .opencode/skills/rebalancing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rebalancing" agent skill from https://github.com/JoelLewis/finance_skills/tree/main/plugins/wealth-management/skills/rebalancing into .opencode/skills/rebalancing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rebalancing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rebalancingMaintain portfolio allocations over time using calendar-based, threshold-based, and tax-efficient rebalancing strategies.
Rebalancing is an agent skill from JoelLewis/finance_skills. Maintain portfolio allocations over time using calendar-based, threshold-based, and tax-efficient rebalancing strategies. Use when the user asks about when to rebalance, rebalancing bands, transaction cost trade-offs, tax-efficient rebalancing, or the rebalancing premium. Also trigger when users mention 'my portfolio drifted', 'how often should I rebalance', 'rebalancing across taxable and IRA accounts', 'volatility harvesting', 'buy low sell high automatically', or ask whether to use cash flows to rebalance.
Its SKILL.md is about 3.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/rebalancing.py`).
It sits in Business, Finance & HR. The repository describes itself as: Claude Code skill plugins for financial services — 81 skills across 7 domain plugins covering investment management, compliance, advisory practice, trading, and operations. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 5c498ea. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
uvpython3pipFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv and pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Rebalancing loads about 3.9k tokens when it runs. Until then it costs about 132 tokens; SKILL.md has 1,979 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from JoelLewis/finance_skills at commit 5c498ea, republished under its MIT licence (© JoelLewis). 1,979 words, ~3,938 tokens.
.claude/skills/rebalancing/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Rebalance at fixed time intervals regardless of drift magnitude:
Calendar rebalancing is simple to implement and schedule but may miss large dislocations between dates or trigger unnecessary trades when drift is minimal.
Rebalance when any asset weight drifts beyond a defined tolerance band around its target:
Threshold rebalancing is more responsive to market dislocations and avoids unnecessary trades when markets are calm. However, it requires more frequent monitoring.
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:
Systematic rebalancing generates a "volatility harvesting" or "rebalancing premium" through the buy-low/sell-high mechanism:
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:
Note: The rebalancing premium is not a free lunch — it underperforms in trending markets where winners keep winning.
Costs incurred when rebalancing that reduce net returns:
Total implementation cost = commissions + half-spread + market impact + opportunity cost
Strategies to minimize tax impact when rebalancing in taxable accounts:
Rebalancing and TLH should be planned together, not as separate trade lists:
Tax benefit = Realized loss * Marginal tax rate. For the 61-day wash-sale window, the $3,000 ordinary-income offset, replacement selection, and full TLH mechanics, see the tax-loss-harvesting skill.
When an investor has multiple account types (taxable, IRA, 401k), optimize rebalancing by:
Factors that determine optimal band width:
Use regular deposits or withdrawals to move toward target weights without explicit rebalancing trades:
The concepts above describe the what and why of rebalancing. This section covers the operational how — the step-by-step process an advisor follows to execute a rebalance for a client household.
Step 1: Aggregate Household View Assemble the complete picture across all accounts (taxable brokerage, Traditional IRA, Roth IRA, 401(k), 529, trust). Calculate the household-level allocation by summing positions across all accounts, not just individual account allocations. Many drift problems are invisible at the account level but obvious at the household level.
Step 2: Asset Location Review Before proposing trades, document which account types hold which asset classes:
If asset location is suboptimal, the rebalance is an opportunity to improve it — but only if the tax cost of repositioning is justified by the long-term tax savings.
Step 3: Drift Analysis and Trade Generation For each asset class, calculate drift from target and compare against tolerance bands (from the IPS or firm default):
Step 4: Tax-Impact Estimation For each proposed sell trade in a taxable account, estimate the tax consequence:
Step 5: Cross-Account Optimization Minimize total household tax impact by choosing where to execute each trade:
Step 6: Before/After Comparison Generate a before/after allocation comparison for advisor review and client communication:
This comparison serves as both a decision tool (does the rebalance justify its costs?) and a compliance artifact (documenting the rationale for the trades).
Step 7: Execution and Confirmation
| Formula | Expression | Use Case |
|---|---|---|
| Threshold Trigger | w_actual - w_target | |
| Optimal Band Width | band ~ (3tc / (2lambda*sigma^2))^(1/3) | Leland optimal no-trade zone |
| Tax-Loss Benefit | Benefit = Loss * Tax Rate | Value of harvested losses |
| Transaction Cost | TC = commission + spread/2 + impact | Total rebalancing cost |
| Drift | Drift_i = w_actual_i - w_target_i | Weight deviation from target |
| Trade Size | Trade_i = (w_target_i - w_actual_i) * Portfolio Value | Dollar amount to trade |
| Rebalancing Premium | RP ~ (1/2) * Σ w_i * sigma_i^2 - (1/2) * sigma_p^2 | Volatility harvesting estimate |
Given:
Calculate: Rebalancing trigger and required trades
Solution:
Check drift:
Target dollar amounts:
Required trades:
Proceeds from equity sales fund the bond purchases. In a taxable account, check the cost basis of equity lots being sold to estimate tax impact before executing.
Given:
Calculate: Tax benefit of harvesting the loss
Solution:
Realized loss from sale: $10,000
Tax benefit calculation:
If the investor had no capital gains to offset:
Implementation:
Note: TLH creates a lower cost basis in the replacement security, so taxes are deferred, not eliminated. However, the time value of the tax deferral and the ability to offset gains at favorable rates makes TLH valuable.
Run with uv run scripts/rebalancing.py (the PEP 723 header resolves dependencies automatically) or with python3 scripts/rebalancing.py after pip install numpy scipy. The bare run prints a demo covering drift analysis, threshold checks, trade generation, cash flow rebalancing, transaction costs, tax-aware lot selection, Leland bands, and the rebalancing premium. Pass --verify to assert the demo outputs match this skill's worked examples (prints PASS/FAIL), or --help for an overview of the available classes. The file is primarily meant to be imported as a module (e.g., from rebalancing import DriftAnalyzer, TradeGenerator, TaxAwareLotSelector).
© JoelLewis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (scripts) in plugins/wealth-management/skills/rebalancing of JoelLewis/finance_skills.
Open the folder on GitHubat commit 5c498ea
Rebalancing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rebalancing this skillJoelLewis/finance_skills | 206 | — | ~3.9k | Automated safety check: Pass | MIT | |
| Technical Analysttradermonty/claude-trading-skills | 3k | 4 repos | ~4.6k | Automated safety check: Pass | MIT | |
| Theme Detectortradermonty/claude-trading-skills | 3k | 2 repos | ~4.9k | Automated safety check: Pass | MIT | |
| Creating Financial ModelsChen-zexi/open-ptc-agent | 729 | 3 repos | ~1.3k | Automated safety check: Pass | MIT | |
| Stock APIzhangxiangliang/stock-api | 2k | — | ~507 | Automated safety check: Pass | MIT | |
| Itr Walakaranb192/itr-wala | 871 | — | ~3.6k | Automated safety check: Pass | MIT |
tradermonty/claude-trading-skills
This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.
tradermonty/claude-trading-skills
Detect and analyze trending market themes across sectors. An agent skill from tradermonty/claude-trading-skills.
Chen-zexi/open-ptc-agent
This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions
zhangxiangliang/stock-api
Fetch real-time stock quotes, K-line (candlestick) history, and search symbols for China A-shares, Hong Kong, and US markets.
karanb192/itr-wala
File Indian income tax returns (ITR) for FY 2025-26 / AY 2026-27.
zillionare/zillionare
面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。
JoelLewis/finance_skills
Determine how to distribute capital across asset classes using strategic and tactical allocation frameworks.
JoelLewis/finance_skills
Determine how much capital to allocate to individual positions within a portfolio.
JoelLewis/finance_skills
Analyze commodity markets including futures curve dynamics, roll yield, and supply/demand fundamentals.
JoelLewis/finance_skills
Analyze currency markets, exchange rate mechanics, and FX risk management for international portfolios.
JoelLewis/finance_skills
Provide frameworks for managing and paying off personal debt effectively.
JoelLewis/finance_skills
Build diversified portfolios using correlation analysis, efficient frontier construction, and factor-based diversification.
Categories
Maintain portfolio allocations over time using calendar-based, threshold-based, and tax-efficient rebalancing strategies. Rebalancing is an agent skill from JoelLewis/finance_skills. Maintain portfolio allocations over time using calendar-based, threshold-based, and tax-efficient rebalancing strategies.
Rebalancing fits situations like: the user asks about when to rebalance; rebalancing bands; transaction cost trade-offs; tax-efficient rebalancing.
Run `npx skills add JoelLewis/finance_skills --skill rebalancing -a claude-code`. Or copy the skill folder (plugins/wealth-management/skills/rebalancing in JoelLewis/finance_skills) into .claude/skills/rebalancing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add JoelLewis/finance_skills --skill rebalancing -a codex`. Or copy the skill folder (plugins/wealth-management/skills/rebalancing in JoelLewis/finance_skills) into .agents/skills/rebalancing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JoelLewis/finance_skills --skill rebalancing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rebalancing, .gemini/skills/rebalancing, .github/skills/rebalancing and .opencode/skills/rebalancing in your project.
Going by SKILL.md and its folder, Rebalancing needs Python for the scripts in its folder and the command-line tools its instructions call (uv, python3 and pip). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use uv and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Rebalancing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.9k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Rebalancing: Technical Analyst (tradermonty/claude-trading-skills, 3k stars), Theme Detector (tradermonty/claude-trading-skills, 3k stars), Creating Financial Models (Chen-zexi/open-ptc-agent, 729 stars) and Stock API (zhangxiangliang/stock-api, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
JoelLewis (a GitHub user) maintains it in JoelLewis/finance_skills, which has 206 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on July 18, 2026.
Source: JoelLewis/finance_skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.