We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This change allows the ability to add multiple systems to the market.yml
The modified yaml would look like...
system: closer_scaled: holdperiod : 0 longentry : hc longexit : shortentry : lc shortexit : scale : True closer_unscaled: holdperiod : 0 longentry : hc longexit : shortentry : lc shortexit : scale : False
@@ -298,26 +299,27 @@ def market_pipeline(model, market_specs): system_specs = market_specs['system'] if system_specs: # get the system specs - system_name = system_specs['name'] - longentry = system_specs['longentry'] - shortentry = system_specs['shortentry'] - longexit = system_specs['longexit'] - shortexit = system_specs['shortexit'] - holdperiod = system_specs['holdperiod'] - scale = system_specs['scale'] - logger.info("Running System %s", system_name) - logger.info("Long Entry : %s", longentry) - logger.info("Short Entry : %s", shortentry) - logger.info("Long Exit : %s", longexit) - logger.info("Short Exit : %s", shortexit) - logger.info("Hold Period : %d", holdperiod) - logger.info("Scale : %r", scale) - # create and run the system - system = System(system_name, longentry, shortentry, - longexit, shortexit, holdperiod, scale) - tfs = run_system(model, system, group, intraday) - # generate a portfolio - gen_portfolio(model, system_name, group, tfs) + for system_name in system_specs: + longentry = system_specs[system_name]['longentry'] + shortentry = system_specs[system_name]['shortentry'] + longexit = system_specs[system_name]['longexit'] + shortexit = system_specs[system_name]['shortexit'] + holdperiod = system_specs[system_name]['holdperiod'] + scale = system_specs[system_name]['scale'] + logger.info("Running System %s", system_name) + logger.info("Long Entry : %s", longentry) + logger.info("Short Entry : %s", shortentry) + logger.info("Long Exit : %s", longexit) + logger.info("Short Exit : %s", shortexit) + logger.info("Hold Period : %d", holdperiod) + logger.info("Scale : %r", scale) + # create and run the system + system = System(system_name, longentry, shortentry, + longexit, shortexit, holdperiod, scale) + tfs = run_system(model, system, group, intraday) + # generate a portfolio + gen_portfolio(model, system_name, group, tfs) # Return the completed model return model
The text was updated successfully, but these errors were encountered:
Great suggestion, thank you.
Sorry, something went wrong.
No branches or pull requests
This change allows the ability to add multiple systems to the market.yml
The modified yaml would look like...
The text was updated successfully, but these errors were encountered: