RollingFXForwardStrategy#
-
class sigtech.framework.strategies.rolling_fx_forward_strategy.RollingFXForwardStrategy
Baseclasses:
RollingStrategyBase
Subclasses:
DynamicRollingFXForwardStrategy
Strategy going long the “long_currency” in rolling FX forwards and short the strategy currency (typically USD).
Keyword arguments:
start_date
end_date
(optional, default=date.max).currency
long_currency
forward_tenor
- examples - ‘ON’, ‘TN’, ‘SN’, ‘1W’, ‘1M’, ‘2M’, ‘3M’, ‘1W-FRI’, ‘3M_IMM’, ‘SOM’, ‘EOM’, ‘YEARLY’.custom_roll_offset
- number of days before maturity of the forward to do the roll. (optional, default method will try to get it fromROLL_OFFSET
defined inFXMarket
class).rolling_frequencies
: List of strings used to set roll dates, e.g. [‘3M’] (optional). Required only to override the logic ofcustom_roll_offset
(which is not required in caserolling_frequencies
are used).custom_roll_dates
: Pre-specified list of roll dates (optional). All other schedule parameters (i.e.custom_roll_offset
orrolling_frequencies
) are ignored if the list is non-empty.raise_error_if_cash_settled
(optional, default=False) - raises error if FXForward settles at maturity instead of being rolled (due to trading manager/underlying currencies holidays mismatch).execution_time_input
/execution_timezone_input
(optional) time/timezone to execute trades. This must be specified in the case of forward_tenor == ‘ON’ as we have to roll before the existing FXForward matures.set_weight_from_initial_cash
(optional) Set a fixed notional (in the strategy currency) for the fx forwards. IfTrue
, both the initial fx forward and the subsequent rolled forwards will have notional equal toinitial_cash
. If set toFalse
(default) the subsequent forwards will target have the strategy value at the time of the roll.
Example object creation:
st = sig.RollingFXForwardStrategy(long_currency='EUR', currency='USD', forward_tenor='3M_IMM', start_date=dtm.date(2010, 9, 14), custom_roll_offset=5, end_date=dtm.date(2016, 7, 20), )
-
custom_roll_dates: Optional[list[datetime.date]]
-
custom_roll_offset: Optional[int]
-
forward_tenor: str
-
long_currency: str
-
order_type: Optional[Literal['group', 'split', 'auto']]
-
raise_error_if_cash_settled: Optional[bool]
-
property roll_offset
Rolling offset for the strategy.
-
property rolling_table
Builds the strategy’s rolling table.
- Returns:
Built rolling table as a pandas DataFrame.
-
property tenor_offset
Tenor offset for the strategy.
-
bd_schedule()
Return the trade schedule of the FX forwards.
-
clean_up_foreign_cash(dt)
Trade out of any currencies held that are not the strategy currency.
- Parameters:
dt – Reference datetime.
-
fx_schedule() deprecated
Return the trade schedule of the FX forwards.
-
get_spot_delta(dt, is_intraday=False)
Calculate the spot delta for the strategy at a specified datetime (dt).
-
history_daily_strikes() Series
Calculate a timeseries of the strike prices for a new forward created each day with the same currencies and tenor as this strategy. This can be used to evaluate the strategy performance in terms of the percentage change in this series.
-
rolling_schedule()
Determine the dates to trade on.
-
strategy_initialization(dt)
Initial decision run on the start date of the strategy.
- Parameters:
dt – Reference datetime.