- skills: completed+registered social-sentiment-momentum (6 skills, all examples validate). - guardrail-api: GET /stream SSE that tails the event log cross-process (build+clippy+tests green, smoke-verified). - dashboard: /live real-time SSE page (EventSource, dependency-free; tsc clean) + nav link. - crates/skill-loader: runtime skill registry/loader (7 tests), registered in workspace. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2.9 KiB
2.9 KiB
Strategy-Generation Prompt — Social / Sentiment Momentum
Use this prompt to generate a single decision payload for one rebalance cycle.
Inputs you receive
A JSON object with:
fear_greed—{ value, value_classification }global—{ total_market_cap_usd, btc_dominance_pct }market_breadth—{ breadth_pct, median_24h_return }quotes[]— per asset:price_usd,percent_change_1h/24h/7d,market_cap_usd,volume_24h_usd,liquidity_usd,safety_score,security_flags[]attention[]— per asset:trending_rank,rank_prev,rank_delta,velocity_norm,volume_ratio,social_score,social_momentum
Procedure
- Classify the regime with the
strategy_spec.yamlrules. Record theexposure_multiplier(breakout 1.1, risk_on 1.0, chop 0.4, risk_off 0.15). - Compute the sentiment gate:
sentiment_gate_factor = 1.0when20 < fear_greed < 80, else0.6(extreme-greed / extreme-fear de-risk). - Score each non-stable asset:
trend_score: rising trending rank / newly on the board → high; falling off the board → low.volume_component: 1.0 whenvolume_ratio >= 1.5(confirmed by money); 0.0 whenvolume_ratio < 1.0(hype without volume); interpolate between.social_component: positive social momentum andsocial_score >= 0.5→ high; flat/declining → low.attention_tilt = 0.4*trend_score + 0.35*volume_component + 0.25*social_component.sentiment_score = clamp01(base_score adjusted by attention_tilt * sentiment_gate_factor) * (1 - security_penalty).
- Select entries: assets with
sentiment_score >= 0.65, capped atmax_positions(5), ordered bysentiment_score. In chop, take only the 1-2 cleanest, money-confirmed names and size down; in risk_off, take none (heartbeat only). - Size:
risk_budget = (100 - target_stable_reserve_pct) * exposure_multiplier, clamped to[0, 100 - min_stable_reserve]. Allocate bysentiment_scoreshare; cap each name atmax_position_weight_pct(17%); surplus → USDT reserve. - Emit actions:
entry/rebalance/trim/exit/reject/heartbeat, each with areasonciting the scores, and the resultingtarget_portfolio(weights summing to <= 100, USDT as the reserve remainder).
Output
Return ONE JSON object shaped exactly like examples/*.json:
{ scenario, as_of, inputs, computed: { market_regime, exposure_multiplier, sentiment_gate_factor, sentiment_scores[], ... }, decision: { target_portfolio[], rules: { entry[], exit[] }, actions[] } }. Output JSON only — no prose around it.
Guardrails
- Never exceed the 17% per-name cap or drop below the 10% minimum reserve.
- Never enter on
volume_ratio < 1.0. Attention without participation is a trap. - De-risk at sentiment extremes (gate factor 0.6 when fear_greed >= 80 or <= 20).
- The risk engine is the final authority; assume any over-allocation is clamped.