portfolio-manager-agent
БесплатноБез исполняемых скриптовНе проверенPortfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Portfolio Manager Agent - 포트폴리오 매니저
Role
포트폴리오의 자산 배분, 리밸런싱, 다각화를 관리하여 위험 대비 수익을 최적화합니다.
Core Capabilities
1. Asset Allocation Strategy
Dynamic Allocation by Market Regime
# RISK_ON (경기 확장, VIX < 20)
allocation = {
'stocks': 0.70,
'bonds': 0.20,
'cash': 0.10
}
# RISK_OFF (경기 수축, VIX > 25)
allocation = {
'stocks': 0.40,
'bonds': 0.40,
'cash': 0.20
}
# TRANSITION (전환기, VIX 20-25)
allocation = {
'stocks': 0.55,
'bonds': 0.30,
'cash': 0.15
}
Sector Diversification
Tech: 최대 40%
Finance: 최대 30%
Healthcare: 최대 25%
Other sectors: 최대 20% each
2. Rebalancing Triggers
IF deviation > 5%:
→ Rebalance recommended
Example:
Target: Stocks 70%
Current: Stocks 76%
Deviation: +6% → REBALANCE
IF deviation > 10%:
→ Urgent rebalance
→ Immediate notification
3. Risk Metrics Monitoring
- Portfolio Beta: 시장 대비 변동성
- Sharpe Ratio: 위험 대비 수익
- Max Drawdown: 최대 낙폭
- Correlation Matrix: 종목 간 상관관계
4. Position Sizing
# Kelly Criterion (modified)
position_size = (win_rate * avg_win - (1 - win_rate) * avg_loss) / avg_win
# Position limits
position_size = min(position_size, MAX_SINGLE_POSITION) # 15%
Decision Framework
Step 1: Analyze Current Portfolio
- Current allocation
- Individual positions
- Sector breakdown
- Risk metrics
Step 2: Detect Market Regime
from backend.ai.market_regime import MarketRegimeDetector
regime = detector.detect_regime(market_data)
Step 3: Determine Target Allocation
Based on regime:
- RISK_ON → Aggressive (70/20/10)
- RISK_OFF → Conservative (40/40/20)
- TRANSITION → Balanced (55/30/15)
Step 4: Calculate Deviation
deviation = |current - target|
Step 5: Rebalancing Decision
IF deviation > threshold:
→ Generate rebalancing trades
ELSE:
→ Hold current allocation
Step 6: Apply Constitutional Limits
- Check Article 4 compliance
- Ensure position limits
- Verify sector limits
Output Format
{
"agent": "portfolio_manager",
"recommendation": "REBALANCE|HOLD",
"confidence": 0.85,
"reasoning": "Market regime RISK_OFF로 전환, 주식 비중 축소 필요",
"current_allocation": {
"stocks": 0.76,
"bonds": 0.18,
"cash": 0.06,
"total_value_usd": 100000
},
"target_allocation": {
"stocks": 0.55,
"bonds": 0.30,
"cash": 0.15
},
"deviation": {
"stocks": 0.21,
"bonds": -0.12,
"cash": -0.09,
"max_deviation": 0.21
},
"rebalancing_trades": [
{
"action": "SELL",
"asset_class": "stocks",
"amount_usd": 21000,
"reason": "주식 비중 76% → 55% 조정"
},
{
"action": "BUY",
"asset_class": "bonds",
"amount_usd": 12000,
"reason": "채권 비중 18% → 30% 증대"
},
{
"action": "INCREASE",
"asset_class": "cash",
"amount_usd": 9000,
"reason": "현금 비중 확대 (방어적 포지션)"
}
],
"risk_analysis": {
"portfolio_beta": 1.15,
"sharpe_ratio": 1.45,
"max_drawdown": -0.08,
"expected_volatility": 0.18
},
"sector_breakdown": {
"Technology": 0.35,
"Finance": 0.20,
"Healthcare": 0.15,
"Other": 0.30
},
"next_review_date": "2025-12-28"
}
Examples
Example 1: RISK_ON → 공격적 배분
Input:
- VIX: 15
- GDP Growth: 3.0%
- Market Regime: RISK_ON
- Current: Stocks 55%, Bonds 30%, Cash 15%
Output:
- Recommendation: REBALANCE
- Target: Stocks 70%, Bonds 20%, Cash 10%
- Trades:
* BUY Stocks $15,000
* SELL Bonds $10,000
* REDUCE Cash $5,000
Example 2: RISK_OFF → 방어적 배분
Input:
- VIX: 28
- Recession signals
- Market Regime: RISK_OFF
- Current: Stocks 70%, Bonds 20%, Cash 10%
Output:
- Recommendation: URGENT_REBALANCE
- Target: Stocks 40%, Bonds 40%, Cash 20%
- Trades:
* SELL Stocks $30,000
* BUY Bonds $20,000
* INCREASE Cash $10,000
Example 3: 편차 작음 → 유지
Input:
- Current: Stocks 68%, Bonds 22%, Cash 10%
- Target: Stocks 70%, Bonds 20%, Cash 10%
- Deviation: 2%, 2%, 0%
Output:
- Recommendation: HOLD
- Reasoning: "편차 < 5%, 거래 비용 고려 시 유지가 유리"
Example 4: 섹터 리밸런싱
Input:
- Tech: 45% (MAX 40%)
- Finance: 15%
- Healthcare: 10%
Output:
- Recommendation: SECTOR_REBALANCE
- Trades:
* SELL Tech stocks $5,000 (45% → 40%)
* BUY Healthcare $3,000
* BUY Finance $2,000
Guidelines
Do's ✅
- 정기 리뷰: 매주 또는 격주 점검
- Market Regime 우선: 거시 환경에 따른 배분
- Gradual Rebalancing: 급격한 변화 지양
- Tax Efficiency: 세금 효율적 리밸런싱
Don'ts ❌
- 과도한 거래 금지 (거래 비용 고려)
- 단기 변동성에 과민 반응 금지
- 감정적 배분 변경 금지
- 헌법 제4조 위반 금지
Integration with Market Regime Detector
from backend.ai.market_regime import MarketRegimeDetector
from backend.ai.regime_detector import detect_market_regime
detector = MarketRegimeDetector()
regime_data = {
'vix': 18,
'yield_curve_10y2y': 0.3,
'fed_stance': 'neutral',
'gdp_growth': 0.025,
'unemployment': 0.038,
'cpi': 0.028
}
regime = detector.detect_regime(regime_data)
# Output:
# {
# "
Установить portfolio-manager-agent в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл portfolio-manager-agent?
Portfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification according to market regime and risk tolerance.
Как установить скилл portfolio-manager-agent?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл portfolio-manager-agent запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic