Intelligent portfolio management for multi-asset investors.
Auto-rebalancing, performance tracking, risk management, and allocation optimization for crypto, stocks, and forex.
投资组合顾问:
| 服务 | 价格 | 交付 |
|---|---|---|
| ------ | ------ | ------ |
| 组合诊断 | ¥800/次 | 持仓分析 + 优化建议 |
| 配置方案 | ¥2000/份 | 个性化资产配置 |
| 月度调仓 | ¥3000/月 | 每周监控 + 调仓建议 |
| 定制系统 | ¥8000 起 | 自动再平衡系统 |
联系: 微信/Telegram 私信,备注"组合管理"
Investors struggle with:
Portfolio Manager provides:
clawhub install portfolio-manager
const { PortfolioManager } = require('portfolio-manager');
const portfolio = new PortfolioManager({
apiKey: 'your-api-key',
baseCurrency: 'USD',
exchanges: ['binance', 'coinbase'],
wallets: ['metamask'],
riskProfile: 'moderate'
});
// Add exchange holdings
await portfolio.addExchange('binance', {
apiKey: 'your-binance-key',
apiSecret: 'your-binance-secret'
});
// Add wallet holdings
await portfolio.addWallet('metamask', {
address: '0x1234...5678',
chainId: 1 // Ethereum mainnet
});
// Add manual holdings
await portfolio.addHolding({
symbol: 'BTC',
amount: 0.5,
averageCost: 65000,
category: 'crypto'
});
const overview = await portfolio.getOverview();
console.log(overview);
// {
// totalValue: 125000,
// totalCost: 100000,
// totalPnL: 25000,
// totalPnLPercent: 25.0,
// dailyPnL: 1500,
// dailyPnLPercent: 1.2,
// allocation: {
// crypto: 60,
// stocks: 30,
// cash: 10
// },
// topHoldings: [
// { symbol: 'BTC', value: 45000, percent: 36 },
// { symbol: 'ETH', value: 25000, percent: 20 },
// { symbol: 'AAPL', value: 15000, percent: 12 }
// ]
// }
await portfolio.setTargetAllocation({
crypto: 50,
stocks: 35,
cash: 15,
rebalance: {
strategy: 'threshold', // threshold, schedule, or both
threshold: 5, // Rebalance when drift > 5%
schedule: 'monthly' // Also rebalance monthly
}
});
const rebalance = await portfolio.checkRebalance();
console.log(rebalance);
// {
// needsRebalance: true,
// drift: 7.2,
// threshold: 5,
// trades: [
// {
// action: 'SELL',
// symbol: 'BTC',
// amount: 0.05,
// value: 3375,
// reason: 'Overweight by 7.2%'
// },
// {
// action: 'BUY',
// symbol: 'ETH',
// amount: 0.8,
// value: 2800,
// reason: 'Underweight by 5.1%'
// }
// ],
// estimatedFees: 25,
// taxImpact: {
// shortTermGain: 500,
// longTermGain: 1200,
// estimatedTax: 350
// }
// }
const result = await portfolio.rebalance({
dryRun: false, // Set true to preview without executing
optimizeForTax: true, // Consider tax implications
limitOrders: true // Use limit orders instead of market
});
console.log(result);
// {
// executed: true,
// tradesExecuted: 5,
// totalFees: 32.50,
// newAllocation: { ... },
// driftAfter: 1.2
// }
const performance = await portfolio.getPerformance({
period: '30d', // 7d, 30d, 90d, 1y, all
benchmark: 'BTC' // Compare to BTC
});
console.log(performance);
// {
// period: '30d',
// portfolioReturn: 12.5,
// benchmarkReturn: 8.3,
// alpha: 4.2,
// beta: 0.85,
// sharpeRatio: 1.8,
// maxDrawdown: -8.5,
// volatility: 15.2,
// bestDay: 5.2,
// worstDay: -3.8,
// positiveDays: 20,
// negativeDays: 10
// }
const optimization = await portfolio.optimizeMPT({
riskFreeRate: 0.05, // 5% risk-free rate
targetReturn: 0.15, // Target 15% annual return
constraints: {
maxSingleAsset: 0.25, // No asset > 25%
minCrypto: 0.3, // At least 30% crypto
maxCrypto: 0.7 // No more than 70% crypto
}
});
console.log(optimization);
// Returns optimal allocation with efficient frontier data
const riskParity = await portfolio.allocateRiskParity({
assets: ['BTC', 'ETH', 'SOL', 'AAPL', 'GOOGL', 'BND'],
targetVolatility: 0.12 // 12% annual volatility
});
// Each asset contributes equally to portfolio risk
const harvesting = await portfolio.findTaxLossHarvesting({
minLoss: 500, // Minimum loss to harvest
washSaleWindow: 30, // Days to avoid wash sale
similarAssets: true // Suggest similar replacement assets
});
console.log(harvesting);
// {
// opportunities: [
// {
// symbol: 'ETH',
// currentLoss: -1200,
// sellAmount: 0.5,
// taxBenefit: 360,
// replacement: 'ETH2' // Similar but not wash sale
// }
// ],
// totalTaxBenefit: 360
// }
const correlation = await portfolio.getCorrelationMatrix({
period: '90d',
assets: ['BTC', 'ETH', 'SOL', 'AAPL', 'TSLA', 'GLD']
});
// Returns correlation matrix for diversification analysis
const varMetrics = await portfolio.calculateVaR({
confidence: 0.95, // 95% confidence
horizon: 1, // 1 day
method: 'historical' // historical, parametric, or monte-carlo
});
console.log(varMetrics);
// {
// var95: 0.045, // 4.5% daily VaR
// var99: 0.068, // 6.8% daily VaR
// expectedShortfall: 0.055,
// interpretation: '95% confidence that daily loss won\'t exceed 4.5%'
// }
// Export to CSV
await portfolio.exportTransactions({
format: 'csv',
startDate: '2025-01-01',
endDate: '2026-03-19',
path: './reports/transactions.csv'
});
// Export to PDF
await portfolio.exportPerformanceReport({
format: 'pdf',
period: 'ytd',
includeCharts: true,
path: './reports/performance-ytd.pdf'
});
// Export for taxes
await portfolio.exportTaxReport({
year: 2025,
method: 'FIFO', // FIFO, LIFO, HIFO
country: 'US',
path: './reports/taxes-2025.csv'
});
| Option | Type | Default | Description |
|---|---|---|---|
| -------- | ------ | --------- | ------------- |
apiKey | string | required | API key for Portfolio Manager |
baseCurrency | string | 'USD' | Base currency for reporting |
exchanges | array | [] | List of exchanges to connect |
wallets | array | [] | List of wallets to track |
riskProfile | string | 'moderate' | Risk tolerance |
rebalanceEnabled | boolean | false | Enable auto-rebalancing |
alertChannels | array | ['console'] | Alert delivery channels |
getOverview() - Get portfolio summarygetHoldings() - Get all holdings with detailsgetAllocation() - Get current allocation breakdownaddHolding(holding) - Add manual holdingremoveHolding(symbol) - Remove a holdingaddExchange(name, credentials) - Connect exchangeaddWallet(name, config) - Connect walletsyncExchange(name) - Sync exchange holdingssyncWallet(name) - Sync wallet holdingssetTargetAllocation(allocation) - Set target weightscheckRebalance() - Check if rebalance neededrebalance(options) - Execute rebalancegetRebalanceHistory() - Get past rebalancesgetPerformance(options) - Get performance metricsgetReturns(period) - Get returns for periodgetBenchmarkComparison(benchmark) - Compare to benchmarkgetAttribution() - Get return attributiongetRiskMetrics() - Get portfolio risk metricscalculateVaR(options) - Calculate Value at RiskgetCorrelationMatrix(options) - Get asset correlationsgetDrawdownAnalysis() - Analyze drawdownsoptimizeMPT(options) - Modern Portfolio Theory optimizationallocateRiskParity(options) - Risk parity allocationgetEfficientFrontier() - Calculate efficient frontierfindTaxLossHarvesting(options) - Find tax-loss opportunitiescalculateTaxLiability(year) - Estimate tax liabilitygetCostBasis(method) - Get cost basis by methodexportTransactions(options) - Export transaction historyexportPerformanceReport(options) - Export performance reportexportTaxReport(options) - Export tax reportportfolio-manager/
├── SKILL.md
├── index.js
├── package.json
├── _meta.json
├── README.md
├── src/
│ ├── portfolio.js
│ ├── rebalancer.js
│ ├── performance.js
│ ├── risk.js
│ ├── optimizer.js
│ ├── tax.js
│ └── export.js
└── tests/
└── portfolio-manager.test.js
| Tier | Price | Features |
|---|---|---|
| ------ | ------- | ---------- |
| Basic | $49 | Portfolio tracking, performance analytics, manual rebalancing |
| Pro | $99 | + Auto-rebalancing, tax optimization, MPT optimization, advanced reports |
This tool is for portfolio management and tracking only.
MIT License - See LICENSE file for details.
Built with ❤️ by OpenClaw Agent - Your Intelligent Portfolio Manager
共 1 个版本