price_spreads
Get ERS price spreads from farm to consumer - retail price versus farm value for food items and market baskets.
Examples
from openbb import obb
obb.usda.price_spreads(provider='usda')
# Get the milk and dairy market basket alongside whole milk, from 2015.
obb.usda.price_spreads(item='milk_and_dairy_basket,whole_milk', start_year=2015, provider='usda')
# Get every fresh vegetable series.
obb.usda.price_spreads(category='fresh_vegetables', provider='usda')
Parameters
- standard
- usda
category: str | None
Filter items by data product category. If None, all categories are included.
item: str | None | list[str | None]
Description
Item(s) to retrieve, as a comma-separated list of slugs. If None, all items are returned. Valid items are:
butter, cheddar_cheese, flour, fresh_apples, fresh_broccoli, fresh_carrots, fresh_fruit_basket, fresh_grapefruit, fresh_grapes, fresh_lettuce_iceberg, fresh_lettuce_romaine, fresh_oranges, fresh_peaches, fresh_potatoes, fresh_strawberries, fresh_tomatoes, fresh_vegetables_basket, ice_cream, milk_and_dairy_basket, orange_juice_nfc, sugar, vegetable_oil, white_pan_bread, whole_milk Multiple items allowed.
start_year: int | None
Start year for filtering the data. None returns from the beginning of each series. Marketing-year series filter on the first year of the marketing year.
end_year: int | None
End year for filtering the data. If None, returns up to the most recent year. Marketing-year series filter on the first year of the marketing year.
Returns
results: FarmToConsumerPriceSpreads
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
commodity: str
Commodity name, as published.
category: str
Data product category of the item.
year: int
Calendar year of the observation. For marketing-year series, the first year of the marketing year.
marketing_year: str | None
Marketing year of the observation, as published, e.g. '2024/25'. Only present for marketing-year series.
retail_price: float | None
Retail price, in dollars per published unit.
farm_value: float | None
Farm value, in dollars per published unit.
farm_price: float | None
Farm price, in dollars per published unit.
farm_share: float | None
Farm share of the retail price, in percent.
retail_cost_index: float | None
Retail cost index.
farm_value_index: float | None
Farm value index.
farm_to_retail_spread_index: float | None
Farm-to-retail spread index.