feat: add portfolio-rebalancer skill for target allocation rebalancing#9
Merged
ianalloway merged 1 commit intodevin/1771094911-openclaw-skillsfrom Feb 17, 2026
Conversation
New skill that calculates exact trades needed to rebalance portfolios: - Simple rebalance to target allocations - Rebalance with new cash deposits - Drift detection with configurable thresholds - Tax-aware buy-only rebalancing - Supports stocks, crypto, ETFs, and mixed portfolios Co-Authored-By: Ian Alloway <adapter_burners.1y@icloud.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add portfolio-rebalancer skill
Summary
Adds a new
portfolio-rebalancerOpenClaw skill that calculates trades needed to rebalance a portfolio to target allocations. The skill is a singleSKILL.mdfile with embeddedpython3 -csnippets covering:Supports stocks, crypto, ETFs, and mixed portfolios. Follows the same frontmatter/metadata format as the existing skills (e.g.,
kelly-criterion).Review & Testing Checklist for Human
python3 -csnippet in a terminal — the escaped f-strings inside double-quoted bash strings (\"\") are fragile and may fail on copy-paste. This is the biggest risk in the PR.targetsdon't-sum-to-1.0 behavior — the code documents targets "must sum to 1.0" but never validates it. Decide if a guard clause is needed or if silent garbage output is acceptable.Notes
python3(no pip packages), consistent with the repo's other skills.buy_only_rebalancefunction silently drops fractional-cent remainder cash — probably fine in practice but worth knowing.Link to Devin run: https://app.devin.ai/sessions/86b10eb8263049ef8e1b94ef22521f81
Requested by: @ianalloway