Class CorporateEventPositions
java.lang.Object
com.quantfinlib.data.CorporateEventPositions
Position-side treatment of
CorporateEvents: what happens to a
holding's share count, cost basis and cash. This is a stand-alone adapter
and does not touch any ledger; a caller maps CorporateEventPositions.Outcome onto its own
position store.
Conventions: total cost basis is conserved except where cash leaves
the position (cash in lieu and merger cash reduce basis pro rata to the
value they replace, a simplification of tax rules that differ by
jurisdiction). Spin-off basis is split by relative market value on the
ex-date, parentPrice : ratio * childPrice.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne holding of an instrument.static final recordResult of applying an event: the resulting holdings (the original instrument first, possibly with zero shares) and cash received. -
Method Summary
Modifier and TypeMethodDescriptionapply(CorporateEventPositions.Holding h, CorporateEvents.Event event, double exPrice) Applies an event that needs no election.merger(CorporateEventPositions.Holding h, CorporateEvents.CashStockMerger m, double cashElectedFraction, double aggregateCashElectedFraction) Applies a cash-and-stock merger with election and proration.Takes up rights in full: paysratio * Sper share forrationew shares.
-
Method Details
-
apply
public static CorporateEventPositions.Outcome apply(CorporateEventPositions.Holding h, CorporateEvents.Event event, double exPrice) Applies an event that needs no election.- Parameters:
exPrice- the instrument's first ex-date price, used for cash in lieu of fractions and spin-off basis allocation
-
takeUpRights
public static CorporateEventPositions.Outcome takeUpRights(CorporateEventPositions.Holding h, CorporateEvents.RightsIssue r) Takes up rights in full: paysratio * Sper share forrationew shares. -
merger
public static CorporateEventPositions.Outcome merger(CorporateEventPositions.Holding h, CorporateEvents.CashStockMerger m, double cashElectedFraction, double aggregateCashElectedFraction) Applies a cash-and-stock merger with election and proration.- Parameters:
cashElectedFraction- fraction of this holding elected for cash (rest elects stock)aggregateCashElectedFraction- fraction of all target shares elected for cash; when it exceedsCorporateEvents.CashStockMerger.maxCashFraction()every cash elector receives cash onmax / aggregateof its cash-elected shares and stock on the rest
-