calculate_net_returns_from_price

Documentation for eth_defi.research.vault_metrics.calculate_net_returns_from_price function.

calculate_net_returns_from_price(name, share_price, management_fee_annual, performance_fee, deposit_fee, withdrawal_fee, seconds_in_year=31557600.0, zero_epsilon=0.001, freq='h')

Convert a share price series to net return series after fees.

Parameters
  • name (str) – For debugging

  • share_price (pandas.Series) – Share price series with datetime index.

  • management_fee_annual (Optional[float]) – Annual management fee as a percent (0.02 = 2% per year).

  • performance_fee (Optional[float]) – Performance fee as a percent (0.20 = 20% of profits).

  • deposit_fee (Optional[float]) – Deposit fee as a percent (0.01 = 1% fee), or None if no fee.

  • withdrawal_fee (Optional[float]) – Withdrawal fee as a percent (0.01 = 1% fee), or None if no fee.

  • freq – The time series frequency (hourly, daily, etc) for management fee calculation.

Returns

Cumulative net profit as a floating point (0.10 = 10% profit).

Return type

pandas.Series