Class CorporateEvents

java.lang.Object
com.quantfinlib.data.CorporateEvents

public final class CorporateEvents extends Object
Extended corporate actions and the back-adjustment factors they imply.

The plain idea: on an ex-date the share price drops (or jumps) for a mechanical reason, not because the holder gained or lost anything. Every bar before the ex-date is multiplied by one factor so that the adjusted series moves exactly like a holder's wealth would, assuming anything paid out is reinvested in the same stock at the theoretical ex price. CorporateActions keeps handling the 2.1 split and cash-dividend cases; this class adds the rest.

Formally, with P the last close before the ex-date, the price factor f applied to all earlier bars is:

Worked example (own test, CorporateEventsTest): a rights issue of 1 new for 4 held at 80 with the stock at 100 gives TERP = (100 + 0.25 * 80) / 1.25 = 96, so f = 0.96 and a cum-rights close of 100 becomes 96 on the adjusted tape.

totalReturnError(BarSeries, BarSeries, List) checks the factors against an independent share-count simulation of a reinvesting holder and returns the largest per-bar gap between the two return series.