remove_inactive_lead_time

Documentation for eth_defi.research.wrangle_vault_prices.remove_inactive_lead_time function.

remove_inactive_lead_time(prices_df, logger=<built-in function print>)

Remove initial inactive period from each vault’s price history.

  • At the beginning of a vault’s lifecycle, total supply may remain constant while the vault is inactive (e.g., 1, 1000, etc.)

  • When the vault activates, the share price may jump, causing abnormal returns

  • This function removes the initial rows where total_supply hasn’t changed

  • Uses exact equality for comparison

  • Skips initial rows with zero or NaN total_supply to find first valid value

Parameters

prices_df (pandas.DataFrame) – Price data with ‘id’ and ‘total_supply’ columns. Assumes data is sorted chronologically within each vault. Timestamp labels may repeat because modern chains such as Monad can create multiple blocks per second. One-second accuracy is sufficient for price cleaning, so equal timestamp rows are retained and evaluated by their row positions instead of being deduplicated.

Returns

DataFrame with inactive lead time removed for each vault

Return type

pandas.DataFrame