$npx -y skills add SKE-Labs/agent-trading-skills --skill sentiment-analysisBuild source-dated, deduplicated sentiment evidence or a calibrated sentiment model. Use when separating facts, interpretations, claims, novelty, horizon, and uncertainty across filings, news, analyst commentary, or social sources.
| 1 | # Sentiment Analysis |
| 2 | |
| 3 | Build a reproducible, source-dated evidence set. Sentiment may describe language or positioning; it does not become a return forecast without labeled calibration and out-of-sample validation. |
| 4 | |
| 5 | ## Evidence Fields |
| 6 | |
| 7 | | Field | Requirement | |
| 8 | | --- | --- | --- | |
| 9 | | Source | Publisher, author, URL/document ID, publication and event time | |
| 10 | | Provenance | Primary filing/release, original reporting, analysis, or social claim | |
| 11 | | Content | Verifiable facts, management view, and analyst interpretation separated | |
| 12 | | Novelty | New information, update/revision, or duplicate/syndicated item | |
| 13 | | Scope | Entity, event, horizon, and affected metric | |
| 14 | |
| 15 | ## Labeling |
| 16 | |
| 17 | | Label | Meaning | |
| 18 | | --- | --- | |
| 19 | | Positive / negative / mixed / neutral | Direction of language toward the named metric and horizon | |
| 20 | | Fact / interpretation / claim | Epistemic type; unverified claims cannot outweigh primary evidence | |
| 21 | | New / revision / duplicate | Information novelty and deduplication status | |
| 22 | |
| 23 | ## Numeric Models |
| 24 | |
| 25 | If a numeric model is required, derive source reliability, decay, label policy, and aggregation from a labeled training set. Freeze them before evaluation, calibrate scores to a stated outcome/horizon, report uncertainty and class balance, and compare with simple no-sentiment baselines. Never present hand-chosen weights as probabilities. |
| 26 | |
| 27 | ## Contrarian Signals |
| 28 | |
| 29 | Define any extreme by the asset's historical percentile using the same data source. Treat price/sentiment divergence as a hypothesis and state pivot, horizon, and timestamp; do not call it distribution or accumulation without further evidence. |
| 30 | |
| 31 | ## Workflow |
| 32 | |
| 33 | ### 1. Gather News Data |
| 34 | |
| 35 | ``` |
| 36 | get_financial_news(topic="AAPL earnings revenue guidance analyst", max_results=20) |
| 37 | get_financial_news(topic="AAPL analyst upgrade downgrade price target", max_results=10) |
| 38 | ``` |
| 39 | |
| 40 | Search both bullish and bearish angles for the same asset. |
| 41 | |
| 42 | ### 2. Score Each Article |
| 43 | |
| 44 | For each unique item, fill the evidence fields and labels. Resolve conflicts with primary documents where possible and preserve disagreements. |
| 45 | |
| 46 | ### 3. Calculate Composite |
| 47 | |
| 48 | Report the evidence table, coverage window, duplicates removed, missing primary evidence, disagreements, and model output only if calibrated. Agreement among syndicated or correlated sources does not create independent confidence. |
| 49 | |
| 50 | ### 4. Identify Cycle Phase |
| 51 | |
| 52 | Compare sentiment and returns on predeclared horizons. Use descriptive labels such as divergence or agreement; allocation still requires a separately validated decision rule. |
| 53 | |
| 54 | ## Evidence and Validation |
| 55 | |
| 56 | - Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes. |
| 57 | - Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried. |
| 58 | - Include spread, fees, slippage, borrow or funding, partial fills, and latency. Reject the setup when net expectancy is not positive or depends on one narrow parameter. |
| 59 | - Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status. |
| 60 | - Research basis: [Baker & Wurgler](https://www.nber.org/papers/w10449) found sentiment effects differ across stock characteristics; it is not valid to convert arbitrary article scores into universal return forecasts. |
| 61 | |
| 62 | ## Key Rules |
| 63 | |
| 64 | - Never invent a composite from subjective weights; use transparent labels or a calibrated model. |
| 65 | - Prioritize primary evidence for facts and explicitly flag unverified claims. |
| 66 | - Use publication time, event time, novelty, and a validated horizon rather than fixed decay weights. |
| 67 | - Do not call sentiment a confirmation unless its incremental held-out value is measured. |
| 68 | - NEVER only seek confirming news -- always search both bullish and bearish angles |
| 69 | - When high-credibility sources disagree, reduce conviction rather than picking a side |
| 70 | - Extreme language can persist and sources are correlated; return `no sentiment edge` when evidence is sparse or stale. |
| 71 | |
| 72 | ## Related Skills |
| 73 | |
| 74 | - **earnings-trading** -- Management tone scoring feeds sentiment |
| 75 | - **economic-calendar-trading** -- Pre-event sentiment gauges positioning |