USDPeriodMetrics
Documentation for eth_defi.research.vault_metrics.USDPeriodMetrics Python class.
- class USDPeriodMetrics
Bases:
eth_defi.research.vault_metrics.PeriodMetricsUSD-converted period metrics for one ETH/BTC vault period.
This JSON-only subtype leaves the public/native
PeriodMetricsschema untouched. The exchange-rate fields are USD per canonical underlying unit, e.g. Bitcoin price in US dollars for a BTC vault. Flow fields are currently unavailable for ETH/BTC vaults and remain null; they are not copied from or converted alongside the price and TVL fields.Attributes summary
USD per canonical underlying unit at
samples_start_at.USD per canonical underlying unit at
samples_end_at.annualisation_error_reasonWhy annualised returns are unavailable despite valid absolute returns.
avg_utilisationAverage utilisation over the period (lending vaults only, 0.0–1.0)
cagr_grossCompounding annual returns
cagr_netdaily_samplesNumber of daily datapoitns used
deposit_countNumber of individually extracted deposit events during the period.
deposit_valueGross deposited value, only when individual events were extracted.
error_reasonError reason if metrics could not be calculated, None if successful
flow_valueSigned flow value: deposits minus redemptions.
k_ratioKestner's 2013 K-ratio of daily share prices, with 365 observations per year.
max_drawdownPeriod maximum drawdown
periodperiod_end_atWhen was end share price sampled
period_start_atWhen was start share price sampled
ranking_chainRank among vaults on the same chain (1 = best), based on CAGR
ranking_curatorRank among vaults managed by the same curator (1 = best), based on CAGR
ranking_overallRank among all vaults (1 = best), based on CAGR
ranking_protocolRank among vaults in the same protocol (1 = best), based on CAGR
raw_samplesNumber of raw datapoints used
redeem_valueGross redeemed value, only when individual events were extracted.
redemption_countNumber of individually extracted redemption events during the period.
returns_grossHow much absolute returns we had
returns_netsamples_end_atsamples_start_atshare_price_endShare price at end
share_price_startShare price at beginning
sharpeSharpe ratio based on daily returns.
tvl_endTVL at the end of the period
tvl_highMaximum TVL in the period
tvl_lowMinimum TVL in the period
tvl_startTVL at the start of the period
volatilityAnnualised volatility based on daily returns.
Methods summary
__init__(period[, error_reason, ...])- exchange_rate_start: Optional[float]
USD per canonical underlying unit at
samples_start_at.
- exchange_rate_end: Optional[float]
USD per canonical underlying unit at
samples_end_at.
- __init__(period, error_reason=None, period_start_at=None, period_end_at=None, share_price_start=None, share_price_end=None, raw_samples=0, samples_start_at=None, samples_end_at=None, daily_samples=0, returns_gross=None, returns_net=None, cagr_gross=None, cagr_net=None, annualisation_error_reason=None, volatility=None, sharpe=None, k_ratio=None, max_drawdown=None, tvl_start=None, tvl_end=None, tvl_low=None, tvl_high=None, ranking_overall=None, ranking_chain=None, ranking_protocol=None, ranking_curator=None, avg_utilisation=None, flow_value=None, deposit_value=None, redeem_value=None, deposit_count=None, redemption_count=None, exchange_rate_start=None, exchange_rate_end=None)
- Parameters
period (Literal['1W', '1M', '3M', '6M', '1Y', 'lifetime']) –
period_start_at (Optional[pandas.Timestamp]) –
period_end_at (Optional[pandas.Timestamp]) –
raw_samples (int) –
samples_start_at (Optional[pandas.Timestamp]) –
samples_end_at (Optional[pandas.Timestamp]) –
daily_samples (int) –
- Return type
None