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:
start_date
end_date
: Optional, defaults todate.max
contract_code
contract_sector
: Should always be set toCOMDTY
rolling_rule
: Should be set tocustom
if passing a value forcustom_roll_table
front_offset
: Only required ifrolling_rule
set tofront
orcustom
, defaults toNone
month_end_offset
: Only required ifrolling_rule
set toprev_month
, defaults toNone
monthly_roll_days
: Only required ifrolling_rule
not set tofront
orprev_month
, defaults toNone
. IfNone
, will default to5:9
unlessrici
rule is used (seesigtech.framework.schedules.roll_schedules.methods.rolling_rici
for more information)leverage
: Optional, defaults to1.
direction
:long
orshort
, defaults tolong
, this simply flips the sign of the weightscustom_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.