agricultural_exchange_rates
Get ERS agricultural exchange rates - real and nominal commodity trade-weighted exchange rate indexes and bilateral local-currency-per-USD rates, each pivoted to a wide layout with time in the rows and the commodity (index tables) or partner country (bilateral tables) in the columns.
Examples
from openbb import obb
obb.usda.agricultural_exchange_rates(provider='usda')
# Get real bilateral exchange rates for North American partner countries.
obb.usda.agricultural_exchange_rates(provider='usda', table='real_bilateral_annual', region='North America')
# Get the monthly U.S.-import-weighted real trade-weighted index since 2020.
obb.usda.agricultural_exchange_rates(provider='usda', table='real_index_monthly', weights='U.S. suppliers (U.S. import weights)', start_year=2020)
Parameters
- standard
- usda
table: str | None
Default: real_index_annual
Description
Exchange-rate table to retrieve. Each table pivots to a wide layout with time in the rows and the commodity (index tables) or partner country (bilateral tables) in the value columns. Valid tables are:
real_index_annual, real_index_monthly, real_bilateral_annual, real_bilateral_monthly, nominal_bilateral_annual, nominal_bilateral_monthly
weights: str | None
Default: U.S. markets (U.S. export weights)
Description
Trade-weight scheme to keep for the index tables. Defaults to the U.S. export-weighted index. Set to None to stack all three schemes as a pinned row dimension. Ignored for the bilateral tables. Valid schemes are:
U.S. competitors (country export weights), U.S. markets (U.S. export weights), U.S. suppliers (U.S. import weights)
region: str | None
Description
Region to keep for the bilateral tables, filtering which partner-country columns appear. If None, all partner countries are returned. Ignored for the index tables. Valid regions are:
Central America, Europe, Middle East, North Africa, North America, Northeast Asia, Oceania, South America, South Asia, Southeast Asia, Sub-Saharan Africa, The Caribbean
start_year: int | None
Start year for filtering the data. If None, returns from the beginning of the series.
end_year: int | None
End year for filtering the data. If None, returns up to the most recent year.
Returns
results: AgriculturalExchangeRates
Serializable results.
provider: str | None
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- usda
period: str
Row label of the observation: the year for annual tables ('1970'), the year and month for monthly tables ('1970 January'), with the trade-weight scheme prefixed when more than one scheme is shown at once.