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.core.frame.DataFrame) – Price data with ‘id’ and ‘total_supply’ columns. Assumes data is sorted by timestamp within each vault.
- Returns
DataFrame with inactive lead time removed for each vault
- Return type
pandas.core.frame.DataFrame