quantlab.factor.predefined.daily_anomaly_alpha.acquirer_payments#
- quantlab.factor.predefined.daily_anomaly_alpha.acquirer_payments(side, consideration, counterparty, symbols)[source]#
Place each acquisition on its acquirer: +1 if paid in cash, -1 if in stock or stock and cash.
ACTIONS records the payment on the acquired company’s row (
side1 or 3), with the acquirer’s permaticker incounterparty; the result puts it on the acquirer’s column on the same bar, 0 elsewhere. An acquirer outsidesymbolsor another consideration is left out.Examples
>>> side = np.array([[1.0, np.nan], [np.nan, np.nan]]) >>> acquirer_payments(side, np.array([[2.0, np.nan], [np.nan] * 2]), np.array([[20.0, np.nan], [np.nan] * 2]), ... np.array([10, 20])).tolist() [[0.0, -1.0], [0.0, 0.0]]