PY 07: Brand to ticker, linking auction results to public companies
Track: Code (Python client + raw REST) Prerequisite: PY_06.
The task
Query by stock_ticker instead of designer to pull everything a listed parent company sold across its portfolio of brands, in one category and then a second.
Starter steps
- Query all sold watch lots tied to Richemont's ticker:
rows = client.query(
"all_watches_data",
fields=["designer", "model", "item_title", "sale_date", "usd_price_decimal", "status", "stock_ticker"],
filters=[
{"field": "stock_ticker", "op": "eq", "value": "CFR.SW"},
{"field": "status", "op": "eq", "value": "sold"},
],
sort=[{"field": "sale_date", "direction": "desc"}],
limit=1000,
)
distinct_designers = sorted({r["designer"] for r in rows if r.get("designer")})
print(distinct_designers)
- Notice that
distinct_designerscan contain more than one brand name, since a single listed group can own multiple houses. - Run the same ticker filter against a second table,
all_jewels_gems_data, to see the same parent group's footprint in a different category:
jewelry_rows = client.query(
"all_jewels_gems_data",
fields=["designer", "item_title", "sale_date", "usd_price_decimal", "status", "stock_ticker"],
filters=[
{"field": "stock_ticker", "op": "eq", "value": "CFR.SW"},
{"field": "status", "op": "eq", "value": "sold"},
],
limit=1000,
)
print(len(jewelry_rows))
Expected result
distinct_designers lists more than one brand name, all tied to the same stock_ticker, showing that secondary-market results roll up to a single public company across its brand portfolio. jewelry_rows returns a separate set of lots from a different table, using the identical ticker filter, demonstrating that stock_ticker works the same way across categories.
Stretch challenge
Reuse the pricing_power(...) function from PY_04, but change its filter from a designer eq filter to a stock_ticker eq filter, and compute pricing power for the whole Richemont ticker at once versus for one of its individual brands, to see how an aggregate view compares to a single-brand view.