RollingLMEFutureStrategy

RollingLMEFutureStrategy#

class sigtech.framework.strategies.rolling_future_strategy.RollingLMEFutureStrategy

Baseclasses: RollingFutureStrategy

Subclasses: RollingLMEFutureFXHedgedStrategy

Class implementing rolling LME future strategies potentially rolled over multiple days.

Keyword arguments:

  1. start_date

  2. end_date: Optional, defaults to date.max

  3. contract_code

  4. contract_sector: Should always be set to COMDTY

  5. rolling_rule: Should be set to custom if passing a value for custom_roll_table

  6. front_offset: Only required if rolling_rule set to front or custom, defaults to None

  7. month_end_offset: Only required if rolling_rule set to prev_month, defaults to None

  8. monthly_roll_days: Only required if rolling_rule not set to front or prev_month, defaults to None. If None, will default to 5:9 unless rici rule is used (see sigtech.framework.schedules.roll_schedules.methods.rolling_rici for more information)

  9. leverage: Optional, defaults to 1.

  10. direction: long or short, defaults to long, this simply flips the sign of the weights

  11. custom_roll_table: List of strings of month code with key 0 (this year) or 1 (next year), e.g. ['H[0]', 'K[0]', 'K[0]', 'N[0]', 'N[0]', 'U[0]', 'U[0]', 'X[0]', 'X[0]', 'F[1]', 'F[1]', 'H[1]'])

Example object creation:

import datetime as dtm

rf = sig.RollingLMEFutureStrategy(
    currency='USD',
    start_date=dtm.date(2015, 1, 2),
    end_date=dtm.date.max,
    contract_code='LA',
    contract_sector='COMDTY',
    rolling_rule='front',
    front_offset='-6,-4'
)
property contracts

Return the underlying contracts.

property synthetic_contracts

Return the underlying synthetic contracts.