Ejemplo n.º 1
0
 def __create_uqer_following_job(self):
     section = 'Uqer'
     options = self.__build_options(section)
     client_aliases = self.__filter_client_aliases(section)
     quant_client = UqerClient(**options)
     return OnlineQuantFollowingJob(self._client, quant_client, client_aliases, '{}FollowingJob'.format(section),
                                    **options)
Ejemplo n.º 2
0
 def __create_rice_quant_following_job(self, section):
     options = self.__build_options(section)
     client_aliases = self.__filter_client_aliases(section)
     quant_client = RiceQuantClient(**options)
     return OnlineQuantFollowingJob(self._client, quant_client,
                                    client_aliases,
                                    '{}-FollowingJob'.format(section),
                                    **options)
Ejemplo n.º 3
0
    def __init__(self):
        logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(levelname)-6s %(message)s')
        self._log = logging.getLogger()

        config_path = os.path.join(os.path.expanduser('~'), '.shipane_sdk', 'config', 'scheduler.ini')
        self._log.info('Config path: %s', config_path)
        self._config = ConfigParser()
        self._config.readfp(codecs.open(config_path, "r", "utf8"))

        self._client = Client(host=self._config.get('ShiPanE', 'host'),
                              port=self._config.get('ShiPanE', 'port'),
                              key=self._config.get('ShiPanE', 'key'))
        self._jq_client = JoinQuantClient(username=self._config.get('JoinQuant', 'username'),
                                          password=self._config.get('JoinQuant', 'password'),
                                          backtest_id=self._config.get('JoinQuant', 'backtest_id'))
        self._rq_client = RiceQuantClient(username=self._config.get('RiceQuant', 'username'),
                                          password=self._config.get('RiceQuant', 'password'),
                                          run_id=self._config.get('RiceQuant', 'run_id'))

        self._new_stock_purchase_job = NewStockPurchaseJob(self._config, self._client)
        self._jq_following_job = OnlineQuantFollowingJob(self._client, self._jq_client, 'JoinQuantFollowingJob')
        self._rq_following_job = OnlineQuantFollowingJob(self._client, self._rq_client, 'RiceQuantFollowingJob')
Ejemplo n.º 4
0
 def __create_following_job(self, section):
     client_aliases = self.__filter_client_aliases(section)
     return OnlineQuantFollowingJob(self._client, self._jq_client,
                                    client_aliases,
                                    '{}FollowingJob'.format(section))