ReinvestmentStrategy

ReinvestmentStrategy#

class sigtech.framework.strategies.reinvestment_strategy.ReinvestmentStrategy

Baseclasses: DailyStrategy

ReinvestmentStrategy - class used for handling corporate actions for underliers.

Keyword arguments:

  • currency.

  • start_date.

  • underlyer (string identifier/ticker).

  • end_date (optional, default is date.max).

  • reinvest_cash_dividends (optional: if True reinvests dividends at payment date, default is True).

  • trade_swap_format (optional: if False trades cash equity otherwise equity swaps, default is False).

  • swap_include_financing (optional: include financing costs, default is True).

  • swap_reset_frequency (optional: determines frequency of swap reset: default is 'SOM').

  • enable_tracking (optional: place adjustments to minimize exposure slippage, default is False).

  • tracking_threshold (optional: only need if ‘enable_tracking’ input is set to True, default is 1bps).

  • tracking_frequency (optional: determines frequency of tracking check: default is 'SOM').

  • universe_filters (optional: list of filter names to be applied, default is False).

  • final_trade_out (optional: if True will trigger order to trade out at before expiry_date, default is False).

  • net_dividend_override (optional: net dividend, if None the corporate action data is used, default is None).

  • withholding_tax_override (optional: dividend tax, if None the net or equity group rate is used, default is None).

  • libor_instrument_name (optional: swap financing fixing source, default is 'US0001M INDEX').

  • libor_spread (optional: financing spread, default is 25bps).

  • borrow_cost_ts (optional: fixed percentage rate or timeseries of percentage rates to use for shorting costs).

  • initial_shares (optional: number of shares to start with, if cash is not required 'initial_cash' should be set to zero).

  • use_substrats (optional: if True will use reinvestment strategies for spinoffs/mergers, default is False).

Example object creation:

import datetime as dtm

rs = sig.ReinvestmentStrategy(
    currency='USD',
    start_date=dtm.date(2018, 6, 1),
    end_date=dtm.date(2021, 6, 30),
    underlyer='1000045.SINGLE_STOCK.TRADABLE',
    withholding_tax_override=0.0,
    final_trade_out=True
)

The underlying instrument can be traded in two formats:

  • cash (outright).

  • swap format (including financing leg).

Internally the strategy constructs holding periods of the underlyer based on the filter lists and expiry date setting of the underlyer.

The building block schedules decisions for handling corporation actions throughout the lifetime of the strategy.

borrow_cost_ts: Optional[Union[Series, DataFrame, float, str, int]]
corporate_actions_take_up_voluntary: Optional[bool]
currency: Optional[str]
enable_tracking: Optional[bool]
final_trade_out: Optional[bool]
initial_shares: Optional[float]
libor_instrument_name: Optional[str]
libor_spread: Optional[float]
net_dividend_override: Optional[float]
order_type: Optional[Literal['group', 'split', 'auto']]
rebalance_bdc: Optional[str]
rebalance_offset: Optional[str]
rebalance_offset_sticky_end: Optional[bool]
reinvest_cash_dividends: Optional[bool]
spinoff_receive_cash: Optional[bool]
swap_include_financing: Optional[bool]
swap_reset_frequency: Optional[str]
tracking_frequency: Optional[str]
tracking_threshold: Optional[float]
trade_swap_format: Optional[bool]
underlyer: str
underlyer_type: Optional[Literal['SIG.TRADABLE_INTERNAL_ID', 'SIG.FUNGIBLE_INTERNAL_ID', 'SIG.COMPANY_INTERNAL_ID', 'ISIN', 'SEDOL', 'CUSIP']]
universe_filters: Optional[list[str]]
use_substrats: Optional[bool]
withholding_tax_override: Optional[float]
AVAILABLE_REBALANCE_FREQS

Subclasses: ScheduleFrequenciesWithIntraday

alias of ScheduleFrequencies

reinvestment_dt_from_effective(ca)

Compute the reinvestment date including dividends.

Parameters:

ca – Corporate action.

Returns:

Datetime.

Dividends are always determined on ExDate, and paid on payment date, but if Record date comes before ExDate, it will be first paid by record date records, and the final owner determined on ExDate, and paid two days later.

We simplify this, by paying the dividend two days after ExDate.

While this does not fully encapsulate the process, it avoids the complication of tracking the due bill in case the stock changes hands during the interim period.

For most cash dividend we have ExDate < RecordDate < PaymentDate (Record Date = ExDate + 2 business days). The dividend is determined on ExDate (technically on record date, but a 3 days lag is taken into account, which dictates the ExDate, i.e. the first day without dividend hence it’s 2 days before) but in some cases (larger cash dividends and special dividends) ExDate => PaymentDate > RecordDate. In these cases, the dividend is paid on payment date, according to the stock owner on record date, with a due bill attached. Then on ExDate the final owner is determined, and two business days later, it is paid to the final owner, if it was sold/bought during the interim period - the due bill is attached to each stock which is bought/sold and it takes care of the dividend transfer to the rightful owner (e.g. if someone held it on record date but sold it before ExDate date, it will be paid on record date, the seller would have sold the stcok with a due bill, which will trigger a withdraw from the seller’s account two days after ExDate and paid to the buyer).

reset_swap(dt)

Reset a swap on specific date.

Parameters:

dt – Reference datetime.

schedule_information()

Schedule information for the strategy.

strategy_initialization(dt)

Initial decision run on the start date of the strategy.

Parameters:

dt – Reference datetime.

trade_out(dt)

Trade out specific positions.

Parameters:

dt – Reference datetime.