USDPeriodMetrics

Documentation for eth_defi.research.vault_metrics.USDPeriodMetrics Python class.

class USDPeriodMetrics

Bases: eth_defi.research.vault_metrics.PeriodMetrics

USD-converted period metrics for one ETH/BTC vault period.

This JSON-only subtype leaves the public/native PeriodMetrics schema 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

exchange_rate_start

USD per canonical underlying unit at samples_start_at.

exchange_rate_end

USD per canonical underlying unit at samples_end_at.

annualisation_error_reason

Why annualised returns are unavailable despite valid absolute returns.

avg_utilisation

Average utilisation over the period (lending vaults only, 0.0–1.0)

cagr_gross

Compounding annual returns

cagr_net

daily_samples

Number of daily datapoitns used

deposit_count

Number of individually extracted deposit events during the period.

deposit_value

Gross deposited value, only when individual events were extracted.

error_reason

Error reason if metrics could not be calculated, None if successful

flow_value

Signed flow value: deposits minus redemptions.

k_ratio

Kestner's 2013 K-ratio of daily share prices, with 365 observations per year.

max_drawdown

Period maximum drawdown

period

period_end_at

When was end share price sampled

period_start_at

When was start share price sampled

ranking_chain

Rank among vaults on the same chain (1 = best), based on CAGR

ranking_curator

Rank among vaults managed by the same curator (1 = best), based on CAGR

ranking_overall

Rank among all vaults (1 = best), based on CAGR

ranking_protocol

Rank among vaults in the same protocol (1 = best), based on CAGR

raw_samples

Number of raw datapoints used

redeem_value

Gross redeemed value, only when individual events were extracted.

redemption_count

Number of individually extracted redemption events during the period.

returns_gross

How much absolute returns we had

returns_net

samples_end_at

samples_start_at

share_price_end

Share price at end

share_price_start

Share price at beginning

sharpe

Sharpe ratio based on daily returns.

tvl_end

TVL at the end of the period

tvl_high

Maximum TVL in the period

tvl_low

Minimum TVL in the period

tvl_start

TVL at the start of the period

volatility

Annualised 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
Return type

None