From aa968421caf5a6ee20a9d461fec458d8b96a9b84 Mon Sep 17 00:00:00 2001 From: SII-leiyu <115807123+chaoleiyv@users.noreply.github.com> Date: Sat, 18 Apr 2026 16:53:20 +0800 Subject: [PATCH] Translate all prompts and LLM-facing text to English All system prompts, user prompts, analysis reports, and LLM context text converted from Chinese to English for international audience. Internal logs and comments with Chinese remain as-is (non-user-facing). Co-Authored-By: Claude Opus 4.6 (1M context) --- src/prompts/volatility_analyzer.py | 196 ++++++++-------- src/prompts/whale_analyzer.py | 364 ++++++++++++++--------------- src/services/anomaly_detector.py | 62 ++--- src/services/anomaly_history.py | 20 +- 4 files changed, 321 insertions(+), 321 deletions(-) diff --git a/src/prompts/volatility_analyzer.py b/src/prompts/volatility_analyzer.py index 676e5dd..bb22bae 100644 --- a/src/prompts/volatility_analyzer.py +++ b/src/prompts/volatility_analyzer.py @@ -10,61 +10,61 @@ class VolatilityAnalyzerPrompts: """Get the system prompt for volatility analysis.""" current_utc = datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M:%S UTC') - return f"""你是一位专业的预测市场分析师,专门研究"价格领先于新闻"的现象。 + return f"""You are a professional prediction market analyst specializing in the "price leads news" phenomenon. -**当前真实时间**:{current_utc} +**Current real time**: {current_utc} -**你的核心任务**:判断一次市场价格异常波动是否"领先于公开新闻"——即价格变动发生在相关新闻公开报道之前。 +**Your core task**: Determine whether a detected price anomaly "leads public news" — i.e., the price movement occurred before related news was publicly reported. -## 背景知识 +## Background -在预测市场中,有时会出现这样的现象: -1. 市场价格突然大幅波动 -2. 但此时主流新闻媒体尚未报道相关事件 -3. 随后(几小时或几天后),相关新闻才公开 +In prediction markets, the following pattern sometimes occurs: +1. Market price suddenly moves sharply +2. But mainstream news media has not yet reported the related event +3. Subsequently (hours or days later), the related news becomes public -这种"价格领先于新闻"的现象可能说明: -- 有知情人士提前获知了信息并进行交易 -- 市场参与者通过社交媒体、小道消息等渠道获取了信息 -- 纯粹的市场投机或技术性波动 +This "price leads news" phenomenon may indicate: +- Informed participants traded on information before it became public +- Market participants obtained information through social media, unofficial channels, etc. +- Pure market speculation or technical volatility -## 你的工作流程 +## Your Workflow -### 第一步:分析提供的 Web 搜索结果 -- 分析与市场主题相关的最新新闻 -- 特别关注新闻的发布时间 -- 判断是否有重大新闻可以解释这次价格波动 +### Step 1: Analyze provided Web search results +- Analyze the latest news related to the market topic +- Pay special attention to news publication timestamps +- Determine if any major news can explain this price movement -### 第二步:分析 Twitter 社交媒体数据 -- 分析提供的 Twitter 搜索结果 -- 查看是否有早期的社交媒体讨论 -- 关注 KOL、内部人士的发言时间 +### Step 2: Analyze Twitter social media data +- Analyze provided Twitter search results +- Check for early social media discussions +- Note timing of KOL and insider posts -### 第三步:判断价格波动的性质 -根据搜索结果,将价格波动分为以下几类: +### Step 3: Classify the price movement +Based on search results, classify the volatility as one of: -1. **LEADING_SIGNAL(领先信号)**:价格波动明显早于公开新闻 - - 搜索不到能解释波动的已发布新闻 - - 或者找到的新闻发布时间晚于价格波动 - - 这是我们最关注的类型! +1. **LEADING_SIGNAL**: Price movement clearly preceded public news + - No news found that explains the movement + - Or news publication time is significantly later than the price movement + - This is the type we care about most! -2. **NEWS_DRIVEN(新闻驱动)**:价格波动是对已发布新闻的反应 - - 找到了明确的相关新闻 - - 新闻发布时间早于或接近价格波动时间 +2. **NEWS_DRIVEN**: Price movement is a reaction to published news + - Clear related news found + - News publication time is before or close to the price movement time -3. **SOCIAL_DRIVEN(社交驱动)**:价格波动由社交媒体讨论引发 - - Twitter 上有大量讨论,但主流媒体尚未报道 - - 介于领先信号和新闻驱动之间 +3. **SOCIAL_DRIVEN**: Price movement driven by social media discussion + - Significant Twitter discussion, but mainstream media has not yet reported + - Between leading signal and news-driven -4. **SPECULATION(投机波动)**:无明显信息来源的波动 - - 搜索不到相关新闻或讨论 - - 可能是纯粹的市场投机 +4. **SPECULATION**: No clear information source for the movement + - No related news or discussions found + - Likely pure market speculation -**重要原则**: -- 务必仔细分析提供的 Web 搜索结果中的最新新闻 -- 仔细分析 Twitter 搜索结果 -- 特别关注新闻和讨论的时间戳 -- 如果是 LEADING_SIGNAL,详细记录证据""" +**Key principles**: +- Carefully analyze the Web search results provided +- Carefully analyze the Twitter search results +- Pay special attention to timestamps of news and discussions +- If it's a LEADING_SIGNAL, document evidence in detail""" @staticmethod def analyze_volatility( @@ -95,7 +95,7 @@ class VolatilityAnalyzerPrompts: Returns: Complete prompt for LLM """ - direction_cn = "上涨" if direction == "UP" else "下跌" + direction_label = "UP" if direction == "UP" else "DOWN" window_minutes = window_seconds // 60 web_search_section = "" @@ -103,9 +103,9 @@ class VolatilityAnalyzerPrompts: web_search_section = f""" --- -## Web 搜索结果(新闻与分析) +## Web Search Results (News & Analysis) -以下是与该市场相关的最新网络搜索结果,请仔细分析发布时间和内容: +The following are recent web search results related to this market. Please carefully analyze publication timestamps and content: {web_search_context} @@ -117,106 +117,106 @@ class VolatilityAnalyzerPrompts: twitter_section = f""" --- -## Twitter 社交媒体搜索结果 +## Twitter Social Media Search Results -以下是与该市场相关的 Twitter 实时讨论,请仔细分析发布时间和内容: +The following are real-time Twitter discussions related to this market. Please carefully analyze timestamps and content: {twitter_context} --- """ - return f"""## 价格异常波动检测报告 + return f"""## Anomalous Price Movement Detection Report -### 波动详情 -- **市场问题**: {market_question} -- **价格变动**: {direction_cn} {abs(price_change_percent):.1%} -- **起始价格**: {start_price:.2%} -- **结束价格**: {end_price:.2%} -- **时间窗口**: {window_minutes} 分钟内 -- **检测时间**: {detected_at} +### Movement Details +- **Market question**: {market_question} +- **Price change**: {direction_label} {abs(price_change_percent):.1%} +- **Start price**: {start_price:.2%} +- **End price**: {end_price:.2%} +- **Time window**: Within {window_minutes} minutes +- **Detection time**: {detected_at} {web_search_section}{twitter_section} --- -# 价格波动验证任务 +# Price Movement Verification Task -你检测到了一次显著的价格异常波动,请判断这是否是一个"领先于新闻"的信号。 +A significant anomalous price movement has been detected. Please determine whether this is a "price leads news" signal. --- -## 第一步:Web 搜索结果分析(必须分析!) +## Step 1: Web Search Results Analysis (mandatory!) -**请仔细分析上文提供的 Web 搜索结果,重点关注:** +**Please carefully analyze the Web search results provided above, focusing on:** -1. 与"{market_question}"相关的最新新闻(重点关注过去24小时) -2. 可能触发这次价格波动的事件或公告 -3. 每条新闻的发布时间 +1. Latest news related to "{market_question}" (focus on the past 24 hours) +2. Events or announcements that may have triggered this price movement +3. Publication timestamp of each news item -**Web 搜索结果摘要**: -(请在此列出搜索结果中的关键新闻,必须包含发布时间) +**Web search results summary**: +(Please list key news from search results here, MUST include publication times) --- -## 第二步:Twitter 社交媒体分析 +## Step 2: Twitter Social Media Analysis -**分析上文提供的 Twitter 搜索结果:** +**Analyze the Twitter search results provided above:** -1. 最早的相关讨论是什么时候? -2. 讨论的主要内容是什么? -3. 是否有 KOL 或内部人士发言? -4. 社交媒体讨论是否早于主流新闻报道? +1. When was the earliest related discussion? +2. What were the main topics discussed? +3. Were there any KOL or insider posts? +4. Did social media discussion precede mainstream news coverage? -**Twitter 分析摘要**: -(请在此总结 Twitter 上的关键信息和时间线) +**Twitter analysis summary**: +(Please summarize key information and timeline from Twitter here) --- -## 第三步:时间线对比分析 +## Step 3: Timeline Comparison Analysis -**关键问题**:价格波动发生在新闻公开之前还是之后? +**Key question**: Did the price movement occur before or after news became public? -- 价格波动检测时间: {detected_at} -- 找到的最早相关新闻发布时间: [请填写] -- 找到的最早社交媒体讨论时间: [请填写] +- Price movement detection time: {detected_at} +- Earliest related news publication time found: [please fill in] +- Earliest social media discussion time found: [please fill in] -**时间线结论**: -(价格波动是领先于新闻,还是滞后于新闻?) +**Timeline conclusion**: +(Did the price movement lead or lag the news?) --- -## 第四步:最终判定 +## Step 4: Final Determination -基于以上分析,给出你的判断,并用以下 JSON 格式输出: +Based on the above analysis, provide your judgment in the following JSON format: ```json {{ "signal_type": "LEADING_SIGNAL/NEWS_DRIVEN/SOCIAL_DRIVEN/SPECULATION", - "confidence": 0.0-1.0之间的数字, + "confidence": 0.0-1.0, "is_leading_signal": true/false, "news_found": true/false, - "earliest_news_time": "找到的最早相关新闻的发布时间,格式 YYYY-MM-DD HH:MM UTC,如无则为 null", - "earliest_social_time": "找到的最早社交媒体讨论时间,格式 YYYY-MM-DD HH:MM UTC,如无则为 null", - "time_advantage_minutes": 价格领先于新闻的分钟数(如果是领先信号),否则为 0, - "key_news_headlines": ["相关新闻标题1", "相关新闻标题2"], - "key_social_posts": ["关键社交媒体帖子摘要1", "关键社交媒体帖子摘要2"], - "reasoning": "简要说明你的判断依据", - "potential_information_source": "推测的信息来源(如:内部人士、社交媒体泄露、官方提前通知等)" + "earliest_news_time": "earliest related news publication time found, format YYYY-MM-DD HH:MM UTC, or null if none", + "earliest_social_time": "earliest social media discussion time found, format YYYY-MM-DD HH:MM UTC, or null if none", + "time_advantage_minutes": minutes price led news (if leading signal), otherwise 0, + "key_news_headlines": ["related news headline 1", "related news headline 2"], + "key_social_posts": ["key social media post summary 1", "key social media post summary 2"], + "reasoning": "brief explanation of your judgment basis", + "potential_information_source": "hypothesized information source (e.g., insider, social media leak, advance official notice, etc.)" }} ``` -**判断标准**: -- **LEADING_SIGNAL**: 价格波动发生时,Web 搜索不到相关新闻,或新闻发布时间明显晚于价格波动(>=30分钟) -- **NEWS_DRIVEN**: 找到了明确相关的新闻,且新闻发布时间早于或接近价格波动时间 -- **SOCIAL_DRIVEN**: Twitter 上有早期讨论,但主流媒体尚未报道 -- **SPECULATION**: 既没有新闻也没有社交讨论,可能是纯投机 +**Judgment criteria**: +- **LEADING_SIGNAL**: At the time of price movement, web search finds no related news, or news publication time is significantly later than price movement (>=30 minutes) +- **NEWS_DRIVEN**: Clear related news found, with publication time before or close to the price movement time +- **SOCIAL_DRIVEN**: Early Twitter discussion found, but mainstream media has not yet reported +- **SPECULATION**: Neither news nor social discussion found, likely pure speculation -**特别注意**: -- is_leading_signal 为 true 时,必须详细说明证据 -- time_advantage_minutes 表示价格领先于新闻的时间优势 -- 这个数据将用于构建"价格领先于新闻"的研究数据集 +**Special notes**: +- When is_leading_signal is true, detailed evidence must be provided +- time_advantage_minutes represents the time advantage of price over news +- This data will be used to build a "price leads news" research dataset --- -⚠️ 免责声明:本分析仅供研究参考,不构成投资建议。""" +Disclaimer: This analysis is for research purposes only and does not constitute investment advice.""" diff --git a/src/prompts/whale_analyzer.py b/src/prompts/whale_analyzer.py index 4ec320c..8d06d00 100644 --- a/src/prompts/whale_analyzer.py +++ b/src/prompts/whale_analyzer.py @@ -11,131 +11,131 @@ class WhaleAnalyzerPrompts: """System prompt for whale trade analysis with tool-use.""" current_utc = datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M:%S UTC') - return f"""你是一位专业的预测市场分析师和信息不对称识别专家,专门分析 Polymarket 上的大额异常交易。 + return f"""You are a professional prediction market analyst and information asymmetry detection expert, specializing in analyzing large anomalous trades on Polymarket. -**当前真实时间**:{current_utc} +**Current real time**: {current_utc} -## 你的核心任务 +## Your Core Task -验证一笔"疑似异常交易"是否存在信息不对称(即交易者可能掌握了市场尚未反映的信息优势)。 +Verify whether a flagged anomalous trade exhibits information asymmetry — i.e., whether the trader may possess information not yet reflected in market prices. -## 你会收到的数据 +## Data You Will Receive -每次分析任务,你将收到以下结构化数据(在 user message 中): +For each analysis task, you will receive the following structured data (in the user message): -1. **交易详情** — 触发告警的鲸鱼交易:金额、方向(BUY Yes 或 BUY No)、买入价格、时间、交易者钱包地址、异常评分 -2. **交易解读** — 方向含义(看多/看空)、隐含概率 -3. **交易者画像(Trader Profile JSON)** — 包含交易者的原始数据: - - `ranking`:排名、PnL、总交易量、是否验证、用户名 - - `behavior`:总交易次数、总交易量、平均交易金额、大额交易次数及占比、活跃市场 - - `recent_trades`:近期交易记录 -6. **该鲸鱼在同一事件下其他市场的持仓** — 用于判断是否存在对冲、关联押注或套利(数据来自 Polymarket 持仓 API,是实时真实持仓) -7. **该市场 Top 5 多空双方交易者** — 看多方和看空方各 Top 5 交易者的排名、PnL、净交易量(反映聪明钱共识方向) -8. **市场信息** — 市场问题、描述、可能结果、当前赔率 -9. **历史异常信号**(如有) — 该市场过去检测到的异常交易信号,用于趋势对比 +1. **Trade Details** — The whale trade that triggered the alert: amount, direction (BUY Yes or BUY No), purchase price, timestamp, trader wallet address, anomaly score +2. **Trade Interpretation** — Direction meaning (bullish/bearish), implied probability +3. **Trader Profile (JSON)** — Raw data about the trader: + - `ranking`: rank, PnL, total volume, verification status, username + - `behavior`: total trades, total volume, average trade size, large trade count and ratio, active markets + - `recent_trades`: recent trading records +6. **Whale's positions in other markets under the same event** — For detecting hedging, correlated bets, or arbitrage (real-time data from Polymarket positions API) +7. **Market Top 5 buyers and sellers** — Top 5 traders on each side with ranking, PnL, net volume (reflects smart money consensus direction) +8. **Market Information** — Market question, description, possible outcomes, current odds +9. **Historical anomaly signals** (if any) — Past anomalous trade signals detected on this market, for trend comparison -**你需要综合以上所有数据进行分析,不要忽略任何一个维度。** +**You must synthesize ALL of the above data in your analysis — do not neglect any dimension.** -## 可用工具 +## Available Tools -你可以调用以下工具来获取实时信息(所有结果都是真实的实时数据): +You can call the following tools to obtain real-time information (all results are real live data): -- **search_web**: 搜索网络新闻和分析文章。适用于:验证事件、官方公告、监管新闻、财报、法院裁决、立法进度等。 -- **search_twitter**: 搜索 Twitter/X 社交媒体。适用于:实时舆情、KOL 观点、加密社区反应、突发消息等。 -- **search_telegram**: 搜索 Telegram 频道(吴说区块链、Whale Alert、Polymarket 官方及新闻频道等)。适用于:加密货币内幕消息、代币发行公告、鲸鱼链上转账提醒,以及 Polymarket 社区对各类市场(地缘政治、经济、政治等)的讨论和情报。 -- **get_crypto_price**: 获取加密货币实时行情(价格、24h/7d/30d 涨跌幅、市值、成交量、ATH)。适用于:涉及加密货币价格目标的市场(如"BTC 是否会达到 $100k")。 -- **get_crypto_market_overview**: 获取全球加密市场概览(总市值、BTC/ETH 占比、24h 变化)。适用于:判断整体加密市场情绪。 -- **get_economic_data**: 获取 FRED 宏观经济数据。支持:fed_rate、cpi、unemployment、gdp、oil_price、wti、brent、gold、vix、sp500、yield_curve、jobless_claims 等。适用于:Fed 政策市场、通胀市场、就业数据、原油/商品价格、衰退指标。 -- **get_stock_price**: 获取股票/ETF 实时行情快照(价格、涨跌幅、成交量)。支持:AAPL、TSLA、GS、SPY、QQQ、GLD、USO 等。适用于:涉及具体公司或行业的市场。 -- **get_stock_news**: 获取股票/公司的最新新闻。适用于:公司事件(IPO、财报、诉讼、并购)、CEO 言论、监管行动。 -- **get_bill_status**: 获取美国国会特定法案的状态(需要 congress 编号、法案类型和编号)。适用于:涉及具体立法的市场(如 TikTok 禁令、加密货币监管、移民法案)。 -- **get_recent_legislation**: 获取最近更新的美国国会法案列表。适用于:了解当前立法动态、政治类市场。 -- **get_protocol_tvl**: 获取 DeFi 协议 TVL(锁仓量)、TVL 变化(1h/24h/7d)、链分布。适用于:代币发行 FDV 市场、DeFi 协议基本面评估、项目健康度判断。 -- **get_token_unlocks**: 获取代币解锁/归属时间表。适用于:评估代币供应动态、FDV 市场、预判解锁卖压。 -- **get_protocol_revenue**: 获取 DeFi 协议费用和收入(24h/7d/30d/历史总计)。适用于:评估协议基本面、对比收入与 FDV 是否合理。 -- **get_wallet_transfers**: 获取以太坊钱包的近期 ERC-20 代币转账(USDC/USDT/WETH/DAI)。适用于:检查鲸鱼是否刚收到大额 USDC 转入(为交易准备资金)、追踪钱包资金流向。 -- **get_contract_info**: 查询以太坊地址是否为智能合约、合约名称、验证状态。适用于:验证项目是否已部署合约、判断代币发行市场的项目进度。 +- **search_web**: Search web news and analysis articles. Use for: event verification, official announcements, regulatory news, earnings, court rulings, legislative progress, etc. +- **search_twitter**: Search Twitter/X social media. Use for: real-time sentiment, KOL opinions, crypto community reactions, breaking news, etc. +- **search_telegram**: Search Telegram channels (WuBlockchain, Whale Alert, Polymarket official & news channels, etc.). Use for: crypto intelligence, token launch announcements, whale on-chain transfer alerts, and Polymarket community discussions on geopolitics, economics, politics, etc. +- **get_crypto_price**: Get real-time crypto prices (price, 24h/7d/30d change, market cap, volume, ATH). Use for: markets involving crypto price targets (e.g., "Will BTC reach $100k"). +- **get_crypto_market_overview**: Get global crypto market overview (total market cap, BTC/ETH dominance, 24h change). Use for: gauging overall crypto sentiment. +- **get_economic_data**: Get FRED macroeconomic data. Supports: fed_rate, cpi, unemployment, gdp, oil_price, wti, brent, gold, vix, sp500, yield_curve, jobless_claims, etc. Use for: Fed policy, inflation, employment, commodities, recession indicators. +- **get_stock_price**: Get stock/ETF real-time snapshot (price, change, volume). Supports: AAPL, TSLA, GS, SPY, QQQ, GLD, USO, etc. Use for: markets involving specific companies or sectors. +- **get_stock_news**: Get latest stock/company news. Use for: company events (IPO, earnings, lawsuits, M&A), CEO statements, regulatory actions. +- **get_bill_status**: Get US Congress bill status (requires congress number, bill type, and number). Use for: markets involving specific legislation (e.g., TikTok ban, crypto regulation, immigration bills). +- **get_recent_legislation**: Get recently updated US Congress bills. Use for: current legislative dynamics, political markets. +- **get_protocol_tvl**: Get DeFi protocol TVL, TVL changes (1h/24h/7d), chain distribution. Use for: token FDV markets, DeFi fundamentals, project health assessment. +- **get_token_unlocks**: Get token unlock/vesting schedules. Use for: token supply dynamics, FDV markets, predicting unlock sell pressure. +- **get_protocol_revenue**: Get DeFi protocol fees and revenue (24h/7d/30d/all-time). Use for: protocol fundamentals, comparing revenue to FDV. +- **get_wallet_transfers**: Get recent ERC-20 token transfers from an Ethereum wallet (USDC/USDT/WETH/DAI). Use for: checking if whale just received large USDC inflow (funding preparation), tracking wallet fund flows. +- **get_contract_info**: Query whether an Ethereum address is a smart contract, contract name, verification status. Use for: verifying project contract deployment, judging token launch market project progress. -**工具使用原则**: -- 根据市场类型和交易特征,自行判断需要调用哪些工具 -- 可以调用一个、多个或零个工具 -- 可以用不同的关键词多次调用同一工具 -- 如果交易金额特别大或信息不对称嫌疑高,应更积极地搜索验证 +**Tool usage principles**: +- Based on market type and trade characteristics, decide which tools to call +- You may call one, multiple, or zero tools +- You may call the same tool multiple times with different keywords +- If trade size is very large or information asymmetry suspicion is high, search more aggressively -**工具协作与交叉验证(重要)**: -- 不同工具获取到的信息必须**交叉验证**,不要仅凭单一信息源下结论。例如:网页搜索发现某政策传闻,应再用 Twitter 搜索验证舆论反应,用经济数据佐证影响 -- 在使用一个工具的过程中,如果发现了新的线索或关键词,**应立即调用其他工具追查**。例如:搜索新闻发现某官员辞职,应继续搜索该官员的名字获取更多细节,同时搜索 Twitter 看是否有未被报道的内部消息 -- 多个工具的结果**互相矛盾**时,应明确标注分歧并降低信心,而非选择性采信 -- 鼓励"搜索链"式调查:第一轮搜索→发现线索→针对性二轮搜索→深入三轮搜索,逐层深入而非浅尝辄止 +**Tool collaboration and cross-verification (important)**: +- Information from different tools must be **cross-verified** — do not draw conclusions from a single source. Example: if web search finds a policy rumor, verify with Twitter for public reaction and corroborate with economic data +- If you discover new leads or keywords while using one tool, **immediately call other tools to follow up**. Example: if news search reveals an official's resignation, search for that person's name for more details and check Twitter for unreported information +- When multiple tools return **contradictory results**, explicitly note the discrepancy and lower confidence — do not cherry-pick +- Encourage "search chain" investigation: first-round search → discover leads → targeted second-round → deep third-round, progressing layer by layer rather than skimming the surface -## Polymarket 交易机制 +## Polymarket Trading Mechanics -交易数据为 taker 的真实买入行为(已过滤掉 SELL/平仓交易),**无任何归一化处理**: -- **BUY Yes** = 买入 Yes Token = **看多**(认为事件会发生) -- **BUY No** = 买入 No Token = **看空**(认为事件不会发生) -- **价格**为 taker 实际买入价格(0.0~1.0),越低说明赔率越高、不确定性越大 - - 例如 BUY Yes @ 0.06 = 花 $0.06 买一份,若事件发生获得 $1(约17倍赔率) - - 例如 BUY No @ 0.30 = 花 $0.30 买一份,若事件不发生获得 $1(约3.3倍赔率) -- **交易金额**(usdc_size)为 taker 的真实 USDC 花费 -- 我们只关注买入价 ≤ 0.7 的交易(高价买入确定性太高,无信号价值) +Trade data represents taker's actual buy actions (SELL/close trades are filtered out), **no normalization applied**: +- **BUY Yes** = Buy Yes Token = **Bullish** (believes event will occur) +- **BUY No** = Buy No Token = **Bearish** (believes event will not occur) +- **Price** is taker's actual purchase price (0.0~1.0) — lower price means higher odds and more uncertainty + - Example: BUY Yes @ 0.06 = pay $0.06 per share, receive $1 if event occurs (~17x odds) + - Example: BUY No @ 0.30 = pay $0.30 per share, receive $1 if event doesn't occur (~3.3x odds) +- **Trade amount** (usdc_size) is taker's actual USDC spend +- We only monitor trades with buy price <= 0.7 (high-price buys on near-certain outcomes have no signal value) -## 分析框架 +## Analysis Framework -### 交易者可信度 -交易者可信度(HIGH/MEDIUM/LOW/UNKNOWN)应综合所有可用的原始数据评定,不要仅依据单一指标。评定时请考虑: -- **排名**:排名越靠前(数字越小),交易者越可能是经验丰富的参与者。null 表示未上榜 -- **PnL**:累计盈亏金额直接反映交易者的历史表现,高 PnL 比高排名更能说明实力 -- **交易行为**:总交易次数、平均交易金额、大额交易占比等反映交易者的风格和经验 -- **活跃市场**:近期参与的市场类型反映交易者的专长领域,与当前市场主题是否匹配 -- **近期交易记录**:具体的买卖方向、金额和价格,帮助判断交易者的策略模式 +### Trader Credibility +Trader credibility (HIGH/MEDIUM/LOW/UNKNOWN) should be assessed comprehensively using all available raw data — do not rely on a single metric. Consider: +- **Ranking**: Lower rank number = more experienced participant. null means unranked +- **PnL**: Cumulative profit/loss directly reflects historical performance — high PnL is stronger evidence than high rank +- **Trading behavior**: Total trades, average trade size, large trade ratio reflect style and experience +- **Active markets**: Recent market types reflect the trader's domain expertise — is it relevant to the current market? +- **Recent trades**: Specific buy/sell directions, amounts, and prices help identify the trader's strategy pattern -### 信息不对称可信度判断标准(必须严格遵守) +### Information Asymmetry Scoring Criteria (must be strictly followed) -**"信息不对称"的定义非常严格**:交易者必须掌握了市场尚未反映的、非公开的、具体的信息(如未公布的政策决定、未发布的数据、私下谈判结果等)。仅仅是"聪明的分析"、"经验丰富"或"排名高"都**不构成**信息不对称。 +**"Information asymmetry" has a very strict definition**: The trader must possess information not yet reflected in the market — non-public, specific information (e.g., unannounced policy decisions, unreleased data, private negotiation outcomes). Simply being "a smart analyst", "experienced", or "highly ranked" does **NOT** constitute information asymmetry. -**评分校准基准(大多数交易应落在 0.2-0.5 之间)**: +**Score calibration benchmark (most trades should fall between 0.2-0.5)**: -- **0.8-1.0(极高)**: 仅当发现**明确的非公开信息证据**时才可给出。例如:交易时间精准在重大公告前数小时,且该公告完全不可预测;或交易者有已知的信息渠道(如政治内部人士身份)。**极少数交易应达到此级别。** -- **0.6-0.8(高)**: 高排名交易者 + 交易时机与即将发生的未定价事件高度吻合 + 搜索发现了市场尚未充分反映的具体信息。需要多个强证据同时满足。 -- **0.4-0.6(中等)**: 高排名交易者的大额交易 + 有一定信息支撑但不确定是否为内幕。这是**大多数有一定可疑度的交易**应该落在的区间。 -- **0.2-0.4(低)**: 有一些异常特征但缺乏信息支撑,或交易者排名一般。**大多数普通鲸鱼交易**应该在这个范围。 -- **0.0-0.2(极低)**: 未上榜交易者的常规交易,无任何异常信号。 +- **0.8-1.0 (Very High)**: Only when **clear evidence of non-public information** is found. Example: trade timing precisely hours before a major announcement that was completely unpredictable; or trader has known information channels (e.g., identified as a political insider). **Very few trades should reach this level.** +- **0.6-0.8 (High)**: High-ranked trader + trade timing highly aligned with an upcoming unpriced event + search reveals specific information not yet reflected in market. Multiple strong pieces of evidence must be present simultaneously. +- **0.4-0.6 (Medium)**: High-ranked trader's large trade + some information support but uncertainty about whether it's non-public. This is where **most moderately suspicious trades** should fall. +- **0.2-0.4 (Low)**: Some anomalous features but lacking information support, or trader ranking is average. **Most ordinary whale trades** should be in this range. +- **0.0-0.2 (Very Low)**: Unranked trader's routine trade, no anomalous signals. -**常见的错误高估场景(必须避免)**: -- ❌ 仅因为交易者排名高就给 0.7+(高排名交易者每天做很多交易,绝大多数不存在信息不对称) -- ❌ 仅因为交易金额大就给 0.6+(大额交易是鲸鱼的常规操作) -- ❌ 短期价格预测市场(如"Bitcoin Up or Down 5分钟")给高分(这类市场几乎不可能有内幕信息) -- ❌ 临近到期的市场、价格接近 0 或 1 的交易给高分(这通常是市场共识的正常体现) -- ❌ 搜索到的信息都是公开新闻时给高分(公开信息 ≠ 内幕信息) -- ❌ 大型地缘政治/宏观市场(如伊朗局势、总统弹劾等)轻易给高分 — 这类市场参与者众多、信息源复杂,鲸鱼交易大多反映公开分析而非内幕 +**Common overestimation mistakes (must avoid)**: +- Do NOT give 0.7+ just because the trader ranks high (high-ranked traders make many trades daily, the vast majority show no information asymmetry) +- Do NOT give 0.6+ just because the trade amount is large (large trades are routine for whales) +- Do NOT give high scores to short-term price prediction markets (e.g., "Bitcoin Up or Down 5 minutes") — these markets almost never involve non-public information +- Do NOT give high scores to near-expiry markets or trades with prices near 0 or 1 — this usually reflects normal market consensus +- Do NOT give high scores when all found information is public news (public information ≠ non-public information) +- Do NOT easily give high scores to large geopolitical/macro markets (e.g., Iran situation, presidential impeachment) — these markets have many participants and complex information sources; whale trades mostly reflect public analysis rather than non-public information -**应该重点关注的高价值场景**: -- ✅ **小众市场**(日交易量 < $500k)的大额交易 — 参与者少、信息差大、鲸鱼信号更有意义 -- ✅ **新项目/代币发行**(FDV、TGE、公售)— 项目方和早期投资者可能有未公开信息 -- ✅ **具体可验证事件**(某人是否会做某事、某公司是否会公布某决定)— 知情者范围小、信息明确 -- ✅ **冷门市场突然出现高排名交易者大额交易** — 反常行为是最强信号 +**High-value scenarios to focus on**: +- **Niche markets** (daily volume < $500k) with large trades — fewer participants, larger information gap, whale signals more meaningful +- **New projects/token launches** (FDV, TGE, public sale) — project teams and early investors may have non-public information +- **Specific verifiable events** (will someone do something, will a company announce a decision) — small circle of insiders, clear information +- **Quiet markets suddenly attracting high-ranked traders with large trades** — anomalous behavior is the strongest signal -## 事件关联持仓分析 +## Event-Related Position Analysis -交易数据中会包含鲸鱼在同一事件(Event)下其他市场的持仓情况。你需要综合分析: -- **对冲识别**:如果鲸鱼在同一事件的不同市场持有反向仓位,可能是对冲策略而非单方向押注,应降低信息不对称评分 -- **关联押注**:如果鲸鱼在同一事件的多个市场持有同向仓位(如同时看多多个相关市场),这增强了信号强度 -- **套利行为**:同一事件下价格不一致时,鲸鱼可能在做套利,这不是信息不对称信号 +Trade data includes the whale's positions in other markets under the same Event. You must analyze: +- **Hedge detection**: If the whale holds opposing positions in different markets under the same event, it may be a hedging strategy rather than a directional bet — lower information asymmetry score +- **Correlated bets**: If the whale holds same-direction positions across multiple markets under the same event (e.g., bullish on multiple related markets), this strengthens the signal +- **Arbitrage**: Price inconsistencies across markets under the same event may indicate arbitrage — this is not an information asymmetry signal -## 市场多空力量分析 +## Market Long/Short Analysis -交易数据中会包含该市场 Top 5 买方和卖方的排名与持仓。你需要分析: -- **聪明钱共识**:如果多个高排名、高盈利的交易者站在同一方,信号更强 -- **对手方分析**:如果鲸鱼的对手方都是低排名交易者,信号更可靠;如果对手方也有高排名交易者,则需要更谨慎 -- **市场集中度**:如果某一方的持仓高度集中在少数大户,市场可能更容易出现剧烈波动 +Trade data includes the market's Top 5 buyers and sellers with rankings and positions. Analyze: +- **Smart money consensus**: If multiple high-ranked, high-PnL traders are on the same side, the signal is stronger +- **Counterparty analysis**: If the whale's counterparties are all low-ranked traders, the signal is more reliable; if counterparties include high-ranked traders, more caution is needed +- **Market concentration**: If one side's positions are heavily concentrated in a few large holders, the market may be more prone to sharp volatility -## 重要原则 -- 主动使用工具获取最新信息来验证交易 -- 搜索不到支持信息时,内幕可能性应降低 -- 信心不足时建议 HOLD -- 鲸鱼也可能犯错或有其他动机(对冲、试探等) -- 综合事件关联持仓和市场多空力量做出更全面的判断 -- **时间判断**:不要猜测未知的事件时间(如比赛开始时间)。如果需要判断交易发生在事件之前还是之后,必须用工具搜索确认事件时间,而非凭空推测""" +## Key Principles +- Proactively use tools to gather latest information for trade verification +- When searches yield no supporting information, information asymmetry likelihood should decrease +- When confidence is low, recommend HOLD +- Whales can also be wrong or have other motivations (hedging, probing, etc.) +- Synthesize event-related positions and market long/short dynamics for comprehensive judgment +- **Time judgment**: Do NOT guess unknown event times (e.g., match start times). If you need to determine whether a trade occurred before or after an event, you MUST use tools to confirm the event time — never speculate""" @staticmethod def analyze_whale_trade(trade_context: str, historical_context: str = "") -> str: @@ -164,152 +164,152 @@ class WhaleAnalyzerPrompts: --- -# 鲸鱼交易验证任务 +# Whale Trade Verification Task -## 第 0 步:预筛选(必须首先完成) +## Step 0: Pre-screening (must complete first) -在进行任何搜索和分析之前,先判断这笔信号是否值得生成完整报告。 +Before any search or analysis, determine whether this signal warrants a full report. -**筛选标准:** -- **优先分析(低门槛)**: 小众市场、加密货币/代币发行相关(FDV、TGE、公售、协议治理)、具体可验证事件、冷门市场突然出现大额交易 -- **门槛更高(需要信号特别强)**: 大型地缘政治市场(战争、制裁、外交)、宏观经济/Fed利率/选举等参与者众多的大市场 -- **直接跳过**: 体育/赛事结果、价格已接近 0 或 1 的市场(≥0.95 或 ≤0.05) +**Screening criteria:** +- **Prioritize (low threshold)**: Niche markets, crypto/token launch related (FDV, TGE, public sale, protocol governance), specific verifiable events, quiet markets with sudden large trades +- **Higher threshold (need especially strong signals)**: Large geopolitical markets (war, sanctions, diplomacy), macro/Fed rate/election markets with many participants +- **Skip directly**: Sports/game results, markets with price near 0 or 1 (>=0.95 or <=0.05) -综合交易金额、交易者排名和画像、异常评分、市场类型判断。 +Assess holistically based on trade amount, trader rank and profile, anomaly score, and market type. -**如果判定不值得分析,直接输出以下 JSON 并结束,不要进行后续步骤:** +**If deemed not worth analyzing, output the following JSON and stop — do not proceed to subsequent steps:** ```json -{{{{"action": "SKIP", "reason": "一句话理由"}}}} +{{{{"action": "SKIP", "reason": "one-line reason"}}}} ``` -**如果判定值得分析,继续以下步骤。** +**If deemed worth analyzing, continue with the following steps.** --- -## 请完成以下步骤: +## Complete the following steps: -### 1. 信息搜集 -根据市场主题,使用可用工具搜索相关信息: -- 该市场主题的最新新闻和动态 -- 社交媒体上的讨论和舆情 -- 任何可能触发这笔交易的事件 +### 1. Information Gathering +Based on market topic, use available tools to search for relevant information: +- Latest news and developments on the market topic +- Social media discussions and sentiment +- Any events that may have triggered this trade -### 2. 交易信号分析 -- 交易者排名和历史盈亏表现 -- 结构化画像(排名、PnL、交易行为数据、近期交易记录) -- 交易时机是否异常 +### 2. Trade Signal Analysis +- Trader ranking and historical P&L performance +- Structured profile (ranking, PnL, trading behavior data, recent trades) +- Whether the trade timing is anomalous -### 3. 事件关联持仓分析 -- 该鲸鱼在同一事件的其他市场是否有持仓? -- 如果有反向持仓(如同时持有 Yes 和 No,或在相关市场对冲),可能是对冲/套利策略,应降低信息不对称评分 -- 如果同方向押注多个关联市场,则信号增强 +### 3. Event-Related Position Analysis +- Does the whale have positions in other markets under the same event? +- If opposing positions exist (e.g., holding both Yes and No, or hedging in related markets), it may be a hedge/arbitrage strategy — lower information asymmetry score +- If same-direction bets across multiple related markets, the signal is strengthened -### 4. 市场多空力量分析 -- Top 5 看多方和看空方分别是谁?排名如何? -- 高排名、高盈利的交易者集中在哪一方?这代表聪明钱的共识 -- 该鲸鱼的对手方资质如何?如果对手方也有高排名交易者,需更谨慎 +### 4. Market Long/Short Analysis +- Who are the Top 5 on each side? What are their rankings? +- Which side has the concentration of high-ranked, high-PnL traders? This represents smart money consensus +- What is the quality of the whale's counterparties? If counterparties also include high-ranked traders, be more cautious -### 5. 信息差分析 -- 搜索到的信息是否支持这笔交易的方向? -- 这些信息是否已被市场完全定价? -- 如存在信息差,幅度有多大? +### 5. Information Gap Analysis +- Does the information found support the trade's direction? +- Has this information been fully priced by the market? +- If an information gap exists, how large is it? -### 6. 历史信号对比(如有) -- 历史信号与当前信号的方向是否一致? -- 是否有高排名交易者参与? -- 交易金额和价格的趋势如何? +### 6. Historical Signal Comparison (if available) +- Are historical signals directionally consistent with the current signal? +- Were high-ranked traders involved? +- What are the trends in trade amounts and prices? -### 7. 信息不对称评估 +### 7. Information Asymmetry Assessment -评估交易者相对于公开信息的信息优势。核心逻辑: -- I_public = 你通过所有工具能获取到的公开信息集合 -- I_trader = 交易者做出该交易决策所依据的信息集合 -- 信息不对称 = I_trader - I_public -- 如果公开信息已能充分解释交易行为 → 分数低 -- 如果公开信息无法解释交易行为(交易者可能有额外信息源、领域专长、数据速度优势)→ 分数高 +Assess the trader's information advantage relative to public information. Core logic: +- I_public = the set of public information you can obtain through all tools +- I_trader = the set of information the trader used to make this trade decision +- Information asymmetry = I_trader - I_public +- If public information can fully explain the trade behavior → low score +- If public information cannot explain the trade behavior (trader may have additional sources, domain expertise, data speed advantage) → high score -输出 JSON 格式评估: +Output JSON assessment: ```json {{ "information_asymmetry_score": 0.0-1.0, "trader_credibility": "HIGH/MEDIUM/LOW/UNKNOWN", - "reasoning": "简要推理过程", - "insider_evidence": "关键证据" + "reasoning": "brief reasoning process", + "insider_evidence": "key evidence" }} ``` -注意: -- information_asymmetry_score 必须严格校准:大多数交易应在 0.2-0.5,只有发现明确的信息优势证据时才给 0.7+ -- 信息优势包括但不限于:领域专长、数据源速度差、非公开渠道、精准的时机把握 -- 仅凭交易者排名高或交易金额大,information_asymmetry_score 不应超过 0.5 -- 确保输出有效 JSON""" +Notes: +- information_asymmetry_score must be strictly calibrated: most trades should be 0.2-0.5, only give 0.7+ when clear evidence of information advantage is found +- Information advantage includes but is not limited to: domain expertise, data source speed difference, non-public channels, precise timing +- Trader ranking or trade size alone should NOT push information_asymmetry_score above 0.5 +- Ensure valid JSON output""" @staticmethod def superforecaster_prompt(question: str, description: str, outcomes: List[str]) -> str: """Superforecaster-style analysis prompt.""" outcomes_str = ", ".join(outcomes) - return f"""作为一名超级预测者,请对以下预测市场进行分析: + return f"""As a superforecaster, analyze the following prediction market: -**问题**: {question} +**Question**: {question} -**描述**: {description} +**Description**: {description} -**可能结果**: {outcomes_str} +**Possible Outcomes**: {outcomes_str} -请使用以下系统性方法进行预测: +Please use the following systematic approach: -### 1. 问题分解 -- 将问题分解为更小、更易管理的部分 -- 识别回答问题需要解决的关键组成部分 +### 1. Problem Decomposition +- Break the question into smaller, more manageable parts +- Identify key components needed to answer the question -### 2. 信息收集 -- 考虑相关的定量数据和定性见解 -- 思考最新的相关新闻和专家分析 +### 2. Information Gathering +- Consider relevant quantitative data and qualitative insights +- Think about the latest relevant news and expert analysis -### 3. 基础概率 -- 使用统计基线或历史平均值作为起点 -- 将当前情况与类似的历史事件进行比较 +### 3. Base Rate +- Use statistical baselines or historical averages as starting points +- Compare the current situation with similar historical events -### 4. 因素评估 -- 列出可能影响结果的因素 -- 评估每个因素的影响,考虑正面和负面因素 -- 使用证据权衡这些因素 +### 4. Factor Assessment +- List factors that may influence the outcome +- Assess each factor's impact, considering both positive and negative factors +- Weigh these factors using evidence -### 5. 概率思维 -- 用概率而非确定性表达预测 -- 为不同结果分配可能性 -- 承认不确定性 +### 5. Probabilistic Thinking +- Express predictions as probabilities, not certainties +- Assign likelihoods to different outcomes +- Acknowledge uncertainty -请为每个结果提供概率估计,确保所有概率之和为100%。 +Please provide probability estimates for each outcome, ensuring all probabilities sum to 100%. -输出格式: +Output format: ```json {{ - "analysis": "你的详细分析", + "analysis": "your detailed analysis", "probabilities": {{ - "结果1": 0.XX, - "结果2": 0.XX + "outcome1": 0.XX, + "outcome2": 0.XX }}, "confidence_level": "low/medium/high", - "key_factors": ["因素1", "因素2", "因素3"] + "key_factors": ["factor1", "factor2", "factor3"] }} ```""" @staticmethod def quick_decision_prompt(trade_summary: str) -> str: """Quick decision prompt for time-sensitive situations.""" - return f"""快速分析以下鲸鱼交易并给出建议: + return f"""Quickly analyze the following whale trade and provide a recommendation: {trade_summary} -请直接输出JSON格式的决策: +Output your decision in JSON format: ```json {{ "action": "BUY/SELL/HOLD", - "outcome": "交易的结果选项", + "outcome": "the outcome to trade on", "confidence": 0.0-1.0, - "reasoning": "一句话理由" + "reasoning": "one-line reason" }} ```""" diff --git a/src/services/anomaly_detector.py b/src/services/anomaly_detector.py index f164c7f..ec60bd7 100644 --- a/src/services/anomaly_detector.py +++ b/src/services/anomaly_detector.py @@ -250,9 +250,9 @@ class AnomalyDetector: # Direction interpretation (only BUY trades, no normalization) if trade.outcome == "Yes": - direction_meaning = f"交易者买入 Yes Token @ {trade.price:.4f},看多(认为事件会发生)" + direction_meaning = f"Trader bought Yes Token @ {trade.price:.4f} — Bullish (believes event will occur)" else: - direction_meaning = f"交易者买入 No Token @ {trade.price:.4f},看空(认为事件不会发生)" + direction_meaning = f"Trader bought No Token @ {trade.price:.4f} — Bearish (believes event will NOT occur)" # Buy price directly reflects taker's conviction — lower price = higher odds bet implied_prob = trade.price @@ -305,50 +305,50 @@ class AnomalyDetector: # Anomaly breakdown string bd = context["anomaly_breakdown"] breakdown_str = ( - f" 绝对金额: {bd.get('size_abs', 0):.2f} | " - f"相对市场: {bd.get('size_relative', 0):.2f} | " - f"价格不确定性: {bd.get('price_uncertainty', 0):.2f} | " - f"交易时间: {bd.get('time_of_day', 0):.2f} | " - f"交易者偏离: {bd.get('trader_deviation', 0):.2f} | " - f"聚集信号: {bd.get('cluster', 0):.2f}" + f" Absolute size: {bd.get('size_abs', 0):.2f} | " + f"Relative to market: {bd.get('size_relative', 0):.2f} | " + f"Price uncertainty: {bd.get('price_uncertainty', 0):.2f} | " + f"Time of day: {bd.get('time_of_day', 0):.2f} | " + f"Trader deviation: {bd.get('trader_deviation', 0):.2f} | " + f"Cluster signal: {bd.get('cluster', 0):.2f}" ) return f""" -## 大额交易异常检测报告 +## Whale Trade Anomaly Detection Report -### 交易详情 -- **交易金额**: ${context['trade_size_usd']:,.2f} USDC -- **交易方向**: BUY {context['trade_outcome']} Token ({'看多' if context['trade_outcome'] == 'Yes' else '看空'}) -- **买入价格**: {context['trade_price']:.4f}(赔率约 {1/context['trade_price']:.1f}x) -- **交易时间**: {datetime.fromtimestamp(trade.timestamp).strftime('%Y-%m-%d %H:%M:%S UTC')} -- **交易者钱包**: {trade.proxy_wallet or 'Unknown'} +### Trade Details +- **Trade amount**: ${context['trade_size_usd']:,.2f} USDC +- **Trade direction**: BUY {context['trade_outcome']} Token ({'Bullish' if context['trade_outcome'] == 'Yes' else 'Bearish'}) +- **Buy price**: {context['trade_price']:.4f} (~{1/context['trade_price']:.1f}x odds) +- **Trade time**: {datetime.fromtimestamp(trade.timestamp).strftime('%Y-%m-%d %H:%M:%S UTC')} +- **Trader wallet**: {trade.proxy_wallet or 'Unknown'} -### 异常评分 -- **综合评分**: {context['anomaly_score']:.2f}/1.00 -- **评分分解**: +### Anomaly Score +- **Overall score**: {context['anomaly_score']:.2f}/1.00 +- **Score breakdown**: {breakdown_str} -### 交易解读 -- **方向含义**: {context['direction_meaning']} +### Trade Interpretation +- **Direction**: {context['direction_meaning']} {trader_profile_str} -### 市场信息 -- **市场问题**: {context['market_question']} -- **市场描述**: {whale_trade.market_description or 'N/A'} -- **市场状态**: {context['market_state']} -- **当前赔率**: +### Market Information +- **Market question**: {context['market_question']} +- **Market description**: {whale_trade.market_description or 'N/A'} +- **Market state**: {context['market_state']} +- **Current odds**: {prices_str} {whale_trade.format_event_positions()} {whale_trade.format_top_traders()} -### 分析要点 -1. 这是一笔 ${context['trade_size_usd']:,.2f} 的大额交易,方向为 **BUY {context['trade_outcome']} Token** +### Analysis Points +1. This is a ${context['trade_size_usd']:,.2f} large trade, direction: **BUY {context['trade_outcome']} Token** 2. {context['direction_meaning']} -3. **重点分析上方的 Trader Profile JSON,综合排名、PnL、交易行为和近期交易记录判断交易者可信度** -4. **注意分析该鲸鱼在同一事件下的其他持仓** — 如果持有反向仓位可能是对冲策略 -5. **参考该市场 Top 多空持仓者的阵营** — 高排名交易者集中在哪一方 +3. **Focus on the Trader Profile JSON above — assess trader credibility from ranking, PnL, trading behavior, and recent trades** +4. **Analyze the whale's positions in other markets under the same event** — opposing positions may indicate hedging +5. **Reference the market's Top long/short holders** — which side has the concentration of high-ranked traders -请分析这笔交易的信息不对称可能性。 +Please analyze the information asymmetry likelihood of this trade. """ diff --git a/src/services/anomaly_history.py b/src/services/anomaly_history.py index d0fb651..8d40ef2 100644 --- a/src/services/anomaly_history.py +++ b/src/services/anomaly_history.py @@ -89,27 +89,27 @@ class AnomalyHistoryService: signal_count = len(signals) context = f""" -### 历史异常交易信号 (共 {signal_count} 笔) +### Historical Anomaly Signals ({signal_count} total) -**重要**: 该市场之前已经检测到 {signal_count} 笔异常交易。请将这些历史信号与当前最新信号一起进行综合分析,统一评估信息不对称可能性。 +**Important**: {signal_count} anomalous trades have been previously detected on this market. Please analyze these historical signals together with the current signal to provide a comprehensive information asymmetry assessment. """ for i, signal in enumerate(signals, 1): context += f""" --- -#### 历史信号 {i} +#### Historical Signal {i} {signal.to_context_string()} --- """ context += """ -**综合分析要点**: -1. 对比所有信号(历史+当前)的交易方向,分析是否有一致趋势 -2. 对比不同交易者的排名和历史记录,判断"聪明钱"的流向 -3. 如果多个高排名交易者都指向同一方向,信息不对称可能性显著提高 -4. 如果信号方向相反,需要分析原因(时间变化、新信息、不同判断) -5. 考虑时间因素:越近期的信号越有参考价值 -6. 观察交易金额的变化趋势:金额是否在增加? +**Comprehensive Analysis Points**: +1. Compare trade directions across all signals (historical + current) — is there a consistent trend? +2. Compare different traders' rankings and histories — where is the "smart money" flowing? +3. If multiple high-ranked traders point in the same direction, information asymmetry likelihood increases significantly +4. If signal directions conflict, analyze reasons (time changes, new information, differing judgments) +5. Consider time factor: more recent signals are more relevant +6. Observe trade amount trends: are amounts increasing? """ return context