Token导航 LogoToken导航TokenDH.com
待分类只读github未标认证来源可访问许可证需确认审计通过

currencies-and-fx货币和外汇

Agent Skill

currencies-and-fx 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,052

周安装

83

GitHub Stars

58

下载量

644
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:currencies-and-fx(货币和外汇)
来源仓库:https://github.com/joellewis/finance_skills
仓库路径:skills/currencies-and-fx
安装命令:
npx skills add https://github.com/joellewis/finance_skills --skill currencies-and-fx
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/joellewis/finance_skills --skill currencies-and-fx

简介

currencies-and-fx 用于分析货币市场,包括即期与远期汇率、利率平价、套期保值与套利策略。

  • 它解释外汇风险成因、对冲工具选择与国际投资影响,帮助用户理解汇率波动对资产组合的作用。
  • 适用于跨境交易、资产配置与风险管理场景,提供理论框架与实务建议以支持决策制定。
  • 使用时需结合具体币种与期限,否则通用模型可能不适用;输出包含公式推导与实例演算。
  • 安装前无需特殊权限,但需确保数据来源可靠;建议定期更新汇率参数以保持分析准确性。

SKILL.md

Currencies and FX

Purpose

Analyze currency markets including spot and forward exchange rates, interest rate parity relationships, FX hedging mechanics, cross rate derivation, and carry trade dynamics. This skill is essential for international investing, currency risk management, and understanding how interest rate differentials drive forward exchange rates.

Layer

2 — Asset Classes

Direction

both

When to Use

  • User asks about currency analysis, exchange rates, or FX markets
  • User asks about FX hedging or managing currency risk in international portfolios
  • User asks about interest rate parity (covered or uncovered)
  • User asks about carry trades or currency carry strategies
  • User asks about cross rates or currency quoting conventions
  • User asks about forward exchange rates or forward premium/discount
  • User asks about purchasing power parity (PPP) or real exchange rates
  • User asks about currency overlay programs

Core Concepts

Spot Rate

The price of one currency in terms of another for immediate delivery (T+2 settlement). Quoting convention: EUR/USD = 1.10 means 1 euro costs 1.10 US dollars. Some pairs are quoted as the number of foreign currency units per dollar (USD/JPY = 150), while others are quoted as dollars per foreign unit (EUR/USD = 1.10, GBP/USD = 1.27).

Forward Rate

The agreed exchange rate for a future currency transaction, determined by the interest rate differential between the two currencies. Forward rates are not forecasts of future spot rates — they are arbitrage-determined prices that reflect the cost of carry.

Covered Interest Rate Parity (CIP)

An arbitrage condition that must hold (and empirically does, closely):

F/S = (1 + r_d) / (1 + r_f)

where F = forward rate, S = spot rate, r_d = domestic interest rate, r_f = foreign interest rate (for the same period). If CIP were violated, riskless arbitrage would be possible by borrowing in one currency, converting, investing, and locking in the return with a forward.

Uncovered Interest Rate Parity (UIP)

A theoretical (not arbitrage-enforced) condition:

E(S_t) / S_0 = (1 + r_d) / (1 + r_f)

UIP predicts that the expected future spot rate adjusts to offset interest rate differentials. Empirically weak — high-interest-rate currencies tend to appreciate rather than depreciate as UIP predicts, which is why carry trades can be profitable.

Forward Premium/Discount

Forward Premium = (F - S) / S = (r_d - r_f) / (1 + r_f)

If the domestic interest rate exceeds the foreign rate, the forward rate is at a premium to spot (the foreign currency is more expensive forward). If the domestic rate is lower, the forward is at a discount.

Carry Trade

Borrow in a low-interest-rate currency and invest in a high-interest-rate currency, profiting from the interest rate differential. Profitable when UIP fails (i.e., the high-rate currency does not depreciate enough to offset the interest differential). Carry trades exhibit positive returns on average but with significant tail risk — sudden unwinds during risk-off episodes can cause severe losses (negative skewness, fat tails).

Cross Rate

Derive the exchange rate between two currencies using their rates against a common third currency:

EUR/GBP = (EUR/USD) / (GBP/USD)

For example, if EUR/USD = 1.10 and GBP/USD = 1.27, then EUR/GBP = 1.10 / 1.27 = 0.8661.

Currency Hedging

Use forward contracts to eliminate FX risk in international investments. A US investor with EUR assets can sell EUR forward to lock in the conversion rate. The hedging cost equals the interest rate differential between the two currencies (per CIP). When the domestic rate exceeds the foreign rate, hedging earns a positive return; when it is lower, hedging has a cost.

Real Exchange Rate

Adjusts the nominal exchange rate for relative price levels:

Real Rate = Nominal Rate × (Foreign Price Level / Domestic Price Level)

Changes in the real exchange rate reflect changes in competitiveness. If the real rate appreciates, domestic goods become more expensive relative to foreign goods.

Purchasing Power Parity (PPP)

The long-run anchor for exchange rates. PPP posits that exchange rates should adjust so that identical goods cost the same across countries. Empirically, PPP holds poorly in the short run but provides a reasonable guide to fair value over decades. Deviations from PPP can persist for years.

Currency Overlay

A systematic hedging program for international portfolios, managed separately from the underlying asset allocation. Overlay managers implement hedging ratios (e.g., hedge 50% of foreign exposure) and may make tactical adjustments based on valuation, carry, and momentum signals.

Key Formulas

FormulaExpressionUse Case
CIP Forward RateF = S × (1+r_d)/(1+r_f)Arbitrage-determined forward
UIP Expected SpotE(S_t) = S_0 × (1+r_d)/(1+r_f)Theoretical future spot
Forward Premium(F-S)/S = (r_d-r_f)/(1+r_f)Forward vs spot differential
Cross RateA/B = (A/C) / (B/C)Derive from common currency
Real Exchange Rateq = e × (P*/P)Competitiveness measure
Hedging Cost≈ r_d - r_f (annualized)Cost to hedge FX exposure

Worked Examples

Example 1: Forward Rate Calculation

Given: USD/JPY spot = 150, US 1-year rate = 5%, Japan 1-year rate = 0.5% Calculate: 1-year forward rate Solution: F = S × (1 + r_JPY) / (1 + r_USD) F = 150 × (1 + 0.005) / (1 + 0.05) F = 150 × 1.005 / 1.05 F = 150 × 0.95714 = 143.57

The forward rate is 143.57 JPY/USD. The yen is at a forward premium (fewer yen per dollar forward than spot) because Japanese rates are lower. A US investor hedging yen assets back to dollars would receive this favorable forward rate, effectively earning the interest rate differential.

Example 2: Hedging Cost for EUR Investor

Given: EUR/USD spot = 1.10, EUR 1-year rate = 3%, USD 1-year rate = 5% Calculate: Annual cost/benefit of hedging USD exposure back to EUR Solution: Forward rate: F = 1.10 × (1.03)/(1.05) = 1.10 × 0.98095 = 1.0790

A EUR investor hedging USD assets sells USD forward at 1.0790 EUR/USD. Hedging benefit = (S - F) / S = (1.10 - 1.079) / 1.10 = 1.91%

Because EUR rates (3%) are lower than USD rates (5%), the EUR investor earns a positive hedging return of approximately 2% (the interest rate differential). The hedged return on USD assets for a EUR investor is the USD return plus approximately 2% from the hedge.

Common Pitfalls

  • Currency quoting conventions — EUR/USD vs USD/JPY use opposite conventions; always clarify which currency is base and which is quote
  • Confusing nominal and real interest rate differentials — CIP uses nominal rates; real rate differentials affect real exchange rates differently
  • Carry trade crash risk — carry strategies exhibit negative skewness and fat tails; profits accumulate slowly but losses can be sudden and severe
  • CIP holds by arbitrage; UIP is a theory that often fails empirically — do not assume forward rates predict future spot rates

Cross-References

  • historical-risk (wealth-management plugin, Layer 1a): return measurement in multi-currency portfolios
  • equities (wealth-management plugin, Layer 2): international equity investing and currency effects
  • fixed-income-sovereign (wealth-management plugin, Layer 2): international bond investing and rate differentials
  • portfolio-construction (wealth-management plugin, Layer 3): currency hedging decisions in portfolio context

Reference Implementation

See scripts/currencies_and_fx.py for computational helpers.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.68%
按下载量换算230

Claude

31.64%
按下载量换算204

Cursor

19.41%
按下载量换算125

Gemini CLI

9.74%
按下载量换算63

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills