def gen_raw_pay(offer,
start_date,
end_date,
paydays,
vests):
"""Generate pre-tax income events.
Inputs are as for the pay_info function.
Each income event is a tuple of (DAY, CASH, and EQUITY). DAY is a
datetime.date object giving the day of income dispersal; CASH and
EQUITY (either or both of which can be zero) is the amount of
money earned on that day."""
for day in iterdates(start_date, end_date):
cash, equity = pay_info(offer, day, start_date, paydays, vests)
yield (day, cash, equity)
评论列表
文章目录