Yahoo Finance FOREX
Analyze major FOREX pairs using Yahoo Finance data: news, market data, sentiment analysis.
When to Use This Skill
- - User asks about FOREX pairs (EUR/USD, GBP/USD, USD/JPY, etc.)
- User wants latest FOREX news or market sentiment
- User needs fundamental analysis for currency trading
- User asks "What's happening with EUR/USD?" or similar
Supported Currency Pairs
7 Major Pairs:
- - EUR/USD 🇪🇺🇺🇸 (Euro Dollar)
- GBP/USD 🇬🇧🇺🇸 (Cable)
- USD/JPY 🇺🇸🇯🇵 (Dollar Yen)
- USD/CHF 🇺🇸🇨🇭 (Swissy)
- AUD/USD 🇦🇺🇺🇸 (Aussie)
- USD/CAD 🇺🇸🇨🇦 (Loonie)
- NZD/USD 🇳🇿🇺🇸 (Kiwi)
Quick Start
Fetch FOREX News
CODEBLOCK0
Output:
CODEBLOCK1
Workflow
1. User Asks About FOREX
User: "What's happening with EUR/USD?"
Your Action:
- 1. Run: INLINECODE0
- Parse the JSON output
- Analyze the sentiment and news
- Provide a summary with:
- Current rate and change
- Key news headlines
- Sentiment analysis (bullish/bearish)
- Trading context (support/resistance if available)
2. Analyze Sentiment
The script automatically calculates sentiment based on keywords:
Bullish Keywords: strengthens, rallies, hawkish, rate hike, growth
Bearish Keywords: weakens, falls, dovish, rate cut, recession
Sentiment Score:
- - Positive (> 2): Bullish for the pair
- Negative (< -2): Bearish for the pair
- Near zero: Neutral
3. Provide Context
Always include:
- - Fundamentals: What central banks are doing (ECB, Fed, BoJ, etc.)
- News Impact: How recent news affects the pair
- Technical Context: Current price vs support/resistance (if available)
Script Reference
fetchforexnews.py
Usage:
CODEBLOCK2
Arguments:
- -
<PAIR>: Currency pair (EURUSD, GBPUSD, USDJPY, USDCHF, AUDUSD, USDCAD, NZDUSD) - INLINECODE2 : Number of news articles to fetch (default: 10, max: 50)
Output Fields:
- -
pair: Currency pair code - INLINECODE4 : Current exchange rate
- INLINECODE5 : 24h percentage change
- INLINECODE6 : Array of news articles
-
title: Article headline
-
published: Publication timestamp
-
publisher: News source
-
link: Article URL (optional)
- -
sentiment: Sentiment analysis
-
pair_sentiment: Sentiment score (-10 to +10)
-
recommendation: BUY/SELL/HOLD
Examples
Get EUR/USD Analysis
CODEBLOCK3
Get GBP/USD News
CODEBLOCK4
Central Bank Focus
When analyzing FOREX pairs, consider these central banks:
- - EUR/USD: ECB (European Central Bank) vs Fed (Federal Reserve)
- GBP/USD: BoE (Bank of England) vs Fed
- USD/JPY: Fed vs BoJ (Bank of Japan)
- USD/CHF: Fed vs SNB (Swiss National Bank)
- AUD/USD: RBA (Reserve Bank of Australia) vs Fed
- USD/CAD: Fed vs BoC (Bank of Canada)
- NZD/USD: RBNZ (Reserve Bank of New Zealand) vs Fed
Best Practices
- 1. Always fetch news first before making analysis
- Check sentiment score to understand market bias
- Read headlines to identify key drivers
- Consider fundamentals (interest rates, economic data, geopolitics)
- Provide balanced analysis - acknowledge both bullish and bearish factors
- Mention risk factors - volatility, upcoming events, technical levels
Reference Files
See /references directory for:
- -
api-examples.md: Detailed usage examples - INLINECODE16 : Complete pairs reference with Yahoo Finance symbols
- INLINECODE17 : Sentiment calculation methodology
Limitations
- - News data may have slight delays (1-5 minutes)
- Sentiment is keyword-based, not deep NLP analysis
- Historical data limited to recent news (last 7-14 days typically)
- No real-time tick data (only periodic updates)
Troubleshooting
Script fails to run:
- - Ensure Python 3.7+ is installed
- Install yfinance: INLINECODE18
No news returned:
- - Check internet connection
- Verify pair symbol is correct
- Try different pair or reduce limit
Rate data missing:
- - Yahoo Finance API may be temporarily unavailable
- Try again in a few minutes
Support
For issues or questions:
- - GitHub: https://github.com/nazimboudeffa/openclaw-yahoo-finance-forex
- Report bugs via GitHub Issues
Yahoo Finance 外汇
使用雅虎财经数据分析主要外汇货币对:新闻、市场数据、情绪分析。
何时使用此技能
- - 用户询问外汇货币对(欧元/美元、英镑/美元、美元/日元等)
- 用户想要最新的外汇新闻或市场情绪
- 用户需要货币交易的基本面分析
- 用户询问欧元/美元走势如何?或类似问题
支持的货币对
7大主要货币对:
- - EUR/USD 🇪🇺🇺🇸(欧元/美元)
- GBP/USD 🇬🇧🇺🇸(英镑/美元,又称Cable)
- USD/JPY 🇺🇸🇯🇵(美元/日元)
- USD/CHF 🇺🇸🇨🇭(美元/瑞郎,又称Swissy)
- AUD/USD 🇦🇺🇺🇸(澳元/美元,又称Aussie)
- USD/CAD 🇺🇸🇨🇦(美元/加元,又称Loonie)
- NZD/USD 🇳🇿🇺🇸(纽元/美元,又称Kiwi)
快速入门
获取外汇新闻
bash
python3 scripts/fetchforexnews.py EURUSD --limit 10
输出:
json
{
pair: EURUSD,
current_rate: 1.10250,
change_pct: 0.136,
news: [
{
title: 欧洲央行维持利率鹰派立场,
published: 2026-02-02 14:30:00,
publisher: 路透社
}
],
sentiment: {
pair_sentiment: 3,
recommendation: 买入
}
}
工作流程
1. 用户询问外汇信息
用户: 欧元/美元走势如何?
你的操作:
- 1. 运行:python3 scripts/fetchforexnews.py EURUSD --limit 8
- 解析JSON输出
- 分析情绪和新闻
- 提供包含以下内容的摘要:
- 当前汇率及变动
- 关键新闻标题
- 情绪分析(看涨/看跌)
- 交易背景(支撑位/阻力位,如有)
2. 分析情绪
脚本根据关键词自动计算情绪:
看涨关键词: 走强、反弹、鹰派、加息、增长
看跌关键词: 走弱、下跌、鸽派、降息、衰退
情绪评分:
- - 正值(> 2):对该货币对看涨
- 负值(< -2):对该货币对看跌
- 接近零:中性
3. 提供背景信息
始终包含:
- - 基本面: 各央行(欧洲央行、美联储、日本央行等)的动向
- 新闻影响: 近期新闻如何影响该货币对
- 技术面背景: 当前价格与支撑位/阻力位的关系(如有)
脚本参考
fetchforexnews.py
用法:
bash
python3 scripts/fetchforexnews.py <货币对> [--limit N]
参数:
- - <货币对>:货币对(EURUSD、GBPUSD、USDJPY、USDCHF、AUDUSD、USDCAD、NZDUSD)
- --limit N:获取的新闻文章数量(默认:10,最大:50)
输出字段:
- - pair:货币对代码
- currentrate:当前汇率
- changepct:24小时变动百分比
- news[]:新闻文章数组
- title:文章标题
- published:发布时间戳
- publisher:新闻来源
- link:文章链接(可选)
- pair_sentiment:情绪评分(-10 到 +10)
- recommendation:买入/卖出/持有
示例
获取欧元/美元分析
bash
python3 scripts/fetchforexnews.py EURUSD --limit 5
获取英镑/美元新闻
bash
python3 scripts/fetchforexnews.py GBPUSD --limit 8
央行关注点
分析外汇货币对时,需考虑以下央行:
- - EUR/USD:欧洲央行 vs 美联储
- GBP/USD:英国央行 vs 美联储
- USD/JPY:美联储 vs 日本央行
- USD/CHF:美联储 vs 瑞士央行
- AUD/USD:澳大利亚央行 vs 美联储
- USD/CAD:美联储 vs 加拿大央行
- NZD/USD:新西兰央行 vs 美联储
最佳实践
- 1. 始终先获取新闻,再进行分析
- 检查情绪评分,了解市场倾向
- 阅读标题,识别关键驱动因素
- 考虑基本面(利率、经济数据、地缘政治)
- 提供平衡分析——同时承认看涨和看跌因素
- 提及风险因素——波动性、即将发生的事件、技术位
参考文件
参见 /references 目录:
- - api-examples.md:详细使用示例
- forex-pairs.md:完整货币对参考及雅虎财经代码
- sentiment-guide.md:情绪计算方法
局限性
- - 新闻数据可能有轻微延迟(1-5分钟)
- 情绪分析基于关键词,非深度自然语言处理
- 历史数据仅限于近期新闻(通常为最近7-14天)
- 无实时报价数据(仅定期更新)
故障排除
脚本运行失败:
- - 确保已安装Python 3.7+
- 安装yfinance:pip install yfinance>=0.2.40
未返回新闻:
- - 检查网络连接
- 确认货币对代码正确
- 尝试其他货币对或减少数量限制
汇率数据缺失:
支持
如有问题或疑问:
- - GitHub:https://github.com/nazimboudeffa/openclaw-yahoo-finance-forex
- 通过GitHub Issues报告错误