"""Futures derived indicator schema constants.

期货衍生/报表数据 DataFrame 列名常量。
"""

from typing import Final

COL_DATE: Final[str] = "date"
COL_EXCHANGE: Final[str] = "exchange"
COL_SYMBOL: Final[str] = "symbol"
COL_VARIETY: Final[str] = "variety"
COL_CONTRACT: Final[str] = "contract"

COL_SPOT_PRICE: Final[str] = "spot_price"
COL_NEAR_CONTRACT: Final[str] = "near_contract"
COL_NEAR_PRICE: Final[str] = "near_price"
COL_MAIN_CONTRACT: Final[str] = "main_contract"
COL_MAIN_PRICE: Final[str] = "main_price"
COL_NEAR_BASIS: Final[str] = "near_basis"
COL_MAIN_BASIS: Final[str] = "main_basis"
COL_NEAR_BASIS_RATE: Final[str] = "near_basis_rate"
COL_MAIN_BASIS_RATE: Final[str] = "main_basis_rate"

COL_ROLL_YIELD: Final[str] = "roll_yield"
COL_DEFERRED_CONTRACT: Final[str] = "deferred_contract"

COL_RANK: Final[str] = "rank"
COL_VOLUME_MEMBER: Final[str] = "volume_member"
COL_VOLUME: Final[str] = "volume"
COL_VOLUME_CHANGE: Final[str] = "volume_change"
COL_LONG_MEMBER: Final[str] = "long_member"
COL_LONG_OPEN_INTEREST: Final[str] = "long_open_interest"
COL_LONG_OPEN_INTEREST_CHANGE: Final[str] = "long_open_interest_change"
COL_SHORT_MEMBER: Final[str] = "short_member"
COL_SHORT_OPEN_INTEREST: Final[str] = "short_open_interest"
COL_SHORT_OPEN_INTEREST_CHANGE: Final[str] = "short_open_interest_change"

COL_WAREHOUSE: Final[str] = "warehouse"
COL_RECEIPT_PREV: Final[str] = "receipt_prev"
COL_RECEIPT: Final[str] = "receipt"
COL_RECEIPT_CHANGE: Final[str] = "receipt_change"

COL_INVENTORY: Final[str] = "inventory"
COL_INVENTORY_CHANGE: Final[str] = "inventory_change"

FUTURES_BASIS_COLUMNS: Final[tuple[str, ...]] = (
    COL_DATE, COL_SYMBOL, COL_SPOT_PRICE,
    COL_NEAR_CONTRACT, COL_NEAR_PRICE,
    COL_MAIN_CONTRACT, COL_MAIN_PRICE,
    COL_NEAR_BASIS, COL_MAIN_BASIS,
    COL_NEAR_BASIS_RATE, COL_MAIN_BASIS_RATE,
)

FUTURES_ROLL_YIELD_COLUMNS: Final[tuple[str, ...]] = (
    COL_DATE, COL_SYMBOL, COL_ROLL_YIELD,
    COL_NEAR_CONTRACT, COL_DEFERRED_CONTRACT,
)

FUTURES_POSITION_RANKING_COLUMNS: Final[tuple[str, ...]] = (
    COL_DATE, COL_EXCHANGE, COL_VARIETY, COL_CONTRACT, COL_RANK,
    COL_VOLUME_MEMBER, COL_VOLUME, COL_VOLUME_CHANGE,
    COL_LONG_MEMBER, COL_LONG_OPEN_INTEREST, COL_LONG_OPEN_INTEREST_CHANGE,
    COL_SHORT_MEMBER, COL_SHORT_OPEN_INTEREST, COL_SHORT_OPEN_INTEREST_CHANGE,
)

FUTURES_WAREHOUSE_RECEIPT_COLUMNS: Final[tuple[str, ...]] = (
    COL_DATE, COL_EXCHANGE, COL_SYMBOL,
    COL_WAREHOUSE, COL_RECEIPT_PREV, COL_RECEIPT, COL_RECEIPT_CHANGE,
)

FUTURES_INVENTORY_COLUMNS: Final[tuple[str, ...]] = (
    COL_DATE, COL_SYMBOL, COL_INVENTORY, COL_INVENTORY_CHANGE,
)
