calculate_lifetime_metrics

Documentation for eth_defi.research.vault_metrics.calculate_lifetime_metrics function.

calculate_lifetime_metrics(df, vault_db, returns_column='returns_1h', core3_protocols=None, xerberus_pools=None, xerberus_protocols=None, stablecoin_rate_feeder=None)

Calculate lifetime metrics for each vault in the provided DataFrame.

  • All-time returns

  • 3M returns, latest

  • 1M returns, latest

  • Volatility (3M)

Lookback based on the last entry.

Each output row contains a share_price_source string describing how the adapter obtained its share-price observations, or None for legacy metadata and adapters without a price source.

Each output row also contains a denomination_token_rate value produced by eth_defi.feed.stablecoin_rate.StablecoinRateFeeder.get_denomination_token_rate_section(). The value is a eth_defi.feed.stablecoin_rate.DenominationTokenRate carrying both USD rate fields and, for non-USD stablecoins, native source currency rate fields.

Each output row exports minimum_deposit in denomination-token units and minimum_redemption in vault-share units. None means the scanner did not establish the relevant protocol limit, while 0 means it established that the vault has no minimum for that action.

Parameters
Returns

DataFrame, one row per vault.

Return type

pandas.DataFrame