def initialize(context): # Select asset of interest context.asset = symbol('BTC_USD') # set_commission(TradingPairFeeSchedule(maker_fee=0.5, taker_fee=0.5)) # set_slippage(TradingPairFixedSlippage(spread=0.5)) # Set up a rebalance method to run every day schedule_function(rebalance, date_rule=date_rules.every_day())
def initialize(context): context.i = 0 context.asset = symbol(ASSET) set_max_leverage(1.0) attach_pipeline(make_pipeline(), 'vwap_pipeline') schedule_function( rebalance, date_rules.every_day(), )
def initialize(context): context.ASSET_NAME = 'USDT_BTC' context.WINDOW= 30 # For all trading pairs in the poloniex bundle, the default denomination # currently supported by Catalyst is 1/1000th of a full coin. Use this # constant to scale the price of up to that of a full coin if desired. context.TICK_SIZE = 1000.0 context.i = 0 context.asset = symbol(context.ASSET_NAME) attach_pipeline(make_pipeline(context), 'mr_pipeline') schedule_function( rebalance, date_rules.every_day(), )
def initialize(context): context.mailema = 0 context.univers = ['btc_usd', 'eos_usd', 'eth_usd', 'etc_usd', 'ltc_usd', 'zec_usd' ] context.objects = [] context.basePrice = {} context.day =0 context.dayday = 0 context.Vreturn = [] context.base = [] for obj in context.univers: context.objects.append(objectT(obj,0)) context.basePrice[obj] = None context.objects = dict(zip(context.univers,context.objects)) schedule_function(everyDay,half_days=False)
def initialize(context): context.ASSET_NAME = 'USDT_BTC' context.TARGET_INVESTMENT_RATIO = 0.8 context.SHORT_WINDOW = 30 context.LONG_WINDOW = 100 # For all trading pairs in the poloniex bundle, the default denomination # currently supported by Catalyst is 1/1000th of a full coin. Use this # constant to scale the price of up to that of a full coin if desired. context.TICK_SIZE = 1000.0 context.i = 0 context.asset = symbol(context.ASSET_NAME) set_max_leverage(1.0) attach_pipeline(make_pipeline(context), 'vwap_pipeline') schedule_function( rebalance, time_rules=times_rules.every_minute(), )