launch_financial_batch_optimization_process
Description
Enterprise users only.
Launch an optimization process that will consist of a collection of financial processes.
Simple Example
factor = 3.0
eids_to_add =['9dcb0992-2653-4467-bba1-f903b7a47922', ]
loc = ['strategy', 'dependencies','input']
params_template ={
'std_factor' : {'deviation':2*factor ,'max':20,'min':0.1,'location':loc},
'denom_days' : {'deviation':50*factor,'max':300,'min':0.5,'location':loc},
'numer_days' : {'deviation':50*factor,'max':299,'min':0.10,'location':loc},
'pl_hedge_attack': {'deviation':4*factor,'max':20,'min':1,'location':loc},
'pl2_hedge_attack': {'deviation':4*factor,'max':20,'min':1,'location':loc},
'pl_hedge_x_bias': {'deviation':1.5*factor,'max':20,'min':1.0,'location':loc},
'pl2_hedge_x_bias': {'deviation':1.5*factor,'max':20,'min':1.0,'location':loc},
'pl_start_date_delta_hours' : {'deviation':120*factor,'max':600,'min':2,'location':loc},
'pl2_start_date_delta_hours' : {'deviation':120*factor,'max':600,'min':2,'location':loc},
'rebalance_on_minimum_delta' : {'deviation':0.1*factor,'max':0.08,'min':0.04,'location':loc},
}
netDefOverrides = []
netDefOverride={'time_emitter' : {'dependencies':
{'delay': 0,
'end_date': '2019-01-05T20:00:00',
'increment': ['minutes', 300],
'input': None,
'mode': 'backtest',
'start_date': '2019-01-01T10:00:00'},
'name': 'time_emitter',
'type': 'TimeEmitter'}}
netDefOverrides.append(netDefOverride)
netDefOverride={'time_emitter' : {'dependencies':
{'delay': 0,
'end_date': '2018-01-05T20:00:00',
'increment': ['minutes', 300],
'input': None,
'mode': 'backtest',
'start_date': '2018-01-01T10:00:00'},
'name': 'time_emitter',
'type': 'TimeEmitter'}}
netDefOverrides.append(netDefOverride)
optimizer_settings = {}
import datetime
q = {
'name_prefix' : 'optimize_jef_test',
'api_key' : api_key,
'process_settings' : {},
'launch_settings' :{},
'network_def' : {},
'experiment_ids':eids_to_add,
'params_template':params_template,
'total_processes':12,
'total_running':12,
'netDefOverride':netDefOverrides,
'factor_decay':0.6, # 0.8
'netDefManual':['__ref','netDefManual'],
'round_limit':3,
'mode':'local',
'auto_restart':False,
'log_mode':'normal',
}
datserver = pq.launch_financial_batch_optimization_process(q,remote=False)