tmval.time_weighted_yield

tmval.value.time_weighted_yield(balance_times: list, balance_amounts: list, payments: tmval.value.Payments = None, payment_times: list = None, payment_amounts: list = None, annual: bool = False)tmval.rate.Rate[source]

Given a list of balances and payments, returns the time-weighted yield. If annual is set to True, returns the rate as an annual rate. Otherwise, the rate is effective over the investment term.

You may supply a Payments object, or specify the components separately.

Parameters
  • balance_times (list) – A list of balance times.

  • balance_amounts (list) – A list of balance amounts, corresponding to the balance times.

  • payments (Payments) – A Payments object.

  • payment_times (list) – A list of payment times.

  • payment_amounts (list) – A list of payment amounts, corresponding to the payment times.

  • annual (bool, defaults to False) – Whether you want the time-weighted yield to be annualized.

Returns

The time-weighted yield.

Return type

Rate