def __init__(self,
*,
total,
start = None,
vesting_dates = DEFAULT_VESTING_DATES,
vesting = (0.25, 0.25, 0.25, 0.25)):
"""Create an equity grant description.
TOTAL is the total size, in dollars, of the grant. START is
the date on which it starts; if None, the grant clock starts
on the company start date. VESTING_DATES is a sequence of
(MONTH, DAY) pairs on which equity grants vest --- a grant
that vests quarterly will have a four-element
VESTING_DATES sequence.
VESTING is a sequence of numbers that sum to 1.0. With default
vesting dates, each one represents a year over which the grant vests,
and the value of the number indicates the portion of the grant that
vests in that year.
"""
self.total = typecheck(total, numbers.Real)
self.start = typecheck(start, (date, timedelta, type(None)))
self.vesting_dates = typecheck(vesting_dates, seq_of(pair_of(int)))
self.vesting = typecheck(vesting, seq_of(numbers.Real))
if not math.isclose(sum(vesting), 1.0, rel_tol=1e-5):
raise ValueError("vesting fractions do not sum to 1: %1.5f" % sum(vesting))
评论列表
文章目录