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

commoditiescommodities 搜索

Agent Skill

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

总安装

3,026

周安装

130

GitHub Stars

58

下载量

1,061
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/joellewis/finance_skills --skill commodities

简介

commodities 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或代码变更进行整理。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 建议确认权限范围和维护状态,注意是否触发联网或文件读写。
  • 可结合来源仓库和 README 进一步核验具体用法。

SKILL.md

Commodities

Purpose

Analyze commodity markets including futures curve dynamics, roll yield mechanics, commodity index construction, and supply/demand fundamentals. This skill covers the unique return drivers of commodity investing and the critical distinction between spot returns and futures-based returns.

Layer

2 — Asset Classes

Direction

both

When to Use

  • User asks about commodity investing, commodity ETFs, or commodity futures
  • User asks about contango, backwardation, or futures curve shape
  • User asks about roll yield or the cost of rolling futures contracts
  • User asks about commodity indices (S&P GSCI, Bloomberg Commodity)
  • User asks about storage costs, convenience yield, or cost of carry
  • User asks about commodities as an inflation hedge
  • User asks about supply/demand fundamentals for specific commodity sectors
  • User asks about seasonality in commodity markets

Core Concepts

Spot vs Futures Pricing

The futures price is related to the spot price through the cost-of-carry model:

F = S × e^((r + u - y) × t)

where S = spot price, r = risk-free rate, u = storage cost, y = convenience yield, t = time to expiration. The convenience yield represents the benefit of holding the physical commodity (e.g., avoiding production shutdowns).

Contango

When F > S, the futures curve is upward-sloping. Storage costs and financing costs exceed the convenience yield. Contango creates negative roll yield because investors must sell cheaper expiring contracts and buy more expensive later contracts. Contango is common in well-supplied markets and for storable commodities like oil and natural gas.

Backwardation

When F < S, the futures curve is downward-sloping. The convenience yield exceeds storage and financing costs, often due to near-term supply scarcity. Backwardation creates positive roll yield because investors sell expensive expiring contracts and buy cheaper later contracts. Backwardation is common in tight supply environments.

Sources of Commodity Return

Total commodity return has three components:

  1. Spot return: Change in the spot price of the commodity
  2. Roll yield: Gain or loss from rolling expiring futures into the next contract
  3. Collateral yield: Interest earned on the margin/collateral posted to hold futures positions

Total Return = Spot Return + Roll Yield + Collateral Yield

Roll Yield

The gain or loss realized when an expiring futures contract is replaced by a longer-dated contract. In contango (upward curve), roll yield is negative. In backwardation (downward curve), roll yield is positive. Roll yield can be a significant drag or boost to total returns — in deep contango, roll yield can eliminate or even exceed spot price gains.

Commodity Sectors

  • Energy: crude oil, natural gas, gasoline, heating oil — largest sector by production value
  • Precious metals: gold, silver, platinum, palladium — safe haven and industrial uses
  • Industrial metals: copper, aluminum, zinc, nickel — tied to global economic activity
  • Agriculture: corn, wheat, soybeans, coffee, sugar, cotton — weather and harvest dependent
  • Livestock: live cattle, lean hogs — demand-driven

Commodity Indices

  • S&P GSCI: production-weighted, heavily tilted toward energy (~60%+). Represents global commodity production.
  • Bloomberg Commodity Index (BCOM): diversified with sector caps (33%) and single commodity caps (15%). More balanced exposure.
  • Index construction affects returns significantly — energy-heavy indices behave very differently from diversified indices.

Inflation Hedge Properties

Commodities tend to correlate positively with unexpected inflation, making them a potential hedge. The mechanism is direct: rising commodity prices are a component of inflation. However, the hedge is imperfect and works better for supply-driven inflation than demand-driven or monetary inflation.

Seasonality

Agricultural commodities show harvest-related patterns (supply increases at harvest, depressing prices). Energy shows heating/cooling demand patterns (natural gas peaks in winter, gasoline in summer driving season). Seasonality is well-known and partially priced in, but seasonal patterns can still affect futures curve shape.

Key Formulas

FormulaExpressionUse Case
Cost of CarryF = S × e^((r+u-y)×t)Theoretical futures price
Roll Yield (approx)(F_near - F_far) / F_nearReturn from contract rolling
Total ReturnSpot Return + Roll Yield + Collateral YieldComplete commodity return
Annualized Roll Yield((F_near/F_far)^(365/days_between) - 1)Annualized roll impact
Convenience Yieldy = r + u - (1/t) × ln(F/S)Implied convenience yield

Worked Examples

Example 1: Roll Yield in Contango

Given: Front month crude oil futures at $50, next month at $52 (contango), 1-month roll period Calculate: Annualized roll yield Solution: Monthly roll yield = (F_near - F_far) / F_near = ($50 - $52) / $50 = -4.0% This is a 1-month loss of 4.0%. Annualized roll yield ≈ -4.0% × 12 = -48% (simple annualization) More precisely: (50/52)^12 - 1 = (0.9615)^12 - 1 = -38.1%

This illustrates how severe contango can create enormous roll yield drag. In practice, front-to-second-month contango is rarely this steep, but the example shows why curve shape matters enormously for commodity investors.

Example 2: Total Return Decomposition for a Commodity ETF

Given: Over one year, spot crude oil rises from $70 to $77 (+10%). Roll yield = -6%. Collateral yield (T-bill rate) = 5%. Calculate: Total return of a futures-based commodity ETF Solution: Total Return = Spot Return + Roll Yield + Collateral Yield Total Return = 10% + (-6%) + 5% = 9%

Despite a 10% spot price increase, the futures-based investor earned only 9% due to 6% roll yield drag, partially offset by 5% collateral yield. A physical holder (no roll cost, no collateral yield) would have earned 10%.

Common Pitfalls

  • Confusing spot returns with futures-based returns — most investors access commodities through futures, where roll yield matters
  • Ignoring roll yield drag in contango markets — contango can erode returns substantially over time
  • Commodity ETFs track futures, not spot prices — ETF returns can diverge significantly from spot price movements
  • Storage costs matter for physical but not financial investors — financial investors face roll yield, not storage costs

Cross-References

  • historical-risk (wealth-management plugin, Layer 1a): return and risk measurement basics
  • real-assets (wealth-management plugin, Layer 2): physical commodity-related investments (gold, farmland)
  • currencies-and-fx (wealth-management plugin, Layer 2): commodity currency relationships
  • asset-allocation (wealth-management plugin, Layer 3): commodities as a portfolio diversifier

Reference Implementation

See scripts/commodities.py for computational helpers.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.21%
按下载量换算374

Claude

31.84%
按下载量换算338

Cursor

17.36%
按下载量换算184

Gemini CLI

8.32%
按下载量换算88

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills