def estimated_revenue_gain(self): """ Return an estimate of how much new annual revenue will be obtained on the basis of this period's full investment. """ return sum_or_0(self.estimated_acq_revenue_gain, self.estimated_ret_revenue_gain)
def romi(self): """ Return an estimate of how effective marketing spend is, as a rough integer multiple of current investment. Returns 0 if the marketing investment in this period is $0. """ acq_weight = d_div_or_0(self.acq_investment, self.investment) ret_weight = decimal.Decimal(1) - acq_weight weighted_acq_romi = mult_or_0(self.acq_romi, acq_weight) weighted_ret_romi = mult_or_0(self.ret_romi, ret_weight) return round(sum_or_0(weighted_acq_romi, weighted_ret_romi))
def leased_units_calc(leased_units_end, leased_units_start, delta_leases): """The total number of leases in effect at the end of the period.""" # HACK To fix https://www.pivotaltracker.com/n/projects/2240283 in a day, # we use the number explicitly imported from our spreadsheets # *if it's available*. Otherwise, we compute it just like we used to. # Eventually, I think we need to consider simply importing *all* # of our per-period computations from the spreadsheet, and *completely* # deleting our ComputedPeriod code. But we're not there yet, and I'd # be nervous to make the change without a lot more available time. (This # needs to get done *today*!) -Dave if leased_units_end is not None: result = leased_units_end else: result = sum_or_0(leased_units_start, delta_leases) return result
def occupied_units(self): """The total occupancy in effect at the end of the period.""" # HACK To fix https://www.pivotaltracker.com/n/projects/2240283 in a day, # we use the number explicitly imported from our spreadsheets # *if it's available*. Otherwise, we compute it just like we used to. # Eventually, I think we need to consider simply importing *all* # of our per-period computations from the spreadsheet, and *completely* # deleting our ComputedPeriod code. But we're not there yet, and I'd # be nervous to make the change without a lot more available time. (This # needs to get done *today*!) -Dave underlying_value = self.period.get_value("occupied_units_end") if underlying_value is not None: result = underlying_value else: moved_in = sum_or_0(self.occupied_units_start, self.move_ins) result = sub_or_0(moved_in, self.move_outs) return result
def resident_decisions(self): """The total number of notices to renew and vacate""" return sum_or_0(self.lease_renewal_notices, self.lease_vacation_notices)