def _list_of_gross_yield(list_of_deals, base_rents): '''Calculate List of gross yields.''' assert is_list_of_decimals(list_of_deals) assert is_decimal(base_rents) return [(base_rents / deal) if deal != 0 else None for deal in list_of_deals]
def _list_of_irr(list_of_coupons, hpa_factor): '''Calculate list of IRRs for deal list.''' assert is_list_of_decimals(list_of_coupons) assert is_decimal(hpa_factor) return [(coupon + hpa_factor - decimal.Decimal(1.0)) for coupon in list_of_coupons]
def _list_of_coupon_irr(list_of_nois, return_factor, return_coefficient): '''Calculate list of Coupon IRRs for deal list.''' assert is_list_of_decimals(list_of_nois) assert is_decimal(return_factor) assert is_decimal(return_coefficient) return [(noi * return_factor) + return_coefficient for noi in list_of_nois]
def _list_of_coupon_irr(list_of_nois, return_factor, return_coefficient): '''Calculate list of Coupon IRRs for deal list.''' assert is_list_of_decimals(list_of_nois) assert is_decimal(return_factor) assert is_decimal(return_coefficient) return [(noi * return_factor) + return_coefficient for noi in list_of_nois]
def _list_of_deal_value(list_of_ratios, total_value): '''Calculate List of dollar values for deals given ratios and total valuation.''' assert is_list_of_decimals(list_of_ratios) assert is_decimal(total_value) if total_value == 0: return [] return [(ratio * total_value) for ratio in list_of_ratios]
def _list_of_surplus(list_of_nois, return_factor, return_coefficient, target_irr): '''Calculate List of surplus for deal list.''' assert is_list_of_decimals(list_of_nois) assert is_decimal(return_factor) assert is_decimal(return_coefficient) assert is_decimal(target_irr) return [(noi * return_factor) + return_coefficient - target_irr for noi in list_of_nois]
def _list_of_deal_value(list_of_ratios, total_value): '''Calculate List of dollar values for deals given ratios and total valuation.''' assert is_list_of_decimals(list_of_ratios) assert is_decimal(total_value) if total_value == 0: return [] return [(ratio * total_value) for ratio in list_of_ratios]
def _list_of_premium(list_of_deal_values, total_value): '''Calculate List of fractional premium (negative for discount) relative to total deal value.''' assert is_list_of_decimals(list_of_deal_values) assert is_decimal(total_value) if total_value == 0: return [] return [(deal_value/total_value) - decimal.Decimal(1.0) for deal_value in list_of_deal_values]
def _list_of_premium(list_of_deal_values, total_value): '''Calculate List of fractional premium (negative for discount) relative to total deal value.''' assert is_list_of_decimals(list_of_deal_values) assert is_decimal(total_value) if total_value == 0: return [] return [(deal_value / total_value) - decimal.Decimal(1.0) for deal_value in list_of_deal_values]
def _list_of_surplus(list_of_nois, return_factor, return_coefficient, target_irr): '''Calculate List of surplus for deal list.''' assert is_list_of_decimals(list_of_nois) assert is_decimal(return_factor) assert is_decimal(return_coefficient) assert is_decimal(target_irr) return [(noi * return_factor) + return_coefficient - target_irr for noi in list_of_nois]
def _list_of_noi(list_of_yields, noi_percent): '''Calculate List of Net Operating Incomes given yields for each deal and NOI percent.''' assert is_list_of_decimals(list_of_yields) assert is_decimal(noi_percent) return [(deal_yield * noi_percent) for deal_yield in list_of_yields]
def _list_of_profit(list_of_deals, baseline): '''Calculate List of dollar profit versus baseline.''' assert is_list_of_decimals(list_of_deals) assert is_decimal(baseline) return [(baseline - deal_value) for deal_value in list_of_deals]
def _list_of_irr(list_of_coupons, hpa_factor): '''Calculate list of IRRs for deal list.''' assert is_list_of_decimals(list_of_coupons) assert is_decimal(hpa_factor) return [(coupon + hpa_factor - decimal.Decimal(1.0)) for coupon in list_of_coupons]
def _list_of_noi(list_of_yields, noi_percent): '''Calculate List of Net Operating Incomes given yields for each deal and NOI percent.''' assert is_list_of_decimals(list_of_yields) assert is_decimal(noi_percent) return [(deal_yield * noi_percent) for deal_yield in list_of_yields]
def _list_of_gross_yield(list_of_deals, base_rents): '''Calculate List of gross yields.''' assert is_list_of_decimals(list_of_deals) assert is_decimal(base_rents) return [(base_rents / deal) if deal != 0 else None for deal in list_of_deals]
def _list_of_profit(list_of_deals, baseline): '''Calculate List of dollar profit versus baseline.''' assert is_list_of_decimals(list_of_deals) assert is_decimal(baseline) return [(baseline - deal_value) for deal_value in list_of_deals]