Cftc Fx Forward Curve
Implementation details
Class names
| Model name | Parameters class | Data class |
|---|---|---|
CftcFxForwardCurve | CftcFxForwardCurveQueryParams | CftcFxForwardCurveData |
Import Statement
from openbb_core.provider.standard_models. import (
CftcFxForwardCurveData,
CftcFxForwardCurveQueryParams,
)
Parameters
- standard
- cftc
pair: str | None
Default: USDJPY
Currency pair. The curve is quoted as the foreign currency per one US dollar whichever way the pair is named. The USD/EM pairs (USDKRW, USDINR, ...) are non-deliverable forwards.
source: str | None
Default: search
Where the trades come from. 'search' queries a window of dissemination days and prices each tenor from the most recent day it traded in depth; 'slice' uses a single day's cumulative file, which leaves thin tenors missing.
date: date | None
Dissemination date (UTC). With source='search' this ends the lookback window, defaulting to today. With source='slice' it selects the most recent day on or before it that priced this pair. History is retained for 366 days.
lookback_days: int | None
Default: 30
Number of dissemination days to search back over, ending on date. Only used when source='search'. A longer window fills in more tenors, at the cost of pricing the thin ones further from today; check staleness_days.
min_notional: float | None
Default: 1000000.0
Minimum trade notional, in the base currency. Set to 0 to keep every trade.
min_trades: int | None
Default: 1
Drop tenors priced by fewer than this many trades.
use_cache: bool | None
Default: True
Cache the source data locally, revalidating against the source ETag.
Data
- standard
- cftc
date: date | str
Date of the curve.
pair: str
Currency pair the curve is built for.
index: str
Settlement tenor of the node - the row and chart index.
tenor_days: int
Lower bound of the tenor bucket, in days.
rate: float
Outright forward rate, in units of the foreign currency per US dollar.
spot: float
Spot rate of the tenor's as-of date, per US dollar.
num_trades: int
Number of executed trades aggregated into the tenor.
total_notional: float | None
Sum of the base currency notional of the tenor's trades.
min_rate: float | None
Lowest executed rate at the node, per US dollar.
max_rate: float | None
Highest executed rate at the node, per US dollar.
as_of_date: date | None
Dissemination date the tenor's trades were reported on.
staleness_days: int | None
Days between the tenor's as-of date and the curve's date.