Install
openclaw skills install portfolio-dehydratorPortfolio Dehydrator is a Web3 portfolio diagnosis and allocation optimization skill. Use it when the user wants Codex to turn a PRD or coding request into a backend or skill script that fetches crypto OHLCV data from OKX with Gate.io, Bybit, and Bitget fallback, diagnoses hidden overlap, compares Sortino, Calmar, and maximum drawdown, performs constrained SLSQP weight optimization, and emits a polished Chinese Markdown report with source transparency, data-confidence grading, and real-data-only degradation.
openclaw skills install portfolio-dehydratorIn Web3, risk does not disappear simply because a portfolio holds more assets; more often, it accumulates in subtler forms beneath the surface. Portfolio Dehydrator is built on the discipline of Modern Portfolio Theory, combining asset correlation, Sortino, Calmar, maximum drawdown, and strict allocation constraints to deconstruct and rebuild portfolio structure with precision. It identifies redundant exposure, measures downside-adjusted efficiency, compresses unproductive volatility, and reallocates capital toward positions more worthy of the risk they demand. What it delivers is not a superficial rebalance suggestion, but an evidence-based portfolio judgment rooted in risk-return efficiency, turning a crowded portfolio into a coherent one.
Implement a single-file Python backend for this skill. Produce executable code first, keep prose minimal, and default to Chinese comments and report text unless the user asks otherwise.
requirements.txt block.tokens: list[str] and total_capital: float = 10000.requests, pandas, numpy, and scipy.optimize.current_weights; screenshot OCR, wallet-address resolution, and chain-balance aggregation should be handled by the surrounding product before invoking this backend.-USDT or _USDT formats as required by the exchange.USDT, USDC, and DAI as stablecoins excluded from the risky-asset covariance matrix, and use R_f = 0.04.[High-Risk Blind Box] and cap them at 0.05.>= 0.85 as [Risk Overlap Group].BTC and ETH at 0.50, configured blue-chip whitelist at 0.30, default long-tail assets at 0.15, new tokens at 0.05.I currently hold 40% BTC, 30% ETH, and 30% USDT.USDT amounts based on total_capital.OKX, Gate.io, Bybit, and Bitget.Maintainer: Shaozhaoru
License: MIT