diff --git a/vn.datayes/__init__.py b/vn.datayes/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/vn.datayes/api.py b/vn.datayes/api.py new file mode 100644 index 00000000..a2f74e04 --- /dev/null +++ b/vn.datayes/api.py @@ -0,0 +1,1561 @@ +#encoding: UTF-8 +import os +import json +import time +import requests +import pymongo +import pandas as pd + +from datetime import datetime, timedelta +from Queue import Queue, Empty +from threading import Thread, Timer +from pymongo import MongoClient + +from requests.exceptions import ConnectionError +from errors import (VNPAST_ConfigError, VNPAST_RequestError, +VNPAST_DataConstructorError) + +class Config(object): + """ + Json-like config object. + + The Config contains all kinds of settings and user info that + could be useful in the implementation of Api wrapper. + + privates + -------- + * head: string; the name of config file. + * token: string; user's token. + * body: dictionary; the main content of config. + - domain: string, api domain. + - ssl: boolean, specifes http or https usage. + - version: string, version of the api. Currently 'v1'. + - header: dictionary; the request header which contains + authorization infomation. + + """ + head = 'my config' + + toke_ = '44ebc0f058981f85382595f9f15f967' + \ + '0c7eaf2695de30dd752e8f33e9022baa0' + + token = '7c2e59e212dbff90ffd6b382c7afb57' + \ + 'bc987a99307d382b058af6748f591d723' + + body = { + 'ssl': False, + 'domain': 'api.wmcloud.com/data', + 'version': 'v1', + 'header': { + 'Connection' : 'keep-alive', + 'Authorization': 'Bearer ' + token + } + } + + def __init__(self, head=None, token=None, body=None): + """ + Reloaded constructor. + + parameters + ---------- + * head: string; the name of config file. Default is None. + * token: string; user's token. + * body: dictionary; the main content of config + """ + if head: + self.head = head + if token: + self.token = token + if body: + self.body = body + + def view(self): + """ Prettify printing method. """ + config_view = { + 'config_head' : self.head, + 'config_body' : self.body, + 'user_token' : self.token + } + print json.dumps(config_view, + indent=4, + sort_keys=True) + +#---------------------------------------------------------------------- +# Data containers. + +class BaseDataContainer(object): + """ + Basic data container. The fundamental of all other data + container objects defined within this module. + + privates + -------- + * head: string; the head(type) of data container. + * body: dictionary; data content. Among all sub-classes that inherit + BaseDataContainer, type(body) varies according to the financial meaning + that the child data container stands for. + - History: + - Bar + + """ + head = 'ABSTRACT_DATA' + body = dict() + pass + +class History(BaseDataContainer): + """ + Historical data container. The foundation of all other pandas + DataFrame-like two dimensional data containers for this module. + + privates + -------- + * head: string; the head(type) of data container. + * body: pd.DataFrame object; contains data contents. + + """ + head = 'HISTORY' + body = pd.DataFrame() + + def __init__(self, data): + """ + Reloaded constructor. + + parameters + ---------- + * data: dictionary; usually a Json-like response from + web based api. For our purposes, data is exactly resp.json() + where resp is the response from datayes developer api. + + - example: {'data': [ + { + 'closePrice': 15.88, + 'date': 20150701, ... + }, + { + 'closePrice': 15.99, + 'date': 20150702, ... + }, ...], + 'retCode': 1, + 'retMsg': 'Success'}. + + So the body of data is actually in data['data'], which is + our target when constructing the container. + + """ + try: + assert 'data' in data + self.body = pd.DataFrame(data['data']) + except AssertionError: + msg = '[{}]: Unable to construct history data; '.format( + self.head) + 'input is not a dataframe.' + raise VNPAST_DataConstructorError(msg) + except Exception,e: + msg = '[{}]: Unable to construct history data; '.format( + self.head) + str(e) + raise VNPAST_DataConstructorError(msg) + +class Bar(History): + """ + Historical Bar data container. Inherits from History() + DataFrame-like two dimensional data containers for Bar data. + + privates + -------- + * head: string; the head(type) of data container. + * body: pd.DataFrame object; contains data contents. + """ + head = 'HISTORY_BAR' + body = pd.DataFrame() + + def __init__(self, data): + """ + Reloaded constructor. + + parameters + ---------- + * data: dictionary; usually a Json-like response from + web based api. For our purposes, data is exactly resp.json() + where resp is the response from datayes developer api. + + - example: {'data': [{ + 'exchangeCD': 'XSHG', + 'utcOffset': '+08:00', + 'unit': 1, + 'currencyCD': 'CNY', + 'barBodys': [ + { + 'closePrice': 15.88, + 'date': 20150701, ... + }, + { + 'closePrice': 15.99, + 'date': 20150702, ... + }, ... ], + 'ticker': '000001', + 'shortNM': u'\u4e0a\u8bc1\u6307\u6570' + }, ...(other tickers) ], + 'retCode': 1, + 'retMsg': 'Success'}. + + When requesting 1 ticker, json['data'] layer has only one element; + we expect that this is for data collectioning for multiple tickers, + which is currently impossible nevertheless. + + So we want resp.json()['data'][0]['barBodys'] for Bar data contents, + and that is what we go into when constructing Bar. + """ + try: + assert 'data' in data + assert 'barBodys' in data['data'][0] + self.body = pd.DataFrame(data['data'][0]['barBodys']) + except AssertionError: + msg = '[{}]: Unable to construct history data; '.format( + self.head) + 'input is not a dataframe.' + raise VNPAST_DataConstructorError(msg) + except Exception,e: + msg = '[{}]: Unable to construct history data; '.format( + self.head) + str(e) + raise VNPAST_DataConstructorError(msg) + + +#---------------------------------------------------------------------- +# Datayes Api class + +class PyApi(object): + """ + Python based Datayes Api object. + + PyApi should be initialized with a Config json. The config must be complete, + in that once constructed, the private variables like request headers, + tokens, etc. become constant values (inherited from config), and will be + consistantly referred to whenever make requests. + + + privates + -------- + * _config: Config object; a container of all useful settings when making + requests. + * _ssl, _domain, _domain_stream, _version, _header, _account_id: + boolean, string, string, string, dictionary, integer; + just private references to the items in Config. See the docs of Config(). + * _session: requests.session object. + + + examples + -------- + + + """ + _config = Config() + + # request stuffs + _ssl = False + _domain = '' + _version = 'v1' + _header = dict() + _token = None + + _session = requests.session() + + def __init__(self, config): + """ + Constructor. + + parameters + ---------- + * config: Config object; specifies user and connection configs. + """ + if config.body: + try: + self._config = config + self._ssl = config.body['ssl'] + self._domain = config.body['domain'] + self._version = config.body['version'] + self._header = config.body['header'] + except KeyError: + msg = '[API]: Unable to configure api; ' + \ + 'config file is incomplete.' + raise VNPAST_ConfigError(msg) + except Exception,e: + msg = '[API]: Unable to configure api; ' + str(e) + raise VNPAST_ConfigError(msg) + + # configure protocol + if self._ssl: + self._domain = 'https://' + self._domain + else: + self._domain = 'http://' + self._domain + + def __access(self, url, params, method='GET'): + """ + request specific data from given url with parameters. + + parameters + ---------- + * url: string. + * params: dictionary. + * method: string; 'GET' or 'POST', request method. + + """ + try: + assert type(url) == str + assert type(params) == dict + except AssertionError,e: + raise e('[API]: Unvalid url or parameter input.') + if not self._session: + s = requests.session() + else: s = self._session + + # prepare and send the request. + try: + req = requests.Request(method, + url = url, + headers = self._header, + params = params) + prepped = s.prepare_request(req) # prepare the request + resp = s.send(prepped, stream=False, verify=True) + if method == 'GET': + assert resp.status_code == 200 + elif method == 'POST': + assert resp.status_code == 201 + return resp + except AssertionError: + msg = '[API]: Bad request, unexpected response status: ' + \ + str(resp.status_code) + raise VNPAST_RequestError(msg) + pass + except Exception,e: + msg = '[API]: Bad request.' + str(e) + raise VNPAST_RequestError(msg) + + #---------------------------------------------------------------------- + # directly get methods - Market data + + def get_equity_M1_one(self, + start='', end='', secID='000001.XSHG'): + """ + Get 1-minute intraday bar data of one security. + + parameters + ---------- + * start, end: string; Time mark formatted in 'HH:MM'. Specifies the + start/end point of bar. Note that the requested date is the + latest trading day (only one day), and the default start/end time is + '09:30' and min(now, '15:00'). Effective minute bars range from + 09:30 - 11:30 in the morning and 13:01 - 15:00 in the afternoon. + * secID: string; the security ID in the form of '000001.XSHG', i.e. + ticker.exchange + + """ + url = '{}/{}/api/market/getBarRTIntraDay.json'.format( + self._domain, self._version) + params = { + 'startTime': start, + 'endTime': end, + 'securityID': secID, + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + print resp.json() + data = Bar(resp.json()) + return data + except AssertionError: return 0 + + + def get_equity_M1(self, field='', start='20130701', end='20130730', + secID='000001.XSHG', output='df'): + """ + 1-minute bar in a month, currently unavailable. + + parameters + ---------- + * field: string; variables that are to be requested. + * start, end: string; Time mark formatted in 'YYYYMMDD'. + * secID: string; the security ID in the form of '000001.XSHG', i.e. + ticker.exchange + * output: enumeration of strings; the format of output that will be + returned. default is 'df', optionals are: + - 'df': returns History object, + where ret.body is a dataframe. + - 'list': returns a list of dictionaries. + + """ + url = '{}/{}/api/market/getBarHistDateRange.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'startDate': start, + 'endDate': end, + 'securityID': secID, + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + if output == 'df': + data = Bar(resp.json()) + elif output == 'list': + data = resp.json()['data'][0]['barBodys'] + return data + except AssertionError: return 0 + + + def get_equity_D1(self, field='', start='', end='', secID='', + ticker='', one=20150513, output='df'): + """ + Get 1-day interday bar data of one security. + + parameters + ---------- + * field: string; variables that are to be requested. Available variables + are: (* is unique for securities) + + - secID string. + - tradeDate date(?). + - ticker string. + - secShortName string. + - exchangeCD string. + - preClosePrice double. + - actPreClosePrice* double. + - openPrice double. + - highestPrice double. + - lowestPrice double. + - closePrice double. + - turnoverVol double. + - turnoverValue double. + - dealAmount* integer. + - turnoverRate double. + - accumAdjFactor* double. + - negMarketValue* double. + - marketValue* double. + - PE* double. + - PE1* double. + - PB* double. + + Field is an optional parameter, default setting returns all fields. + + * start, end: string; Date mark formatted in 'YYYYMMDD'. Specifies the + start/end point of bar. Start and end are optional parameters. If + start, end and ticker are all specified, default 'one' value will be + abandoned. + + * secID: string; the security ID in the form of '000001.XSHG', i.e. + ticker.exchange. + + * ticker: string; the trading code in the form of '000001'. + + * one: string; Date mark formatted in 'YYYYMMDD'. + Specifies one date on which data of all tickers are to be requested. + Note that to get effective json data response, at least one parameter + in {secID, ticker, tradeDate} should be entered. + + * output: enumeration of strings; the format of output that will be + returned. default is 'df', optionals are: + - 'df': returns History object, + where ret.body is a dataframe. + - 'list': returns a list of dictionaries. + + """ + if start and end and ticker: + one = '' # while user specifies start/end, covers tradeDate. + + url = '{}/{}/api/market/getMktEqud.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'beginDate': start, + 'endDate': end, + 'secID': secID, + 'ticker': ticker, + 'tradeDate': one + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + if output == 'df': + data = History(resp.json()) + elif output == 'list': + data = resp.json()['data'] + return data + #return resp + except AssertionError: return 0 + + def get_block_D1(self, field='', start='', end='', secID='', + ticker='', one=20150513): + """ + + """ + pass + + def get_repo_D1(self, field='', start='', end='', secID='', + ticker='', one=20150513): + """ + + """ + pass + + def get_bond_D1(self, field='', start='', end='', secID='', + ticker='', one=20150513, output='df'): + """ + Get 1-day interday bar data of one bond instrument. + + parameters + ---------- + + * field: string; variables that are to be requested. Available variables + are: (* is unique for bonds) + + - secID string. + - tradeDate date(?). + - ticker string. + - secShortName string. + - exchangeCD string. + - preClosePrice double. + - openPrice double. + - highestPrice double. + - lowestPrice double. + - closePrice double. + - turnoverVol double. + - turnoverValue double. + - turnoverRate double. + - dealAmount* integer. + - accrInterest* double. + - YTM(yieldToMaturity)* double. + + Field is an optional parameter, default setting returns all fields. + + * start, end, secID, ticker, one, output + string, string, string, string, string, string(enum) + Same as above, reference: get_equity_D1(). + + """ + if start and end and ticker: + one = '' # while user specifies start/end, covers tradeDate. + + url = '{}/{}/api/market/getMktBondd.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'beginDate': start, + 'endDate': end, + 'secID': secID, + 'ticker': ticker, + 'tradeDate': one + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + if output == 'df': + data = History(resp.json()) + elif output == 'list': + data = resp.json()['data'] + return data + except AssertionError: return 0 + + def get_future_D1(self, field='', start='', end='', secID='', + ticker='', one=20150513, output='df'): + """ + Get 1-day interday bar data of one future contract. + + parameters + ---------- + + * field: string; variables that are to be requested. Available variables + are: (* is unique for future contracts) + + - secID string. + - tradeDate date(?). + - ticker string. + - secShortName string. + - exchangeCD string. + - contractObject* string. + - contractMark* string. + - preSettlePrice* double. + - preClosePrice double. + - openPrice double. + - highestPrice double. + - lowestPrice double. + - closePrice double. + - settlePrice* double. + - turnoverVol integer. + - turnoverValue integer. + - openInt* integer. + - CHG* double. + - CHG1* double. + - CHGPct* double. + - mainCon* integer (0/1 flag). + - smainCon* integer (0/1 flag). + + Field is an optional parameter, default setting returns all fields. + + * start, end, secID, ticker, one, output + string, string, string, string, string, string(enum) + Same as above, reference: get_equity_D1(). + """ + if start and end and ticker: + one = '' # while user specifies start/end, covers tradeDate. + + url = '{}/{}/api/market/getMktFutd.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'beginDate': start, + 'endDate': end, + 'secID': secID, + 'ticker': ticker, + 'tradeDate': one + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + if output == 'df': + data = History(resp.json()) + elif output == 'list': + data = resp.json()['data'] + return data + except AssertionError: return 0 + + def get_future_main_D1(self, field='', start='', end='', mark='', + obj='', main=1, one=20150513): + """ + + """ + pass + + def get_fund_D1(self, field='', start='', end='', secID='', + ticker='', one=20150513, output='df'): + """ + Get 1-day interday bar data of one mutual fund. + + parameters + ---------- + + * field: string; variables that are to be requested. Available variables + are: (* is unique for funds) + + - secID string. + - tradeDate date(?). + - ticker string. + - secShortName string. + - exchangeCD string. + - preClosePrice double. + - openPrice double. + - highestPrice double. + - lowestPrice double. + - closePrice double. + - turnoverVol double. + - turnoverValue double. + - CHG* double. + - CHGPct* double. + - discount* double. + - discountRatio* double. + - circulationShares* double. + + Field is an optional parameter, default setting returns all fields. + + * start, end, secID, ticker, one, output + string, string, string, string, string, string(enum) + Same as above, reference: get_equity_D1(). + + """ + if start and end and ticker: + one = '' # while user specifies start/end, covers tradeDate. + + url = '{}/{}/api/market/getMktFundd.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'beginDate': start, + 'endDate': end, + 'secID': secID, + 'ticker': ticker, + 'tradeDate': one + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + if output == 'df': + data = History(resp.json()) + elif output == 'list': + data = resp.json()['data'] + return data + except AssertionError: return 0 + + def get_index_D1(self, field='', start='', end='', indexID='', + ticker='', one=20150513, output='df'): + """ + Get 1-day interday bar data of one stock index. + + parameters + ---------- + + * field: string; variables that are to be requested. Available variables + are: (* is unique for indices) + + - indexID string. + - tradeDate date(?). + - ticker string. + - secShortName string. + - porgFullName* string. + - exchangeCD string. + - preCloseIndex double. + - openIndex double. + - highestIndex double. + - lowestIndex double. + - closeIndex double. + - turnoverVol double. + - turnoverValue double. + - CHG* double. + - CHGPct* double. + + Field is an optional parameter, default setting returns all fields. + + * start, end, secID, ticker, one, output + string, string, string, string, string, string(enum) + Same as above, reference: get_equity_D1(). + + """ + if start and end and ticker: + one = '' # while user specifies start/end, covers tradeDate. + + url = '{}/{}/api/market/getMktIdxd.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'beginDate': start, + 'endDate': end, + 'indexID': indexID, + 'ticker': ticker, + 'tradeDate': one + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + if output == 'df': + data = History(resp.json()) + elif output == 'list': + data = resp.json()['data'] + return data + except AssertionError: return 0 + + def get_option_D1(self, field='', start='', end='', secID='', + optID='' ,ticker='', one=20150513, output='df'): + """ + Get 1-day interday bar data of one option contact. + + parameters + ---------- + + * field: string; variables that are to be requested. Available variables + are: (* is unique for options) + + - secID string. + - optID* string. + - tradeDate date(?). + - ticker string. + - secShortName string. + - exchangeCD string. + - preClosePrice double. + - openPrice double. + - highestPrice double. + - lowestPrice double. + - closePrice double. + - settlePrice* double. + - turnoverVol double. + - turnoverValue double. + - openInt* integer. + + Field is an optional parameter, default setting returns all fields. + + * start, end, secID, ticker, one, output + string, string, string, string, string, string(enum) + Same as above, reference: get_equity_D1(). + + """ + if start and end and ticker: + one = '' # while user specifies start/end, covers tradeDate. + + url = '{}/{}/api/market/getMktOptd.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'beginDate': start, + 'endDate': end, + 'secID': secID, + 'optID': optID, + 'ticker': ticker, + 'tradeDate': one + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + if output == 'df': + data = History(resp.json()) + elif output == 'list': + data = resp.json()['data'] + return data + except AssertionError: return 0 + + def get_stockFactor_D1(self, field='', secID='', + ticker='000001', start=20130701, end=20130801): + """ + Get 1-day interday factor data for stocks. + + parameters + ---------- + + * field: string; variables that are to be requested. + Field is an optional parameter, default setting returns all fields. + + * start, end, secID, ticker, one, output + string, string, string, string, string, string(enum) + Same as above, reference: get_equity_D1(). + """ + url = '{}/{}/api/market/getStockFactorsDateRange.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'beginDate': start, + 'endDate': end, + 'secID': secID, + 'ticker': ticker + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + data = History(resp.json()) + return data + except AssertionError: return 0 + + #---------------------------------------------------------------------- + # directly get methods - Fundamental Data + + def get_balanceSheet(self, field='', secID='', + start='', end='', pubStart='', pubEnd='', + reportType='', ticker='000001'): + """ + + """ + url = '{}/{}/api/fundamental/getFdmtBS.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'secID': secID, + 'ticker': ticker, + 'beginDate': start, + 'endDate': end, + 'publishDateBegin': pubStart, + 'publishDateEnd': pubEnd, + 'reportType': reportType + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + data = History(resp.json()) + return data + except AssertionError: return 0 + + def get_balanceSheet_bnk(self): + """ + + """ + pass + + def get_balanceSheet_sec(self): + """ + + """ + pass + + def get_balanceSheet_ins(self): + """ + + """ + pass + + def get_balanceSheet_ind(self): + """ + + """ + pass + + def get_cashFlow(self, field='', secID='', + start='', end='', pubStart='', pubEnd='', + reportType='', ticker='000001'): + """ + + """ + url = '{}/{}/api/fundamental/getFdmtCF.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'secID': secID, + 'ticker': ticker, + 'beginDate': start, + 'endDate': end, + 'publishDateBegin': pubStart, + 'publishDateEnd': pubEnd, + 'reportType': reportType + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + data = History(resp.json()) + return data + except AssertionError: return 0 + + def get_cashFlow_bnk(self): + """ + + """ + pass + + def get_cashFlow_sec(self): + """ + + """ + pass + + def get_cashFlow_ins(self): + """ + + """ + pass + + def get_cashFlow_ind(self): + """ + + """ + pass + + def get_incomeStatement(self, field='', secID='', + start='', end='', pubStart='', pubEnd='', + reportType='', ticker='000001'): + """ + + """ + url = '{}/{}/api/fundamental/getFdmtIS.json'.format( + self._domain, self._version) + params = { + 'field': field, + 'secID': secID, + 'ticker': ticker, + 'beginDate': start, + 'endDate': end, + 'publishDateBegin': pubStart, + 'publishDateEnd': pubEnd, + 'reportType': reportType + } + try: + resp = self.__access(url=url, params=params) + assert len(resp.json()) > 0 + data = History(resp.json()) + return data + except AssertionError: return 0 + + def get_incomeStatement_bnk(self): + """ + + """ + pass + + def get_incomeStatement_sec(self): + """ + + """ + pass + + def get_incomeStatement_ins(self): + """ + + """ + pass + + def get_incomeStatement_ind(self): + """ + + """ + pass + + #---------------------------------------------------------------------- + # multi-threading download for database storage. + + def __drudgery(self, id, db, indexType, + start, end, tasks, target): + """ + basic drudgery function. + This method loops over a list of tasks(tickers) and get data using + target api.get_# method for all those tickers. + A new feature 'date' or 'dateTime'(for intraday) will be automatically + added into every json-like documents, and specifies the datetime. + datetime() formatted date(time) mark. With the setting of MongoDB + in this module, this feature should be the unique index for all + collections. + + By programatically assigning creating and assigning tasks to drudgery + functions, multi-threading download of data can be achieved. + + parameters + ---------- + * id: integer; the ID of Drudgery session. + + * db: pymongo.db object; the database which collections of bars will + go into. + + * indexType: string(enum): 'date' or 'datetime', specifies what + is the collection index formatted. + + * start, end: string; Date mark formatted in 'YYYYMMDD'. Specifies the + start/end point of collections of bars. + + * tasks: list of strings; the tickers that this drudgery function + loops over. + + * target: method; the api.get_# method that is to be called by + drudgery function. + """ + if len(tasks) == 0: + return 0 + + # str to datetime inline functions. + if indexType == 'date': + todt = lambda str_dt: datetime.strptime(str_dt,'%Y-%m-%d') + update_dt = lambda d: d.update({'date':todt(d['tradeDate'])}) + elif indexType == 'datetime': + todt = lambda str_d, str_t: datetime.strptime( + str_d + ' ' + str_t,'%Y-%m-%d %H:%M') + update_dt = lambda d: d.update( + {'dateTime':todt(d['dataDate'], d['barTime'])}) + else: + raise ValueError + + # loop over all tickers in task list. + k, n = 1, len(tasks) + for ticker in tasks: + try: + data = target(start = start, + end = end, + ticker = ticker, + output = 'list') + assert len(data) >= 1 + map(update_dt, data) # add datetime feature to docs. + coll = db[ticker] + coll.insert_many(data) + print '[API|Session{}]: '.format(id) + \ + 'Finished {} in {}.'.format(k, n) + k += 1 + except AssertionError: + msg = '[API|Session{}]: '.format(id) + \ + 'Empty dataset in the response.' + print msg + pass + except Exception, e: + msg = '[API|Session{}]: '.format(id) + \ + 'Exception encountered when ' + \ + 'requesting data; ' + str(e) + print msg + pass + + def get_equity_D1_drudgery(self, id, db, start, end, tasks=[]): + """ + call __drudgery targeting at get_equity_D1() + """ + self.__drudgery(id=id, db=db, + indexType = 'date', + start = start, + end = end, + tasks = tasks, + target = self.get_equity_D1) + + def get_future_D1_drudgery(self, id, db, start, end, tasks=[]): + """ + call __drudgery targeting at get_future_D1() + """ + self.__drudgery(id=id, db=db, + indexType = 'date', + start = start, + end = end, + tasks = tasks, + target = self.get_future_D1) + + def get_index_D1_drudgery(self, id, db, start, end, tasks=[]): + """ + call __drudgery targeting at get_index_D1() + """ + self.__drudgery(id=id, db=db, + indexType = 'date', + start = start, + end = end, + tasks = tasks, + target = self.get_index_D1) + + def get_bond_D1_drudgery(self, id, db, start, end, tasks=[]): + """ + call __drudgery targeting at get_bond_D1() + """ + self.__drudgery(id=id, db=db, + indexType = 'date', + start = start, + end = end, + tasks = tasks, + target = self.get_bond_D1) + + def get_fund_D1_drudgery(self, id, db, start, end, tasks=[]): + """ + call __drudgery targeting at get_fund_D1() + """ + self.__drudgery(id=id, db=db, + indexType = 'date', + start = start, + end = end, + tasks = tasks, + target = self.get_fund_D1) + + def get_option_D1_drudgery(self, id, db, start, end, tasks=[]): + """ + call __drudgery targeting at get_option_D1() + """ + self.__drudgery(id=id, db=db, + indexType = 'date', + start = start, + end = end, + tasks = tasks, + target = self.get_option_D1) + + #---------------------------------------------------------------------- + + def __overlord(self, db, start, end, dName, + target1, target2, sessionNum): + """ + Basic controller of multithreading request. + Generates a list of all tickers, creates threads and distribute + tasks to individual #_drudgery() functions. + + parameters + ---------- + * db: pymongo.db object; the database which collections of bars will + go into. Note that this database will be transferred to every + drudgery functions created by controller. + + * start, end: string; Date mark formatted in 'YYYYMMDD'. Specifies the + start/end point of collections of bars. + + * dName: string; the path of file where all tickers' infomation + are stored in. + + * target1: method; targetting api method that overlord calls + to get tasks list. + + * target2: method; the corresponding drudgery function. + + * sessionNum: integer; the number of threads that will be deploied. + Concretely, the list of all tickers will be sub-divided into chunks, + where chunkSize = len(allTickers)/sessionNum. + + """ + if os.path.isfile(dName): + # if directory exists, read from it. + jsonFile = open(dName,'r') + allTickers = json.loads(jsonFile.read()) + jsonFile.close() + else: + data = target1() + allTickers = list(data.body['ticker']) + + chunkSize = len(allTickers)/sessionNum + taskLists = [allTickers[k:k+chunkSize] for k in range( + 0, len(allTickers), chunkSize)] + k = 0 + for tasks in taskLists: + thrd = Thread(target = target2, + args = (k, db, start, end, tasks)) + thrd.start() + k += 1 + return 1 + + def get_equity_D1_mongod(self, db, start, end, sessionNum=30): + """ + Controller of get equity D1 method. + """ + self.__overlord(db = db, + start = start, + end = end, + dName = 'names/equTicker.json', + target1 = self.get_equity_D1, + target2 = self.get_equity_D1_drudgery, + sessionNum = sessionNum) + + def get_future_D1_mongod(self, db, start, end, sessionNum=30): + """ + Controller of get future D1 method. + """ + self.__overlord(db = db, + start = start, + end = end, + dName = 'names/futTicker.json', + target1 = self.get_future_D1, + target2 = self.get_future_D1_drudgery, + sessionNum = sessionNum) + + def get_index_D1_mongod(self, db, start, end, sessionNum=30): + """ + Controller of get index D1 method. + """ + self.__overlord(db = db, + start = start, + end = end, + dName = 'names/idxTicker.json', + target1 = self.get_index_D1, + target2 = self.get_index_D1_drudgery, + sessionNum = sessionNum) + + def get_bond_D1_mongod(self, db, start, end, sessionNum=30): + """ + Controller of get bond D1 method. + """ + self.__overlord(db = db, + start = start, + end = end, + dName = 'names/bndTicker.json', + target1 = self.get_bond_D1, + target2 = self.get_bond_D1_drudgery, + sessionNum = sessionNum) + + def get_fund_D1_mongod(self, db, start, end, sessionNum=30): + """ + Controller of get fund D1 method. + """ + self.__overlord(db = db, + start = start, + end = end, + dName = 'names/fudTicker.json', + target1 = self.get_fund_D1, + target2 = self.get_fund_D1_drudgery, + sessionNum = sessionNum) + + def get_option_D1_mongod(self, db, start, end, sessionNum=30): + """ + Controller of get option D1 method. + """ + self.__overlord(db = db, + start = start, + end = end, + dName = 'names/optTicker.json', + target1 = self.get_option_D1, + target2 = self.get_option_D1_drudgery, + sessionNum = sessionNum) + + def get_equity_D1_mongod_(self, db, start, end, sessionNum=30): + """ + Outer controller of get equity D1 method. + Generates a list of all tickers, creates threads and distribute + tasks to individual get_equity_D1_drudgery() functions. + + parameters + ---------- + * db: pymongo.db object; the database which collections of bars will + go into. Note that this database will be transferred to every + drudgery functions created by controller. + * start, end: string; Date mark formatted in 'YYYYMMDD'. Specifies the + start/end point of collections of bars. + * sessionNum: integer; the number of threads that will be deploied. + Concretely, the list of all tickers will be sub-divided into chunks, + where chunkSize = len(allTickers)/sessionNum. + + """ + # initialize task list. + dName = 'names/equTicker.json' + if os.path.isfile(dName): + # if directory exists, read from it. + jsonFile = open(dName,'r') + allTickers = json.loads(jsonFile.read()) + jsonFile.close() + else: + data = self.get_equity_D1() + allTickers = list(data.body['ticker']) + + chunkSize = len(allTickers)/sessionNum + taskLists = [allTickers[k:k+chunkSize] for k in range( + 0, len(allTickers), chunkSize)] + k = 0 + for tasks in taskLists: + thrd = Thread(target = self.get_equity_D1_drudgery, + args = (k, db, start, end, tasks)) + thrd.start() + k += 1 + return 1 + + + #----------------------------------------------------------------------# + # to be deprecated + + def get_equity_D1_drudgery_(self, id, db, + start, end, tasks=[]): + """ + Drudgery function of getting equity_D1 bars. + This method loops over a list of tasks(tickers) and get D1 bar + for all these tickers. A new feature 'date' will be automatically + added into every json-like documents, and specifies the datetime. + datetime() formatted date mark. With the default setting of MongoDB + in this module, this feature should be the unique index for all + collections. + + By programatically assigning creating and assigning tasks to drudgery + functions, multi-threading download of data can be achieved. + + parameters + ---------- + * id: integer; the ID of Drudgery session. + * db: pymongo.db object; the database which collections of bars will + go into. + * start, end: string; Date mark formatted in 'YYYYMMDD'. Specifies the + start/end point of collections of bars. + * tasks: list of strings; the tickers that this drudgery function + loops over. + + """ + if len(tasks) == 0: + return 0 + # str to datetime inline functions. + todt = lambda str_dt: datetime.strptime(str_dt,'%Y-%m-%d') + update_dt = lambda d: d.update({'date':todt(d['tradeDate'])}) + # loop over all tickers in task list. + k, n = 1, len(tasks) + for ticker in tasks: + try: + data = self.get_equity_D1(start = start, + end = end, + ticker = ticker, + output = 'list') + assert len(data) >= 1 + map(update_dt, data) # add datetime feature to docs. + coll = db[ticker] + coll.insert_many(data) + print '[API|Session{}]: '.format(id) + \ + 'Finished {} in {}.'.format(k, n) + k += 1 + except ConnectionError: + # If choke connection, standby for 1sec an invoke again. + time.sleep(1) + self.get_equity_D1_drudgery( + id, db, start, end, tasks) + except AssertionError: + msg = '[API|Session{}]: '.format(id) + \ + 'Empty dataset in the response.' + print msg + pass + except Exception, e: + msg = '[API|Session{}]: '.format(id) + \ + 'Exception encountered when ' + \ + 'requesting data; ' + str(e) + print msg + pass + + def get_equity_D1_mongod_(self, db, start, end, sessionNum=30): + """ + Outer controller of get equity D1 method. + Generates a list of all tickers, creates threads and distribute + tasks to individual get_equity_D1_drudgery() functions. + + parameters + ---------- + * db: pymongo.db object; the database which collections of bars will + go into. Note that this database will be transferred to every + drudgery functions created by controller. + * start, end: string; Date mark formatted in 'YYYYMMDD'. Specifies the + start/end point of collections of bars. + * sessionNum: integer; the number of threads that will be deploied. + Concretely, the list of all tickers will be sub-divided into chunks, + where chunkSize = len(allTickers)/sessionNum. + + """ + # initialize task list. + dName = 'names/equTicker.json' + if os.path.isfile(dName): + # if directory exists, read from it. + jsonFile = open(dName,'r') + allTickers = json.loads(jsonFile.read()) + jsonFile.close() + else: + data = self.get_equity_D1() + allTickers = list(data.body['ticker']) + + chunkSize = len(allTickers)/sessionNum + taskLists = [allTickers[k:k+chunkSize] for k in range( + 0, len(allTickers), chunkSize)] + k = 0 + for tasks in taskLists: + thrd = Thread(target = self.get_equity_D1_drudgery, + args = (k, db, start, end, tasks)) + thrd.start() + k += 1 + return 1 + + #----------------------------------------------------------------------# + + def get_equity_M1_drudgery(self, id, db, + start, end, tasks=[]): + """ + Drudgery function of getting equity_D1 bars. + This method loops over a list of tasks(tickers) and get D1 bar + for all these tickers. A new feature 'dateTime', combined by Y-m-d + formatted date part and H:M time part, will be automatically added into + every json-like documents. It would be a datetime.datetime() timestamp + object. In this module, this feature should be the unique index for all + collections. + + By programatically assigning creating and assigning tasks to drudgery + functions, multi-threading download of data can be achieved. + + parameters + ---------- + * id: integer; the ID of Drudgery session. + * db: pymongo.db object; the database which collections of bars will + go into. + * start, end: string; Date mark formatted in 'YYYYMMDD'. Specifies the + start/end point of collections of bars. Note that to ensure the + success of every requests, the range amid start and end had better be + no more than one month. + * tasks: list of strings; the tickers that this drudgery function + loops over. + + """ + if len(tasks) == 0: + return 0 + + # str to datetime inline functions. + todt = lambda str_d, str_t: datetime.strptime( + str_d + ' ' + str_t,'%Y-%m-%d %H:%M') + update_dt = lambda d: d.update( + {'dateTime':todt(d['dataDate'], d['barTime'])}) + + k, n = 1, len(tasks) + for secID in tasks: + try: + data = self.get_equity_M1(start = start, + end = end, + secID = secID, + output = 'list') + map(update_dt, data) # add datetime feature to docs. + coll = db[secID] + coll.insert_many(data) + print '[API|Session{}]: '.format(id) + \ + 'Finished {} in {}.'.format(k, n) + k += 1 + except ConnectionError: + # If choke connection, standby for 1sec an invoke again. + time.sleep(1) + self.get_equity_D1_drudgery( + id, db, start, end, tasks) + except AssertionError: + msg = '[API|Session{}]: '.format(id) + \ + 'Empty dataset in the response.' + print msg + pass + except Exception, e: + msg = '[API|Session{}]: '.format(id) + \ + 'Exception encountered when ' + \ + 'requesting data; ' + str(e) + print msg + pass + + def get_equity_M1_interMonth(self, db, id, + startYr=datetime.now().year-2, + endYr=datetime.now().year, + tasks=[]): + """ + Mid-level wrapper of get equity M1 method. + Get 1-minute bar between specified start year and ending year for + more than one tickers in tasks list. + + parameters + ---------- + * db: pymongo.db object; the database which collections of bars will + go into. Note that this database will be transferred to every + drudgery functions created by controller. + * id: integer; the ID of wrapper session. + * startYr, endYr: integer; the start and ending year amid which the + 1-minute bar data is gotten one month by another employing + get_equity_M1_drudgery() function. + Default values are this year and two years before now. + the complete time range will be sub-divided into months. And threads + are deployed for each of these months. + + - example + ------- + Suppose .now() is Auguest 15th 2015. (20150815) + startYr, endYr = 2014, 2015. + then two list of strings will be generated: + ymdStringStart = ['20140102','20140202', ... '20150802'] + ymdStringEnd = ['20140101','20140201', ... '20150801'] + the sub-timeRanges passed to drudgeries will be: + (start, end): (20140102, 20140201), (20140202, 20140301), + ..., (20150702, 20150801). + So the actual time range is 20140102 - 20150801. + + * sessionNum: integer; the number of threads that will be deploied. + Concretely, the list of all tickers will be sub-divided into chunks, + where chunkSize = len(allTickers)/sessionNum. + + """ + # Construct yyyymmdd strings.(as ymdStrings list) + now = datetime.now() + years = [str(y) for y in range(startYr, endYr+1)] + monthDates = [(2-len(str(k)))*'0'+str(k)+'02' for k in range(1,13)] + ymdStringStart = [y+md for y in years for md in monthDates if ( + datetime.strptime(y+md,'%Y%m%d')<=now)] + monthDates = [(2-len(str(k)))*'0'+str(k)+'01' for k in range(1,13)] + ymdStringEnd = [y+md for y in years for md in monthDates if ( + datetime.strptime(y+md,'%Y%m%d')<=now)] + k = 0 + for t in range(len(ymdStringEnd)-1): + start = ymdStringStart[t] + end = ymdStringEnd[t+1] + subID = str(id) + '_' + str(k) + thrd = Thread(target = self.get_equity_M1_drudgery, + args = (subID, db, start, end, tasks)) + thrd.start() + k += 1 + + + def get_equity_M1_all(self, db, + startYr=datetime.now().year-2, + endYr=datetime.now().year, + splitNum=10): + """ + + + """ + """ + # initialize task list. + data = self.get_equity_D1() + allTickers = list(data.body['ticker']) + exchangeCDs = list(data.body['exchangeCD']) + allSecIds = [allTickers[k]+'.'+exchangeCDs[k] for k in range( + len(allTickers))] + chunkSize = len(allSecIds)/splitNum + taskLists = [allSecIds[k:k+chunkSize] for k in range( + 0, len(allSecIds), chunkSize)] + + # Construct yyyymmdd strings.(as ymdStrings list) + now = datetime.now() + years = [str(y) for y in range(startYr, endYr+1)] + monthDates = [(2-len(str(k)))*'0'+str(k)+'01' for k in range(1,13)] + ymdStrings = [y+md for y in years for md in monthDates if ( + datetime.strptime(y+md,'%Y%m%d')<=now)] + + print taskLists[0] + print ymdStrings + + k = 0 + for t in range(len(ymdStrings)-1): + start = ymdStrings[t] + end = ymdStrings[t+1] + thrd = Thread(target = self.get_equity_M1_drudgery, + args = (k, db, start, end, taskLists[0])) + thrd.start() + k += 1 + return 1 + """ + pass + \ No newline at end of file diff --git a/vn.datayes/config/db_EQU_D1.csv b/vn.datayes/config/db_EQU_D1.csv new file mode 100644 index 00000000..e71cbb37 --- /dev/null +++ b/vn.datayes/config/db_EQU_D1.csv @@ -0,0 +1,2801 @@ +,collections,counts +0,000001,625 +1,000002,625 +2,000004,625 +3,000005,625 +4,000006,625 +5,000007,625 +6,000008,625 +7,000009,625 +8,000010,625 +9,000011,625 +10,000012,625 +11,000014,625 +12,000016,625 +13,000017,625 +14,000018,625 +15,000019,625 +16,000020,625 +17,000021,625 +18,000022,625 +19,000023,625 +20,000024,625 +21,000025,625 +22,000026,625 +23,000027,625 +24,000028,625 +25,000029,625 +26,000030,625 +27,000031,625 +28,000032,625 +29,000033,625 +30,000034,625 +31,000035,625 +32,000036,625 +33,000037,625 +34,000038,600 +35,000039,625 +36,000040,625 +37,000042,625 +38,000043,625 +39,000045,625 +40,000046,625 +41,000048,625 +42,000049,625 +43,000050,625 +44,000055,625 +45,000056,625 +46,000058,625 +47,000059,625 +48,000060,625 +49,000061,625 +50,000062,625 +51,000063,625 +52,000065,625 +53,000066,625 +54,000068,625 +55,000069,625 +56,000070,625 +57,000078,625 +58,000088,625 +59,000089,625 +60,000090,625 +61,000096,625 +62,000099,625 +63,000100,625 +64,000150,625 +65,000151,625 +66,000153,625 +67,000155,625 +68,000156,625 +69,000157,625 +70,000158,625 +71,000159,625 +72,000166,127 +73,000301,625 +74,000333,455 +75,000338,625 +76,000400,625 +77,000401,625 +78,000402,625 +79,000403,600 +80,000404,625 +81,000407,625 +82,000408,625 +83,000409,625 +84,000410,625 +85,000411,625 +86,000413,625 +87,000415,625 +88,000416,625 +89,000417,625 +90,000418,625 +91,000419,625 +92,000420,625 +93,000421,625 +94,000422,625 +95,000423,625 +96,000425,625 +97,000426,625 +98,000428,625 +99,000429,625 +100,000430,625 +101,000488,625 +102,000498,625 +103,000501,625 +104,000502,625 +105,000503,625 +106,000504,625 +107,000505,625 +108,000506,625 +109,000507,625 +110,000509,625 +111,000510,625 +112,000511,625 +113,000513,625 +114,000514,625 +115,000516,625 +116,000517,625 +117,000518,625 +118,000519,625 +119,000520,625 +120,000521,625 +121,000523,625 +122,000524,625 +123,000525,625 +124,000526,625 +125,000528,625 +126,000529,625 +127,000530,625 +128,000531,625 +129,000532,625 +130,000533,625 +131,000534,625 +132,000536,625 +133,000537,625 +134,000538,625 +135,000539,625 +136,000540,625 +137,000541,625 +138,000543,625 +139,000544,625 +140,000545,625 +141,000546,625 +142,000547,625 +143,000548,625 +144,000550,625 +145,000551,625 +146,000552,625 +147,000553,625 +148,000554,625 +149,000555,625 +150,000557,625 +151,000558,625 +152,000559,625 +153,000560,625 +154,000561,625 +155,000563,625 +156,000564,625 +157,000565,625 +158,000566,625 +159,000567,625 +160,000568,625 +161,000570,625 +162,000571,625 +163,000572,625 +164,000573,625 +165,000576,625 +166,000581,625 +167,000582,625 +168,000584,625 +169,000585,625 +170,000586,625 +171,000587,625 +172,000589,625 +173,000590,625 +174,000591,625 +175,000592,625 +176,000593,625 +177,000594,607 +178,000595,625 +179,000596,625 +180,000597,625 +181,000598,625 +182,000599,625 +183,000600,625 +184,000601,625 +185,000603,625 +186,000605,625 +187,000606,625 +188,000607,625 +189,000608,625 +190,000609,625 +191,000610,625 +192,000611,625 +193,000612,625 +194,000613,625 +195,000615,625 +196,000616,625 +197,000617,625 +198,000619,625 +199,000620,625 +200,000622,600 +201,000623,625 +202,000625,625 +203,000626,625 +204,000627,625 +205,000628,625 +206,000629,625 +207,000630,625 +208,000631,625 +209,000632,625 +210,000633,625 +211,000635,625 +212,000636,625 +213,000637,625 +214,000638,625 +215,000639,625 +216,000650,625 +217,000651,625 +218,000652,625 +219,000655,625 +220,000656,625 +221,000657,625 +222,000659,625 +223,000661,625 +224,000662,625 +225,000663,625 +226,000665,625 +227,000666,625 +228,000667,625 +229,000668,625 +230,000669,625 +231,000670,600 +232,000671,625 +233,000672,552 +234,000673,625 +235,000676,625 +236,000677,625 +237,000678,625 +238,000679,625 +239,000680,625 +240,000681,625 +241,000682,625 +242,000683,625 +243,000685,625 +244,000686,625 +245,000687,625 +246,000688,552 +247,000690,625 +248,000691,625 +249,000692,625 +250,000693,381 +251,000695,625 +252,000697,625 +253,000698,625 +254,000700,625 +255,000701,625 +256,000702,625 +257,000703,625 +258,000705,625 +259,000707,625 +260,000708,625 +261,000709,625 +262,000710,625 +263,000711,625 +264,000712,625 +265,000713,625 +266,000715,625 +267,000716,625 +268,000717,625 +269,000718,625 +270,000719,625 +271,000720,625 +272,000721,625 +273,000722,625 +274,000723,625 +275,000725,625 +276,000726,625 +277,000727,625 +278,000728,625 +279,000729,625 +280,000731,625 +281,000732,625 +282,000733,625 +283,000735,625 +284,000736,625 +285,000737,625 +286,000738,625 +287,000739,625 +288,000748,625 +289,000750,625 +290,000751,609 +291,000752,625 +292,000753,625 +293,000755,625 +294,000756,625 +295,000757,600 +296,000758,625 +297,000759,625 +298,000760,625 +299,000761,625 +300,000762,625 +301,000766,625 +302,000767,625 +303,000768,625 +304,000776,625 +305,000777,625 +306,000778,625 +307,000779,625 +308,000780,625 +309,000782,625 +310,000783,625 +311,000785,625 +312,000786,625 +313,000788,625 +314,000789,625 +315,000790,625 +316,000791,625 +317,000792,625 +318,000793,625 +319,000795,625 +320,000796,625 +321,000797,625 +322,000798,625 +323,000799,625 +324,000800,625 +325,000801,625 +326,000802,625 +327,000803,625 +328,000806,625 +329,000807,625 +330,000809,625 +331,000810,625 +332,000811,625 +333,000812,625 +334,000813,625 +335,000815,625 +336,000816,625 +337,000818,625 +338,000819,625 +339,000820,625 +340,000821,625 +341,000822,625 +342,000823,625 +343,000825,625 +344,000826,625 +345,000828,625 +346,000829,625 +347,000830,625 +348,000831,625 +349,000833,625 +350,000835,625 +351,000836,625 +352,000837,625 +353,000838,625 +354,000839,625 +355,000848,625 +356,000850,625 +357,000851,625 +358,000852,625 +359,000856,625 +360,000858,625 +361,000859,625 +362,000860,625 +363,000861,625 +364,000862,625 +365,000863,625 +366,000868,625 +367,000869,625 +368,000875,625 +369,000876,625 +370,000877,625 +371,000878,625 +372,000880,625 +373,000881,625 +374,000882,625 +375,000883,625 +376,000885,625 +377,000886,625 +378,000887,625 +379,000888,625 +380,000889,625 +381,000890,625 +382,000892,625 +383,000893,625 +384,000895,625 +385,000897,625 +386,000898,625 +387,000899,625 +388,000900,625 +389,000901,625 +390,000902,625 +391,000903,625 +392,000905,625 +393,000906,625 +394,000908,625 +395,000909,625 +396,000910,625 +397,000911,625 +398,000912,625 +399,000913,625 +400,000915,625 +401,000916,625 +402,000917,625 +403,000918,625 +404,000919,625 +405,000920,625 +406,000921,625 +407,000922,625 +408,000923,625 +409,000925,625 +410,000926,625 +411,000927,625 +412,000928,625 +413,000929,625 +414,000930,625 +415,000931,625 +416,000932,625 +417,000933,625 +418,000935,625 +419,000936,625 +420,000937,625 +421,000938,625 +422,000939,625 +423,000948,625 +424,000949,625 +425,000950,625 +426,000951,625 +427,000952,625 +428,000953,625 +429,000955,625 +430,000957,625 +431,000958,625 +432,000959,625 +433,000960,625 +434,000961,625 +435,000962,625 +436,000963,625 +437,000965,625 +438,000966,625 +439,000967,625 +440,000968,625 +441,000969,625 +442,000970,625 +443,000971,625 +444,000972,625 +445,000973,625 +446,000975,625 +447,000976,625 +448,000977,625 +449,000978,625 +450,000979,625 +451,000980,625 +452,000981,625 +453,000982,625 +454,000983,625 +455,000985,625 +456,000987,625 +457,000988,625 +458,000989,625 +459,000990,625 +460,000993,625 +461,000995,625 +462,000996,625 +463,000997,625 +464,000998,625 +465,000999,625 +466,001696,625 +467,001896,625 +468,002001,625 +469,002002,625 +470,002003,625 +471,002004,625 +472,002005,625 +473,002006,625 +474,002007,625 +475,002008,625 +476,002009,625 +477,002010,625 +478,002011,625 +479,002012,625 +480,002013,625 +481,002014,625 +482,002015,625 +483,002016,625 +484,002017,625 +485,002018,625 +486,002019,625 +487,002020,625 +488,002021,625 +489,002022,625 +490,002023,625 +491,002024,625 +492,002025,625 +493,002026,625 +494,002027,625 +495,002028,625 +496,002029,625 +497,002030,625 +498,002031,625 +499,002032,625 +500,002033,625 +501,002034,625 +502,002035,625 +503,002036,625 +504,002037,625 +505,002038,625 +506,002039,625 +507,002040,625 +508,002041,625 +509,002042,625 +510,002043,625 +511,002044,625 +512,002045,625 +513,002046,625 +514,002047,625 +515,002048,625 +516,002049,625 +517,002050,625 +518,002051,625 +519,002052,625 +520,002053,625 +521,002054,625 +522,002055,625 +523,002056,625 +524,002057,625 +525,002058,625 +526,002059,625 +527,002060,625 +528,002061,625 +529,002062,625 +530,002063,625 +531,002064,625 +532,002065,625 +533,002066,625 +534,002067,625 +535,002068,625 +536,002069,625 +537,002070,625 +538,002071,625 +539,002072,625 +540,002073,625 +541,002074,625 +542,002075,625 +543,002076,625 +544,002077,625 +545,002078,625 +546,002079,625 +547,002080,625 +548,002081,625 +549,002082,625 +550,002083,625 +551,002084,625 +552,002085,625 +553,002086,625 +554,002087,625 +555,002088,625 +556,002089,625 +557,002090,625 +558,002091,625 +559,002092,625 +560,002093,625 +561,002094,625 +562,002095,625 +563,002096,625 +564,002097,625 +565,002098,625 +566,002099,625 +567,002100,625 +568,002101,625 +569,002102,625 +570,002103,625 +571,002104,625 +572,002105,625 +573,002106,625 +574,002107,625 +575,002108,625 +576,002109,625 +577,002110,625 +578,002111,625 +579,002112,625 +580,002113,625 +581,002114,625 +582,002115,625 +583,002116,625 +584,002117,625 +585,002118,625 +586,002119,625 +587,002120,625 +588,002121,625 +589,002122,625 +590,002123,625 +591,002124,625 +592,002125,625 +593,002126,625 +594,002127,625 +595,002128,625 +596,002129,625 +597,002130,625 +598,002131,625 +599,002132,625 +600,002133,625 +601,002134,625 +602,002135,625 +603,002136,625 +604,002137,625 +605,002138,625 +606,002139,625 +607,002140,625 +608,002141,625 +609,002142,625 +610,002143,625 +611,002144,625 +612,002145,625 +613,002146,625 +614,002147,625 +615,002148,625 +616,002149,625 +617,002150,625 +618,002151,625 +619,002152,625 +620,002153,625 +621,002154,625 +622,002155,625 +623,002156,625 +624,002157,625 +625,002158,625 +626,002159,625 +627,002160,625 +628,002161,625 +629,002162,625 +630,002163,625 +631,002164,625 +632,002165,625 +633,002166,625 +634,002167,625 +635,002168,625 +636,002169,625 +637,002170,625 +638,002171,625 +639,002172,625 +640,002173,625 +641,002174,625 +642,002175,625 +643,002176,625 +644,002177,625 +645,002178,625 +646,002179,625 +647,002180,625 +648,002181,625 +649,002182,625 +650,002183,625 +651,002184,625 +652,002185,625 +653,002186,625 +654,002187,625 +655,002188,625 +656,002189,625 +657,002190,625 +658,002191,625 +659,002192,625 +660,002193,625 +661,002194,625 +662,002195,625 +663,002196,625 +664,002197,625 +665,002198,625 +666,002199,625 +667,002200,625 +668,002201,625 +669,002202,625 +670,002203,625 +671,002204,625 +672,002205,625 +673,002206,625 +674,002207,625 +675,002208,625 +676,002209,625 +677,002210,625 +678,002211,625 +679,002212,625 +680,002213,625 +681,002214,625 +682,002215,625 +683,002216,625 +684,002217,625 +685,002218,625 +686,002219,625 +687,002220,625 +688,002221,625 +689,002222,625 +690,002223,625 +691,002224,625 +692,002225,625 +693,002226,625 +694,002227,625 +695,002228,625 +696,002229,625 +697,002230,625 +698,002231,625 +699,002232,625 +700,002233,625 +701,002234,625 +702,002235,625 +703,002236,625 +704,002237,625 +705,002238,625 +706,002239,625 +707,002240,625 +708,002241,625 +709,002242,625 +710,002243,625 +711,002244,625 +712,002245,625 +713,002246,625 +714,002247,625 +715,002248,625 +716,002249,625 +717,002250,625 +718,002251,625 +719,002252,625 +720,002253,625 +721,002254,625 +722,002255,625 +723,002256,625 +724,002258,625 +725,002259,625 +726,002260,625 +727,002261,625 +728,002262,625 +729,002263,625 +730,002264,625 +731,002265,625 +732,002266,625 +733,002267,625 +734,002268,625 +735,002269,625 +736,002270,625 +737,002271,625 +738,002272,625 +739,002273,625 +740,002274,625 +741,002275,625 +742,002276,625 +743,002277,625 +744,002278,625 +745,002279,625 +746,002280,625 +747,002281,625 +748,002282,625 +749,002283,625 +750,002284,625 +751,002285,625 +752,002286,625 +753,002287,625 +754,002288,625 +755,002289,625 +756,002290,625 +757,002291,625 +758,002292,625 +759,002293,625 +760,002294,625 +761,002295,625 +762,002296,625 +763,002297,625 +764,002298,625 +765,002299,625 +766,002300,625 +767,002301,625 +768,002302,625 +769,002303,625 +770,002304,625 +771,002305,625 +772,002306,625 +773,002307,625 +774,002308,625 +775,002309,625 +776,002310,625 +777,002311,625 +778,002312,625 +779,002313,625 +780,002314,625 +781,002315,625 +782,002316,625 +783,002317,625 +784,002318,625 +785,002319,625 +786,002320,625 +787,002321,625 +788,002322,0 +789,002323,625 +790,002324,625 +791,002325,625 +792,002326,625 +793,002327,625 +794,002328,625 +795,002329,625 +796,002330,625 +797,002331,625 +798,002332,625 +799,002333,625 +800,002334,625 +801,002335,625 +802,002336,625 +803,002337,625 +804,002338,625 +805,002339,625 +806,002340,625 +807,002341,625 +808,002342,625 +809,002343,625 +810,002344,625 +811,002345,625 +812,002346,625 +813,002347,625 +814,002348,625 +815,002349,625 +816,002350,625 +817,002351,625 +818,002352,625 +819,002353,625 +820,002354,625 +821,002355,625 +822,002356,625 +823,002357,625 +824,002358,625 +825,002359,625 +826,002360,625 +827,002361,625 +828,002362,625 +829,002363,625 +830,002364,625 +831,002365,625 +832,002366,625 +833,002367,625 +834,002368,625 +835,002369,625 +836,002370,625 +837,002371,625 +838,002372,625 +839,002373,625 +840,002374,625 +841,002375,625 +842,002376,625 +843,002377,625 +844,002378,625 +845,002379,625 +846,002380,625 +847,002381,625 +848,002382,625 +849,002383,625 +850,002384,625 +851,002385,625 +852,002386,625 +853,002387,625 +854,002388,625 +855,002389,625 +856,002390,625 +857,002391,625 +858,002392,625 +859,002393,625 +860,002394,625 +861,002395,625 +862,002396,625 +863,002397,625 +864,002398,625 +865,002399,625 +866,002400,625 +867,002401,625 +868,002402,625 +869,002403,625 +870,002404,625 +871,002405,625 +872,002406,625 +873,002407,625 +874,002408,625 +875,002409,625 +876,002410,625 +877,002411,625 +878,002412,625 +879,002413,625 +880,002414,625 +881,002415,625 +882,002416,625 +883,002417,625 +884,002418,625 +885,002419,625 +886,002420,625 +887,002421,625 +888,002422,625 +889,002423,625 +890,002424,625 +891,002425,625 +892,002426,625 +893,002427,625 +894,002428,625 +895,002429,625 +896,002430,625 +897,002431,625 +898,002432,625 +899,002433,625 +900,002434,625 +901,002435,625 +902,002436,625 +903,002437,625 +904,002438,625 +905,002439,625 +906,002440,625 +907,002441,625 +908,002442,625 +909,002443,625 +910,002444,625 +911,002445,625 +912,002446,625 +913,002447,625 +914,002448,625 +915,002449,625 +916,002450,625 +917,002451,625 +918,002452,625 +919,002453,625 +920,002454,625 +921,002455,625 +922,002456,625 +923,002457,625 +924,002458,625 +925,002459,625 +926,002460,625 +927,002461,625 +928,002462,625 +929,002463,625 +930,002464,625 +931,002465,625 +932,002466,625 +933,002467,625 +934,002468,625 +935,002469,625 +936,002470,625 +937,002471,625 +938,002472,625 +939,002473,625 +940,002474,625 +941,002475,625 +942,002476,625 +943,002477,625 +944,002478,625 +945,002479,625 +946,002480,625 +947,002481,625 +948,002482,625 +949,002483,625 +950,002484,625 +951,002485,625 +952,002486,625 +953,002487,625 +954,002488,625 +955,002489,625 +956,002490,625 +957,002491,625 +958,002492,625 +959,002493,625 +960,002494,625 +961,002495,625 +962,002496,625 +963,002497,625 +964,002498,625 +965,002499,625 +966,002500,625 +967,002501,625 +968,002502,625 +969,002503,625 +970,002504,625 +971,002505,625 +972,002506,625 +973,002507,625 +974,002508,625 +975,002509,625 +976,002510,625 +977,002511,625 +978,002512,625 +979,002513,625 +980,002514,625 +981,002515,625 +982,002516,625 +983,002517,625 +984,002518,625 +985,002519,625 +986,002520,625 +987,002521,625 +988,002522,625 +989,002523,625 +990,002524,625 +991,002526,625 +992,002527,625 +993,002528,625 +994,002529,625 +995,002530,625 +996,002531,625 +997,002532,625 +998,002533,625 +999,002534,625 +1000,002535,625 +1001,002536,625 +1002,002537,625 +1003,002538,625 +1004,002539,625 +1005,002540,625 +1006,002541,625 +1007,002542,625 +1008,002543,625 +1009,002544,625 +1010,002545,625 +1011,002546,625 +1012,002547,625 +1013,002548,625 +1014,002549,625 +1015,002550,625 +1016,002551,625 +1017,002552,625 +1018,002553,625 +1019,002554,625 +1020,002555,625 +1021,002556,625 +1022,002557,625 +1023,002558,625 +1024,002559,625 +1025,002560,625 +1026,002561,625 +1027,002562,625 +1028,002563,625 +1029,002564,625 +1030,002565,625 +1031,002566,625 +1032,002567,625 +1033,002568,625 +1034,002569,625 +1035,002570,625 +1036,002571,625 +1037,002572,625 +1038,002573,625 +1039,002574,625 +1040,002575,625 +1041,002576,625 +1042,002577,625 +1043,002578,625 +1044,002579,625 +1045,002580,625 +1046,002581,625 +1047,002582,625 +1048,002583,625 +1049,002584,625 +1050,002585,625 +1051,002586,625 +1052,002587,625 +1053,002588,625 +1054,002589,625 +1055,002590,625 +1056,002591,625 +1057,002592,625 +1058,002593,625 +1059,002594,625 +1060,002595,625 +1061,002596,625 +1062,002597,625 +1063,002598,625 +1064,002599,625 +1065,002600,625 +1066,002601,625 +1067,002602,625 +1068,002603,625 +1069,002604,625 +1070,002605,625 +1071,002606,625 +1072,002607,625 +1073,002608,625 +1074,002609,625 +1075,002610,625 +1076,002611,625 +1077,002612,625 +1078,002613,625 +1079,002614,625 +1080,002615,625 +1081,002616,625 +1082,002617,625 +1083,002618,625 +1084,002619,625 +1085,002620,625 +1086,002621,625 +1087,002622,625 +1088,002623,625 +1089,002624,625 +1090,002625,625 +1091,002626,625 +1092,002627,625 +1093,002628,625 +1094,002629,625 +1095,002630,625 +1096,002631,625 +1097,002632,625 +1098,002633,625 +1099,002634,625 +1100,002635,625 +1101,002636,625 +1102,002637,625 +1103,002638,625 +1104,002639,625 +1105,002640,625 +1106,002641,625 +1107,002642,625 +1108,002643,625 +1109,002644,625 +1110,002645,625 +1111,002646,625 +1112,002647,625 +1113,002648,625 +1114,002649,625 +1115,002650,625 +1116,002651,625 +1117,002652,625 +1118,002653,625 +1119,002654,625 +1120,002655,625 +1121,002656,625 +1122,002657,625 +1123,002658,625 +1124,002659,625 +1125,002660,625 +1126,002661,625 +1127,002662,625 +1128,002663,625 +1129,002664,625 +1130,002665,625 +1131,002666,625 +1132,002667,625 +1133,002668,625 +1134,002669,625 +1135,002670,625 +1136,002671,625 +1137,002672,625 +1138,002673,625 +1139,002674,625 +1140,002675,625 +1141,002676,625 +1142,002677,625 +1143,002678,625 +1144,002679,625 +1145,002680,625 +1146,002681,625 +1147,002682,625 +1148,002683,625 +1149,002684,625 +1150,002685,625 +1151,002686,625 +1152,002687,625 +1153,002688,625 +1154,002689,625 +1155,002690,625 +1156,002691,625 +1157,002692,625 +1158,002693,625 +1159,002694,625 +1160,002695,625 +1161,002696,625 +1162,002697,625 +1163,002698,625 +1164,002699,625 +1165,002700,625 +1166,002701,625 +1167,002702,625 +1168,002703,625 +1169,002705,374 +1170,002706,374 +1171,002707,372 +1172,002708,374 +1173,002709,372 +1174,002711,370 +1175,002712,372 +1176,002713,358 +1177,002714,369 +1178,002715,358 +1179,002716,369 +1180,002717,358 +1181,002718,369 +1182,002719,369 +1183,002721,370 +1184,002722,369 +1185,002723,368 +1186,002724,184 +1187,002725,368 +1188,002726,271 +1189,002727,267 +1190,002728,246 +1191,002729,216 +1192,002730,202 +1193,002731,184 +1194,002732,161 +1195,002733,163 +1196,002734,126 +1197,002735,163 +1198,002736,145 +1199,002737,144 +1200,002738,144 +1201,002739,129 +1202,002740,129 +1203,002741,112 +1204,002742,111 +1205,002743,111 +1206,002745,111 +1207,002746,112 +1208,002747,93 +1209,002748,94 +1210,002749,93 +1211,002750,91 +1212,002751,69 +1213,002752,71 +1214,200011,625 +1215,200012,625 +1216,200016,625 +1217,200017,625 +1218,200018,625 +1219,200019,625 +1220,200020,625 +1221,200022,625 +1222,200024,625 +1223,200025,625 +1224,200026,625 +1225,200028,625 +1226,200029,625 +1227,200030,625 +1228,200037,625 +1229,200045,625 +1230,200053,625 +1231,200054,625 +1232,200055,625 +1233,200056,625 +1234,200058,625 +1235,200152,625 +1236,200160,625 +1237,200168,625 +1238,200413,625 +1239,200418,625 +1240,200429,625 +1241,200468,625 +1242,200488,625 +1243,200505,625 +1244,200512,625 +1245,200521,625 +1246,200530,625 +1247,200539,625 +1248,200541,625 +1249,200550,625 +1250,200553,625 +1251,200570,625 +1252,200581,625 +1253,200596,625 +1254,200613,625 +1255,200625,625 +1256,200706,625 +1257,200725,625 +1258,200726,625 +1259,200761,625 +1260,200770,607 +1261,200771,625 +1262,200869,625 +1263,200986,625 +1264,200992,625 +1265,300001,625 +1266,300002,625 +1267,300003,625 +1268,300004,625 +1269,300005,625 +1270,300006,625 +1271,300007,625 +1272,300008,625 +1273,300009,625 +1274,300010,625 +1275,300011,625 +1276,300012,625 +1277,300013,625 +1278,300014,625 +1279,300015,625 +1280,300016,625 +1281,300017,625 +1282,300018,625 +1283,300019,625 +1284,300020,625 +1285,300021,625 +1286,300022,625 +1287,300023,625 +1288,300024,625 +1289,300025,625 +1290,300026,625 +1291,300027,625 +1292,300028,625 +1293,300029,625 +1294,300030,625 +1295,300031,625 +1296,300032,625 +1297,300033,625 +1298,300034,625 +1299,300035,625 +1300,300036,625 +1301,300037,625 +1302,300038,625 +1303,300039,625 +1304,300040,625 +1305,300041,625 +1306,300042,625 +1307,300043,625 +1308,300044,625 +1309,300045,625 +1310,300046,625 +1311,300047,625 +1312,300048,625 +1313,300049,625 +1314,300050,625 +1315,300051,625 +1316,300052,625 +1317,300053,625 +1318,300054,625 +1319,300055,625 +1320,300056,625 +1321,300057,625 +1322,300058,625 +1323,300059,625 +1324,300061,625 +1325,300062,625 +1326,300063,625 +1327,300064,625 +1328,300065,625 +1329,300066,625 +1330,300067,625 +1331,300068,625 +1332,300069,625 +1333,300070,625 +1334,300071,625 +1335,300072,625 +1336,300073,625 +1337,300074,625 +1338,300075,625 +1339,300076,625 +1340,300077,625 +1341,300078,625 +1342,300079,625 +1343,300080,625 +1344,300081,625 +1345,300082,625 +1346,300083,625 +1347,300084,625 +1348,300085,625 +1349,300086,625 +1350,300087,625 +1351,300088,625 +1352,300089,625 +1353,300090,625 +1354,300091,625 +1355,300092,625 +1356,300093,625 +1357,300094,625 +1358,300095,625 +1359,300096,625 +1360,300097,625 +1361,300098,625 +1362,300099,625 +1363,300100,625 +1364,300101,625 +1365,300102,625 +1366,300103,625 +1367,300104,625 +1368,300105,625 +1369,300106,625 +1370,300107,625 +1371,300108,625 +1372,300109,625 +1373,300110,625 +1374,300111,625 +1375,300112,625 +1376,300113,625 +1377,300114,625 +1378,300115,625 +1379,300116,625 +1380,300117,625 +1381,300118,625 +1382,300119,625 +1383,300120,625 +1384,300121,625 +1385,300122,625 +1386,300123,625 +1387,300124,625 +1388,300125,625 +1389,300126,625 +1390,300127,625 +1391,300128,625 +1392,300129,625 +1393,300130,625 +1394,300131,625 +1395,300132,625 +1396,300133,625 +1397,300134,625 +1398,300135,625 +1399,300136,625 +1400,300137,625 +1401,300138,625 +1402,300139,625 +1403,300140,625 +1404,300141,625 +1405,300142,625 +1406,300143,625 +1407,300144,625 +1408,300145,625 +1409,300146,625 +1410,300147,625 +1411,300148,625 +1412,300149,625 +1413,300150,625 +1414,300151,625 +1415,300152,625 +1416,300153,625 +1417,300154,625 +1418,300155,625 +1419,300156,625 +1420,300157,625 +1421,300158,625 +1422,300159,625 +1423,300160,625 +1424,300161,625 +1425,300162,625 +1426,300163,625 +1427,300164,625 +1428,300165,625 +1429,300166,625 +1430,300167,625 +1431,300168,625 +1432,300169,625 +1433,300170,625 +1434,300171,625 +1435,300172,625 +1436,300173,625 +1437,300174,625 +1438,300175,625 +1439,300176,625 +1440,300177,625 +1441,300178,625 +1442,300179,625 +1443,300180,625 +1444,300181,625 +1445,300182,625 +1446,300183,625 +1447,300184,625 +1448,300185,625 +1449,300186,625 +1450,300187,625 +1451,300188,625 +1452,300189,625 +1453,300190,625 +1454,300191,625 +1455,300192,625 +1456,300193,625 +1457,300194,625 +1458,300195,625 +1459,300196,625 +1460,300197,625 +1461,300198,625 +1462,300199,625 +1463,300200,625 +1464,300201,625 +1465,300202,625 +1466,300203,625 +1467,300204,625 +1468,300205,625 +1469,300206,625 +1470,300207,625 +1471,300208,625 +1472,300209,625 +1473,300210,625 +1474,300211,625 +1475,300212,625 +1476,300213,625 +1477,300214,625 +1478,300215,625 +1479,300216,625 +1480,300217,625 +1481,300218,625 +1482,300219,625 +1483,300220,625 +1484,300221,625 +1485,300222,625 +1486,300223,625 +1487,300224,625 +1488,300225,625 +1489,300226,625 +1490,300227,625 +1491,300228,625 +1492,300229,625 +1493,300230,625 +1494,300231,625 +1495,300232,625 +1496,300233,625 +1497,300234,625 +1498,300235,625 +1499,300236,625 +1500,300237,625 +1501,300238,625 +1502,300239,625 +1503,300240,625 +1504,300241,625 +1505,300242,625 +1506,300243,625 +1507,300244,625 +1508,300245,625 +1509,300246,625 +1510,300247,625 +1511,300248,625 +1512,300249,625 +1513,300250,625 +1514,300251,625 +1515,300252,625 +1516,300253,625 +1517,300254,625 +1518,300255,625 +1519,300256,625 +1520,300257,625 +1521,300258,625 +1522,300259,625 +1523,300260,625 +1524,300261,625 +1525,300262,625 +1526,300263,625 +1527,300264,625 +1528,300265,625 +1529,300266,625 +1530,300267,625 +1531,300268,625 +1532,300269,625 +1533,300270,625 +1534,300271,625 +1535,300272,625 +1536,300273,625 +1537,300274,625 +1538,300275,625 +1539,300276,625 +1540,300277,625 +1541,300278,625 +1542,300279,625 +1543,300280,625 +1544,300281,625 +1545,300282,625 +1546,300283,625 +1547,300284,625 +1548,300285,625 +1549,300286,625 +1550,300287,625 +1551,300288,625 +1552,300289,625 +1553,300290,625 +1554,300291,625 +1555,300292,625 +1556,300293,625 +1557,300294,625 +1558,300295,625 +1559,300296,625 +1560,300297,625 +1561,300298,625 +1562,300299,625 +1563,300300,625 +1564,300301,625 +1565,300302,625 +1566,300303,625 +1567,300304,625 +1568,300305,625 +1569,300306,625 +1570,300307,625 +1571,300308,625 +1572,300309,625 +1573,300310,625 +1574,300311,625 +1575,300312,625 +1576,300313,625 +1577,300314,625 +1578,300315,625 +1579,300316,625 +1580,300317,625 +1581,300318,625 +1582,300319,625 +1583,300320,625 +1584,300321,625 +1585,300322,625 +1586,300323,625 +1587,300324,625 +1588,300325,625 +1589,300326,625 +1590,300327,625 +1591,300328,625 +1592,300329,625 +1593,300330,625 +1594,300331,625 +1595,300332,625 +1596,300333,625 +1597,300334,625 +1598,300335,625 +1599,300336,625 +1600,300337,625 +1601,300338,625 +1602,300339,625 +1603,300340,625 +1604,300341,625 +1605,300342,625 +1606,300343,625 +1607,300344,625 +1608,300345,625 +1609,300346,625 +1610,300347,625 +1611,300348,625 +1612,300349,625 +1613,300350,625 +1614,300351,625 +1615,300352,625 +1616,300353,625 +1617,300354,625 +1618,300355,625 +1619,300356,625 +1620,300357,374 +1621,300358,374 +1622,300359,374 +1623,300360,374 +1624,300362,374 +1625,300363,368 +1626,300364,130 +1627,300365,372 +1628,300366,370 +1629,300367,368 +1630,300368,372 +1631,300369,368 +1632,300370,372 +1633,300371,372 +1634,300372,370 +1635,300373,372 +1636,300374,94 +1637,300375,370 +1638,300376,370 +1639,300377,370 +1640,300378,370 +1641,300379,369 +1642,300380,369 +1643,300381,369 +1644,300382,368 +1645,300383,368 +1646,300384,245 +1647,300385,271 +1648,300386,271 +1649,300387,267 +1650,300388,245 +1651,300389,245 +1652,300390,246 +1653,300391,245 +1654,300392,218 +1655,300393,216 +1656,300394,111 +1657,300395,218 +1658,300396,218 +1659,300397,218 +1660,300398,202 +1661,300399,202 +1662,300400,201 +1663,300401,202 +1664,300402,201 +1665,300403,187 +1666,300404,69 +1667,300405,187 +1668,300406,187 +1669,300407,163 +1670,300408,163 +1671,300409,163 +1672,300410,143 +1673,300411,143 +1674,300412,143 +1675,300413,130 +1676,300414,57 +1677,300415,128 +1678,300416,129 +1679,300417,128 +1680,300418,130 +1681,300419,129 +1682,300420,111 +1683,300421,111 +1684,300422,111 +1685,300423,111 +1686,300424,71 +1687,300425,112 +1688,300426,111 +1689,300427,111 +1690,300428,94 +1691,300429,91 +1692,300430,94 +1693,300431,91 +1694,300432,94 +1695,300433,95 +1696,300434,69 +1697,300435,89 +1698,300436,71 +1699,300437,70 +1700,300438,69 +1701,300439,71 +1702,300440,70 +1703,300441,70 +1704,300442,69 +1705,300443,71 +1706,300444,70 +1707,300445,69 +1708,300446,70 +1709,300447,71 +1710,300448,69 +1711,300449,71 +1712,600000,625 +1713,600004,625 +1714,600005,625 +1715,600006,625 +1716,600007,625 +1717,600008,625 +1718,600009,625 +1719,600010,625 +1720,600011,625 +1721,600012,625 +1722,600015,625 +1723,600016,625 +1724,600017,625 +1725,600018,625 +1726,600019,625 +1727,600020,625 +1728,600021,625 +1729,600022,625 +1730,600023,396 +1731,600026,625 +1732,600027,625 +1733,600028,625 +1734,600029,625 +1735,600030,625 +1736,600031,625 +1737,600033,625 +1738,600035,625 +1739,600036,625 +1740,600037,625 +1741,600038,625 +1742,600039,625 +1743,600048,625 +1744,600050,625 +1745,600051,625 +1746,600052,625 +1747,600053,625 +1748,600054,625 +1749,600055,625 +1750,600056,625 +1751,600057,625 +1752,600058,625 +1753,600059,625 +1754,600060,625 +1755,600061,625 +1756,600062,625 +1757,600063,625 +1758,600064,625 +1759,600066,625 +1760,600067,625 +1761,600068,625 +1762,600069,625 +1763,600070,625 +1764,600071,625 +1765,600072,625 +1766,600073,625 +1767,600074,625 +1768,600075,625 +1769,600076,625 +1770,600077,625 +1771,600078,625 +1772,600079,625 +1773,600080,625 +1774,600081,625 +1775,600082,625 +1776,600083,625 +1777,600084,625 +1778,600085,625 +1779,600086,625 +1780,600088,625 +1781,600089,625 +1782,600090,625 +1783,600091,625 +1784,600093,625 +1785,600094,625 +1786,600095,625 +1787,600096,625 +1788,600097,625 +1789,600098,625 +1790,600099,625 +1791,600100,625 +1792,600101,625 +1793,600103,625 +1794,600104,625 +1795,600105,625 +1796,600106,625 +1797,600107,625 +1798,600108,625 +1799,600109,625 +1800,600110,625 +1801,600111,625 +1802,600112,625 +1803,600113,625 +1804,600114,625 +1805,600115,625 +1806,600116,625 +1807,600117,625 +1808,600118,625 +1809,600119,625 +1810,600120,625 +1811,600121,625 +1812,600122,625 +1813,600123,625 +1814,600125,625 +1815,600126,625 +1816,600127,625 +1817,600128,625 +1818,600129,625 +1819,600130,625 +1820,600131,625 +1821,600132,625 +1822,600133,625 +1823,600135,625 +1824,600136,625 +1825,600137,625 +1826,600138,625 +1827,600139,625 +1828,600141,625 +1829,600143,625 +1830,600145,625 +1831,600146,625 +1832,600148,625 +1833,600149,625 +1834,600150,625 +1835,600151,625 +1836,600152,625 +1837,600153,625 +1838,600155,625 +1839,600156,625 +1840,600157,625 +1841,600158,625 +1842,600159,625 +1843,600160,625 +1844,600161,625 +1845,600162,625 +1846,600163,625 +1847,600165,625 +1848,600166,625 +1849,600167,625 +1850,600168,625 +1851,600169,625 +1852,600170,625 +1853,600171,625 +1854,600172,625 +1855,600173,625 +1856,600175,625 +1857,600176,625 +1858,600177,625 +1859,600178,625 +1860,600179,625 +1861,600180,625 +1862,600182,625 +1863,600183,625 +1864,600184,625 +1865,600185,625 +1866,600186,625 +1867,600187,625 +1868,600188,625 +1869,600189,625 +1870,600190,625 +1871,600191,625 +1872,600192,625 +1873,600193,625 +1874,600195,625 +1875,600196,625 +1876,600197,625 +1877,600198,625 +1878,600199,625 +1879,600200,625 +1880,600201,625 +1881,600202,625 +1882,600203,625 +1883,600206,625 +1884,600207,625 +1885,600208,625 +1886,600209,625 +1887,600210,625 +1888,600211,625 +1889,600212,625 +1890,600213,625 +1891,600215,625 +1892,600216,625 +1893,600217,625 +1894,600218,625 +1895,600219,625 +1896,600220,625 +1897,600221,625 +1898,600222,625 +1899,600223,625 +1900,600225,625 +1901,600226,625 +1902,600227,625 +1903,600228,625 +1904,600229,625 +1905,600230,625 +1906,600231,625 +1907,600232,625 +1908,600233,625 +1909,600234,625 +1910,600235,625 +1911,600236,625 +1912,600237,625 +1913,600238,625 +1914,600239,625 +1915,600240,625 +1916,600241,625 +1917,600242,625 +1918,600243,625 +1919,600246,625 +1920,600247,625 +1921,600248,625 +1922,600249,625 +1923,600250,625 +1924,600251,625 +1925,600252,625 +1926,600255,625 +1927,600256,625 +1928,600257,625 +1929,600258,625 +1930,600259,625 +1931,600260,625 +1932,600261,625 +1933,600262,625 +1934,600265,625 +1935,600266,625 +1936,600267,625 +1937,600268,625 +1938,600269,625 +1939,600270,625 +1940,600271,625 +1941,600272,625 +1942,600273,625 +1943,600275,625 +1944,600276,625 +1945,600277,625 +1946,600278,625 +1947,600279,625 +1948,600280,625 +1949,600281,625 +1950,600282,625 +1951,600283,625 +1952,600284,625 +1953,600285,625 +1954,600287,625 +1955,600288,625 +1956,600289,625 +1957,600290,625 +1958,600291,625 +1959,600292,625 +1960,600293,625 +1961,600295,625 +1962,600297,625 +1963,600298,625 +1964,600299,625 +1965,600300,625 +1966,600301,625 +1967,600302,625 +1968,600303,625 +1969,600305,625 +1970,600306,625 +1971,600307,625 +1972,600308,625 +1973,600309,625 +1974,600310,625 +1975,600311,625 +1976,600312,625 +1977,600313,625 +1978,600315,625 +1979,600316,625 +1980,600317,625 +1981,600318,625 +1982,600319,625 +1983,600320,625 +1984,600321,625 +1985,600322,625 +1986,600323,625 +1987,600325,625 +1988,600326,625 +1989,600327,625 +1990,600328,625 +1991,600329,625 +1992,600330,625 +1993,600331,625 +1994,600332,625 +1995,600333,625 +1996,600335,625 +1997,600336,625 +1998,600337,625 +1999,600338,625 +2000,600339,625 +2001,600340,625 +2002,600343,625 +2003,600345,625 +2004,600346,625 +2005,600348,625 +2006,600350,625 +2007,600351,625 +2008,600352,625 +2009,600353,625 +2010,600354,625 +2011,600355,625 +2012,600356,625 +2013,600358,625 +2014,600359,625 +2015,600360,625 +2016,600361,625 +2017,600362,625 +2018,600363,625 +2019,600365,625 +2020,600366,625 +2021,600367,625 +2022,600368,625 +2023,600369,625 +2024,600370,625 +2025,600371,625 +2026,600372,625 +2027,600373,625 +2028,600375,625 +2029,600376,625 +2030,600377,625 +2031,600378,625 +2032,600379,625 +2033,600380,625 +2034,600381,625 +2035,600382,625 +2036,600383,625 +2037,600385,609 +2038,600386,625 +2039,600387,625 +2040,600388,625 +2041,600389,625 +2042,600390,625 +2043,600391,625 +2044,600392,625 +2045,600393,625 +2046,600395,625 +2047,600396,625 +2048,600397,625 +2049,600398,625 +2050,600399,625 +2051,600400,625 +2052,600401,625 +2053,600403,625 +2054,600405,625 +2055,600406,625 +2056,600408,625 +2057,600409,625 +2058,600410,625 +2059,600415,625 +2060,600416,625 +2061,600418,625 +2062,600419,625 +2063,600420,625 +2064,600421,625 +2065,600422,625 +2066,600423,625 +2067,600425,625 +2068,600426,625 +2069,600428,625 +2070,600429,625 +2071,600432,625 +2072,600433,625 +2073,600435,625 +2074,600436,625 +2075,600438,625 +2076,600439,625 +2077,600444,625 +2078,600446,625 +2079,600448,625 +2080,600449,625 +2081,600452,625 +2082,600455,625 +2083,600456,625 +2084,600458,625 +2085,600459,625 +2086,600460,625 +2087,600461,625 +2088,600462,625 +2089,600463,625 +2090,600466,625 +2091,600467,625 +2092,600468,625 +2093,600469,625 +2094,600470,625 +2095,600475,625 +2096,600476,625 +2097,600477,625 +2098,600478,625 +2099,600479,625 +2100,600480,625 +2101,600481,625 +2102,600482,625 +2103,600483,625 +2104,600485,625 +2105,600486,625 +2106,600487,625 +2107,600488,625 +2108,600489,625 +2109,600490,625 +2110,600491,625 +2111,600493,625 +2112,600495,625 +2113,600496,625 +2114,600497,625 +2115,600498,625 +2116,600499,625 +2117,600500,625 +2118,600501,625 +2119,600502,625 +2120,600503,625 +2121,600505,625 +2122,600506,625 +2123,600507,625 +2124,600508,625 +2125,600509,625 +2126,600510,625 +2127,600511,625 +2128,600512,625 +2129,600513,625 +2130,600515,625 +2131,600516,625 +2132,600517,625 +2133,600518,625 +2134,600519,625 +2135,600520,625 +2136,600521,625 +2137,600522,625 +2138,600523,625 +2139,600525,625 +2140,600526,625 +2141,600527,625 +2142,600528,625 +2143,600529,625 +2144,600530,625 +2145,600531,625 +2146,600532,625 +2147,600533,625 +2148,600535,625 +2149,600536,625 +2150,600537,625 +2151,600538,625 +2152,600539,625 +2153,600540,625 +2154,600543,625 +2155,600545,625 +2156,600546,625 +2157,600547,625 +2158,600548,625 +2159,600549,625 +2160,600550,625 +2161,600551,625 +2162,600552,625 +2163,600555,625 +2164,600556,625 +2165,600557,625 +2166,600558,625 +2167,600559,625 +2168,600560,625 +2169,600561,625 +2170,600562,625 +2171,600563,625 +2172,600565,625 +2173,600566,625 +2174,600567,625 +2175,600568,625 +2176,600569,625 +2177,600570,625 +2178,600571,625 +2179,600572,625 +2180,600573,625 +2181,600575,625 +2182,600576,625 +2183,600577,625 +2184,600578,625 +2185,600579,625 +2186,600580,625 +2187,600581,625 +2188,600582,625 +2189,600583,625 +2190,600584,625 +2191,600585,625 +2192,600586,625 +2193,600587,625 +2194,600588,625 +2195,600589,625 +2196,600590,625 +2197,600592,625 +2198,600593,625 +2199,600594,625 +2200,600595,625 +2201,600596,625 +2202,600597,625 +2203,600598,625 +2204,600599,625 +2205,600600,625 +2206,600601,625 +2207,600602,625 +2208,600603,625 +2209,600604,625 +2210,600605,625 +2211,600606,625 +2212,600608,625 +2213,600609,625 +2214,600610,625 +2215,600611,625 +2216,600612,625 +2217,600613,625 +2218,600614,625 +2219,600615,625 +2220,600616,625 +2221,600617,625 +2222,600618,625 +2223,600619,625 +2224,600620,625 +2225,600621,625 +2226,600622,625 +2227,600623,625 +2228,600624,625 +2229,600626,625 +2230,600628,625 +2231,600629,625 +2232,600630,625 +2233,600633,625 +2234,600634,625 +2235,600635,625 +2236,600636,625 +2237,600637,625 +2238,600638,625 +2239,600639,625 +2240,600640,625 +2241,600641,625 +2242,600642,625 +2243,600643,625 +2244,600644,625 +2245,600645,625 +2246,600647,625 +2247,600648,625 +2248,600649,625 +2249,600650,625 +2250,600651,625 +2251,600652,625 +2252,600653,625 +2253,600654,625 +2254,600655,625 +2255,600656,625 +2256,600657,625 +2257,600658,625 +2258,600660,625 +2259,600661,625 +2260,600662,625 +2261,600663,625 +2262,600664,625 +2263,600665,625 +2264,600666,625 +2265,600667,625 +2266,600668,625 +2267,600671,625 +2268,600673,625 +2269,600674,625 +2270,600675,625 +2271,600676,625 +2272,600677,625 +2273,600678,625 +2274,600679,625 +2275,600680,0 +2276,600681,625 +2277,600682,625 +2278,600683,625 +2279,600684,625 +2280,600685,625 +2281,600686,625 +2282,600687,625 +2283,600688,625 +2284,600689,625 +2285,600690,625 +2286,600691,625 +2287,600692,625 +2288,600693,625 +2289,600694,625 +2290,600695,625 +2291,600696,625 +2292,600697,625 +2293,600698,625 +2294,600699,625 +2295,600701,625 +2296,600702,625 +2297,600703,625 +2298,600704,625 +2299,600705,625 +2300,600706,625 +2301,600707,625 +2302,600708,625 +2303,600710,625 +2304,600711,625 +2305,600712,625 +2306,600713,625 +2307,600714,625 +2308,600715,625 +2309,600716,625 +2310,600717,625 +2311,600718,625 +2312,600719,625 +2313,600720,625 +2314,600721,625 +2315,600722,625 +2316,600723,625 +2317,600724,625 +2318,600725,625 +2319,600726,625 +2320,600727,625 +2321,600728,625 +2322,600729,625 +2323,600730,625 +2324,600731,625 +2325,600732,625 +2326,600733,625 +2327,600734,625 +2328,600735,625 +2329,600736,625 +2330,600737,625 +2331,600738,625 +2332,600739,625 +2333,600740,625 +2334,600741,625 +2335,600742,625 +2336,600743,625 +2337,600744,625 +2338,600745,625 +2339,600746,625 +2340,600747,625 +2341,600748,625 +2342,600749,625 +2343,600750,625 +2344,600751,625 +2345,600753,625 +2346,600754,625 +2347,600755,625 +2348,600756,625 +2349,600757,625 +2350,600758,625 +2351,600759,625 +2352,600760,625 +2353,600761,625 +2354,600763,625 +2355,600764,625 +2356,600765,625 +2357,600766,625 +2358,600767,625 +2359,600768,625 +2360,600769,625 +2361,600770,625 +2362,600771,625 +2363,600773,625 +2364,600774,625 +2365,600775,625 +2366,600776,625 +2367,600777,625 +2368,600778,625 +2369,600779,625 +2370,600780,625 +2371,600781,625 +2372,600782,625 +2373,600783,625 +2374,600784,625 +2375,600785,625 +2376,600787,625 +2377,600789,625 +2378,600790,625 +2379,600791,625 +2380,600792,625 +2381,600793,625 +2382,600794,625 +2383,600795,625 +2384,600796,625 +2385,600797,625 +2386,600798,625 +2387,600800,625 +2388,600801,625 +2389,600802,625 +2390,600803,625 +2391,600804,625 +2392,600805,625 +2393,600806,625 +2394,600807,625 +2395,600808,625 +2396,600809,625 +2397,600810,625 +2398,600811,625 +2399,600812,625 +2400,600814,625 +2401,600815,625 +2402,600816,625 +2403,600817,625 +2404,600818,625 +2405,600819,625 +2406,600820,625 +2407,600821,625 +2408,600822,625 +2409,600823,625 +2410,600824,625 +2411,600825,625 +2412,600826,625 +2413,600827,625 +2414,600828,625 +2415,600829,625 +2416,600830,625 +2417,600831,625 +2418,600832,574 +2419,600833,625 +2420,600834,625 +2421,600835,625 +2422,600836,625 +2423,600837,625 +2424,600838,625 +2425,600839,625 +2426,600841,625 +2427,600843,625 +2428,600844,625 +2429,600845,625 +2430,600846,625 +2431,600847,625 +2432,600848,625 +2433,600850,625 +2434,600851,625 +2435,600853,625 +2436,600854,625 +2437,600855,625 +2438,600856,625 +2439,600857,625 +2440,600858,625 +2441,600859,625 +2442,600860,625 +2443,600861,625 +2444,600862,625 +2445,600863,625 +2446,600864,625 +2447,600865,625 +2448,600866,625 +2449,600867,625 +2450,600868,625 +2451,600869,625 +2452,600870,625 +2453,600871,625 +2454,600872,625 +2455,600873,625 +2456,600874,625 +2457,600875,625 +2458,600876,625 +2459,600877,625 +2460,600879,625 +2461,600880,625 +2462,600881,625 +2463,600882,625 +2464,600883,625 +2465,600884,625 +2466,600885,625 +2467,600886,625 +2468,600887,625 +2469,600888,625 +2470,600889,625 +2471,600890,625 +2472,600891,625 +2473,600892,625 +2474,600893,625 +2475,600894,625 +2476,600895,625 +2477,600896,625 +2478,600897,625 +2479,600898,625 +2480,600900,625 +2481,600917,204 +2482,600958,92 +2483,600959,67 +2484,600960,625 +2485,600961,625 +2486,600962,625 +2487,600963,625 +2488,600965,625 +2489,600966,625 +2490,600967,625 +2491,600969,625 +2492,600970,625 +2493,600971,625 +2494,600973,625 +2495,600975,625 +2496,600976,625 +2497,600978,625 +2498,600979,625 +2499,600980,625 +2500,600981,625 +2501,600982,625 +2502,600983,625 +2503,600984,625 +2504,600985,625 +2505,600986,625 +2506,600987,625 +2507,600988,625 +2508,600990,625 +2509,600992,625 +2510,600993,625 +2511,600995,625 +2512,600997,625 +2513,600998,625 +2514,600999,625 +2515,601000,625 +2516,601001,625 +2517,601002,625 +2518,601003,625 +2519,601005,625 +2520,601006,625 +2521,601007,625 +2522,601008,625 +2523,601009,625 +2524,601010,625 +2525,601011,625 +2526,601012,625 +2527,601015,183 +2528,601016,205 +2529,601018,625 +2530,601021,130 +2531,601028,625 +2532,601038,625 +2533,601058,625 +2534,601069,129 +2535,601088,625 +2536,601098,625 +2537,601099,625 +2538,601100,625 +2539,601101,625 +2540,601106,625 +2541,601107,625 +2542,601111,625 +2543,601113,625 +2544,601116,625 +2545,601117,625 +2546,601118,625 +2547,601126,625 +2548,601137,625 +2549,601139,625 +2550,601158,625 +2551,601166,625 +2552,601168,625 +2553,601169,625 +2554,601177,625 +2555,601179,625 +2556,601186,625 +2557,601188,625 +2558,601198,109 +2559,601199,625 +2560,601208,625 +2561,601216,625 +2562,601218,625 +2563,601222,625 +2564,601225,369 +2565,601226,157 +2566,601231,625 +2567,601233,625 +2568,601238,625 +2569,601258,625 +2570,601268,574 +2571,601288,625 +2572,601299,574 +2573,601311,625 +2574,601313,625 +2575,601318,625 +2576,601328,625 +2577,601333,625 +2578,601336,625 +2579,601339,625 +2580,601369,625 +2581,601377,625 +2582,601388,625 +2583,601390,625 +2584,601398,625 +2585,601515,625 +2586,601518,625 +2587,601519,625 +2588,601555,625 +2589,601558,625 +2590,601566,625 +2591,601567,625 +2592,601579,229 +2593,601588,625 +2594,601599,625 +2595,601600,625 +2596,601601,625 +2597,601607,625 +2598,601608,625 +2599,601616,625 +2600,601618,625 +2601,601628,625 +2602,601633,625 +2603,601636,625 +2604,601666,625 +2605,601668,625 +2606,601669,625 +2607,601677,625 +2608,601678,625 +2609,601688,625 +2610,601689,94 +2611,601699,625 +2612,601700,625 +2613,601717,625 +2614,601718,625 +2615,601727,625 +2616,601766,625 +2617,601777,625 +2618,601788,625 +2619,601789,625 +2620,601798,625 +2621,601799,625 +2622,601800,625 +2623,601801,625 +2624,601808,625 +2625,601818,625 +2626,601857,625 +2627,601866,625 +2628,601872,625 +2629,601877,625 +2630,601880,625 +2631,601886,625 +2632,601888,625 +2633,601890,625 +2634,601898,625 +2635,601899,625 +2636,601901,625 +2637,601908,625 +2638,601918,625 +2639,601919,625 +2640,601928,625 +2641,601929,625 +2642,601933,625 +2643,601939,625 +2644,601958,625 +2645,601965,625 +2646,601969,159 +2647,601988,625 +2648,601989,625 +2649,601991,625 +2650,601992,625 +2651,601996,625 +2652,601998,625 +2653,601999,625 +2654,603000,625 +2655,603001,625 +2656,603002,625 +2657,603003,625 +2658,603005,365 +2659,603006,269 +2660,603008,625 +2661,603009,255 +2662,603010,201 +2663,603011,181 +2664,603012,93 +2665,603015,106 +2666,603017,143 +2667,603018,200 +2668,603019,182 +2669,603020,90 +2670,603021,70 +2671,603025,71 +2672,603030,93 +2673,603077,625 +2674,603088,179 +2675,603099,230 +2676,603100,243 +2677,603111,245 +2678,603118,110 +2679,603123,625 +2680,603126,246 +2681,603128,625 +2682,603158,93 +2683,603166,167 +2684,603167,625 +2685,603168,267 +2686,603169,202 +2687,603188,219 +2688,603199,89 +2689,603222,111 +2690,603268,94 +2691,603288,364 +2692,603306,206 +2693,603308,373 +2694,603309,107 +2695,603315,69 +2696,603318,69 +2697,603328,268 +2698,603333,625 +2699,603338,90 +2700,603355,57 +2701,603366,625 +2702,603368,162 +2703,603369,266 +2704,603399,625 +2705,603456,201 +2706,603518,163 +2707,603519,94 +2708,603555,371 +2709,603558,126 +2710,603567,69 +2711,603588,145 +2712,603599,57 +2713,603600,128 +2714,603601,129 +2715,603606,198 +2716,603609,240 +2717,603611,125 +2718,603618,111 +2719,603636,144 +2720,603678,127 +2721,603686,127 +2722,603688,186 +2723,603698,125 +2724,603699,376 +2725,603703,70 +2726,603729,91 +2727,603766,625 +2728,603788,131 +2729,603789,68 +2730,603799,124 +2731,603806,220 +2732,603808,71 +2733,603818,71 +2734,603828,109 +2735,603869,89 +2736,603883,70 +2737,603889,143 +2738,603898,111 +2739,603899,126 +2740,603939,111 +2741,603969,108 +2742,603988,184 +2743,603993,625 +2744,603997,107 +2745,603998,161 +2746,900901,625 +2747,900902,625 +2748,900903,625 +2749,900904,625 +2750,900905,625 +2751,900906,625 +2752,900907,625 +2753,900908,625 +2754,900909,625 +2755,900910,625 +2756,900911,625 +2757,900912,625 +2758,900913,625 +2759,900914,625 +2760,900915,625 +2761,900916,625 +2762,900917,625 +2763,900918,625 +2764,900919,625 +2765,900920,625 +2766,900921,625 +2767,900922,625 +2768,900923,625 +2769,900924,625 +2770,900925,625 +2771,900926,625 +2772,900927,625 +2773,900928,625 +2774,900929,625 +2775,900930,625 +2776,900932,625 +2777,900933,625 +2778,900934,625 +2779,900935,625 +2780,900936,625 +2781,900937,625 +2782,900938,625 +2783,900939,625 +2784,900940,625 +2785,900941,625 +2786,900942,625 +2787,900943,625 +2788,900945,625 +2789,900946,625 +2790,900947,625 +2791,900948,625 +2792,900950,625 +2793,900951,625 +2794,900952,625 +2795,900953,625 +2796,900955,625 +2797,900956,625 +2798,900957,625 +2799,system.indexes,5598 diff --git a/vn.datayes/download.sh b/vn.datayes/download.sh new file mode 100755 index 00000000..16c8942c --- /dev/null +++ b/vn.datayes/download.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +echo [API]: Prepare to construct DATAYES_FUTURE_D1, {20150101, 20150801}... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.download_future_D1('20150101','20150801') +EOF +echo [MONGOD]: DATAYES_FUTURE_D1 constructed. + +echo [API]: Prepare to construct DATAYES_OPTION_D1, {20150101, 20150801}... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.download_option_D1('20150101','20150801') +EOF +echo [MONGOD]: DATAYES_OPTION_D1 constructed. + +echo [API]: Prepare to construct DATAYES_INDEX_D1, {20150101, 20150801}... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.download_index_D1('20150101','20150801') +EOF +echo [MONGOD]: DATAYES_INDEX_D1 constructed. + +echo [API]: Prepare to construct DATAYES_FUND_D1, {20150101, 20150801}... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.download_fund_D1('20150101','20150801') +EOF +echo [MONGOD]: DATAYES_FUND_D1 constructed. + +echo [API]: Prepare to construct DATAYES_EQUITY_D1, {20130101, 20150801}... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.download_equity_D1('20130101','20150801') +EOF +echo [MONGOD]: DATAYES_EQUITY_D1 constructed. \ No newline at end of file diff --git a/vn.datayes/errors.py b/vn.datayes/errors.py new file mode 100644 index 00000000..5471cb6f --- /dev/null +++ b/vn.datayes/errors.py @@ -0,0 +1,33 @@ + +class VNPAST_ConfigError(Exception): + """ + Config file error, raised when config.json or python object + is broken or invalid. + + """ + pass + +class VNPAST_RequestError(Exception): + """ + HTTP Request Error, raised when response is not properly gotten: + * GET response.status code != 200. + * POST response.status code != 201. + * Connection timed out. + * ... + + """ + pass + +class VNPAST_DatabaseError(Exception): + """ + + + """ + pass + +class VNPAST_DataConstructorError(Exception): + """ + + + """ + pass \ No newline at end of file diff --git a/vn.datayes/fun/fetch.R b/vn.datayes/fun/fetch.R new file mode 100644 index 00000000..f0e1061f --- /dev/null +++ b/vn.datayes/fun/fetch.R @@ -0,0 +1,58 @@ +ensure_pkgs = function(){ + if (!'data.table' %in% installed.packages()){ + install.packages('data.table') + } + if (!'rmongodb' %in% installed.packages()){ + install.packages('rmongodb') + } + require(data.table) + require(rmongodb) + return(1) +} + +get_connection = function(){ + client = mongo.create() + return(client) +} + +get_dbs = function(){ + client = mongo.create() + if(mongo.is.connected(client) == TRUE) { + dbs = mongo.get.databases(client) + } + return(dbs) +} + +get_colls = function(db){ + client = mongo.create() + if(mongo.is.connected(client) == TRUE) { + colls = mongo.get.database.collections(client, db) + } + return(colls) +} + +view_doc = function(coll, one=1){ + client = mongo.create() + if(mongo.is.connected(client) == TRUE) { + if(one==1){ + doc = mongo.find.one(client, coll) + } + else{ + doc = mongo.find.all(client, coll) + } + } + return(doc) +} + +fetch = function(coll, start, end){ + client = mongo.create() + if(mongo.is.connected(client) == TRUE) { + docs = mongo.find.all(client, coll, + query = list( + 'date'=list('lte'=end), + 'date'=list('gte'=start) + )) + } + return(docs) +} + diff --git a/vn.datayes/names/equTicker.json b/vn.datayes/names/equTicker.json new file mode 100644 index 00000000..f0cf1146 --- /dev/null +++ b/vn.datayes/names/equTicker.json @@ -0,0 +1 @@ +["000001", "000002", "000004", "000005", "000006", "000007", "000008", "000009", "000010", "000011", "000012", "000014", "000016", "000017", "000018", "000019", "000020", "000021", "000022", "000023", "000024", "000025", "000026", "000027", "000028", "000029", "000030", "000031", "000032", "000033", "000034", "000035", "000036", "000037", "000038", "000039", "000040", "000042", "000043", "000045", "000046", "000048", "000049", "000050", "000055", "000056", "000058", "000059", "000060", "000061", "000062", "000063", "000065", "000066", "000068", "000069", "000070", "000078", "000088", "000089", "000090", "000096", "000099", "000100", "000150", "000151", "000153", "000155", "000156", "000157", "000158", "000159", "000166", "000301", "000333", "000338", "000400", "000401", "000402", "000403", "000404", "000407", "000408", "000409", "000410", "000411", "000413", "000415", "000416", "000417", "000418", "000419", "000420", "000421", "000422", "000423", "000425", "000426", "000428", "000429", "000430", "000488", "000498", "000501", "000502", "000503", "000504", "000505", "000506", "000507", "000509", "000510", "000511", "000513", "000514", "000516", "000517", "000518", "000519", "000520", "000521", "000523", "000524", "000525", "000526", "000528", "000529", "000530", "000531", "000532", "000533", "000534", "000536", "000537", "000538", "000539", "000540", "000541", "000543", "000544", "000545", "000546", "000547", "000548", "000550", "000551", "000552", "000553", "000554", "000555", "000557", "000558", "000559", "000560", "000561", "000563", "000564", "000565", "000566", "000567", "000568", "000570", "000571", "000572", "000573", "000576", "000581", "000582", "000584", "000585", "000586", "000587", "000589", "000590", "000591", "000592", "000593", "000594", "000595", "000596", "000597", "000598", "000599", "000600", "000601", "000603", "000605", "000606", "000607", "000608", "000609", "000610", "000611", "000612", "000613", "000615", "000616", "000617", "000619", "000620", "000622", "000623", "000625", "000626", "000627", "000628", "000629", "000630", "000631", "000632", "000633", "000635", "000636", "000637", "000638", "000639", "000650", "000651", "000652", "000655", "000656", "000657", "000659", "000661", "000662", "000663", "000665", "000666", "000667", "000668", "000669", "000670", "000671", "000672", "000673", "000676", "000677", "000678", "000679", "000680", "000681", "000682", "000683", "000685", "000686", "000687", "000688", "000690", "000691", "000692", "000693", "000695", "000697", "000698", "000700", "000701", "000702", "000703", "000705", "000707", "000708", "000709", "000710", "000711", "000712", "000713", "000715", "000716", "000717", "000718", "000719", "000720", "000721", "000722", "000723", "000725", "000726", "000727", "000728", "000729", "000731", "000732", "000733", "000735", "000736", "000737", "000738", "000739", "000748", "000750", "000751", "000752", "000753", "000755", "000756", "000757", "000758", "000759", "000760", "000761", "000762", "000766", "000767", "000768", "000776", "000777", "000778", "000779", "000780", "000782", "000783", "000785", "000786", "000788", "000789", "000790", "000791", "000792", "000793", "000795", "000796", "000797", "000798", "000799", "000800", "000801", "000802", "000803", "000806", "000807", "000809", "000810", "000811", "000812", "000813", "000815", "000816", "000818", "000819", "000820", "000821", "000822", "000823", "000825", "000826", "000828", "000829", "000830", "000831", "000833", "000835", "000836", "000837", "000838", "000839", "000848", "000850", "000851", "000852", "000856", "000858", "000859", "000860", "000861", "000862", "000863", "000868", "000869", "000875", "000876", "000877", "000878", "000880", "000881", "000882", "000883", "000885", "000886", "000887", "000888", "000889", "000890", "000892", "000893", "000895", "000897", "000898", "000899", "000900", "000901", "000902", "000903", "000905", "000906", "000908", "000909", "000910", "000911", "000912", "000913", "000915", "000916", "000917", "000918", "000919", "000920", "000921", "000922", "000923", "000925", "000926", "000927", "000928", "000929", "000930", "000931", "000932", "000933", "000935", "000936", "000937", "000938", "000939", "000948", "000949", "000950", "000951", "000952", "000953", "000955", "000957", "000958", "000959", "000960", "000961", "000962", "000963", "000965", "000966", "000967", "000968", "000969", "000970", "000971", "000972", "000973", "000975", "000976", "000977", "000978", "000979", "000980", "000981", "000982", "000983", "000985", "000987", "000988", "000989", "000990", "000993", "000995", "000996", "000997", "000998", "000999", "001696", "001896", "002001", "002002", "002003", "002004", "002005", "002006", "002007", "002008", "002009", "002010", "002011", "002012", "002013", "002014", "002015", "002016", "002017", "002018", "002019", "002020", "002021", "002022", "002023", "002024", "002025", "002026", "002027", "002028", "002029", "002030", "002031", "002032", "002033", "002034", "002035", "002036", "002037", "002038", "002039", "002040", "002041", "002042", "002043", "002044", "002045", "002046", "002047", "002048", "002049", "002050", "002051", "002052", "002053", "002054", "002055", "002056", "002057", "002058", "002059", "002060", "002061", "002062", "002063", "002064", "002065", "002066", "002067", "002068", "002069", "002070", "002071", "002072", "002073", "002074", "002075", "002076", "002077", "002078", "002079", "002080", "002081", "002082", "002083", "002084", "002085", "002086", "002087", "002088", "002089", "002090", "002091", "002092", "002093", "002094", "002095", "002096", "002097", "002098", "002099", "002100", "002101", "002102", "002103", "002104", "002105", "002106", "002107", "002108", "002109", "002110", "002111", "002112", "002113", "002114", "002115", "002116", "002117", "002118", "002119", "002120", "002121", "002122", "002123", "002124", "002125", "002126", "002127", "002128", "002129", "002130", "002131", "002132", "002133", "002134", "002135", "002136", "002137", "002138", "002139", "002140", "002141", "002142", "002143", "002144", "002145", "002146", "002147", "002148", "002149", "002150", "002151", "002152", "002153", "002154", "002155", "002156", "002157", "002158", "002159", "002160", "002161", "002162", "002163", "002164", "002165", "002166", "002167", "002168", "002169", "002170", "002171", "002172", "002173", "002174", "002175", "002176", "002177", "002178", "002179", "002180", "002181", "002182", "002183", "002184", "002185", "002186", "002187", "002188", "002189", "002190", "002191", "002192", "002193", "002194", "002195", "002196", "002197", "002198", "002199", "002200", "002201", "002202", "002203", "002204", "002205", "002206", "002207", "002208", "002209", "002210", "002211", "002212", "002213", "002214", "002215", "002216", "002217", "002218", "002219", "002220", "002221", "002222", "002223", "002224", "002225", "002226", "002227", "002228", "002229", "002230", "002231", "002232", "002233", "002234", "002235", "002236", "002237", "002238", "002239", "002240", "002241", "002242", "002243", "002244", "002245", "002246", "002247", "002248", "002249", "002250", "002251", "002252", "002253", "002254", "002255", "002256", "002258", "002259", "002260", "002261", "002262", "002263", "002264", "002265", "002266", "002267", "002268", "002269", "002270", "002271", "002272", "002273", "002274", "002275", "002276", "002277", "002278", "002279", "002280", "002281", "002282", "002283", "002284", "002285", "002286", "002287", "002288", "002289", "002290", "002291", "002292", "002293", "002294", "002295", "002296", "002297", "002298", "002299", "002300", "002301", "002302", "002303", "002304", "002305", "002306", "002307", "002308", "002309", "002310", "002311", "002312", "002313", "002314", "002315", "002316", "002317", "002318", "002319", "002320", "002321", "002322", "002323", "002324", "002325", "002326", "002327", "002328", "002329", "002330", "002331", "002332", "002333", "002334", "002335", "002336", "002337", "002338", "002339", "002340", "002341", "002342", "002343", "002344", "002345", "002346", "002347", "002348", "002349", "002350", "002351", "002352", "002353", "002354", "002355", "002356", "002357", "002358", "002359", "002360", "002361", "002362", "002363", "002364", "002365", "002366", "002367", "002368", "002369", "002370", "002371", "002372", "002373", "002374", "002375", "002376", "002377", "002378", "002379", "002380", "002381", "002382", "002383", "002384", "002385", "002386", "002387", "002388", "002389", "002390", "002391", "002392", "002393", "002394", "002395", "002396", "002397", "002398", "002399", "002400", "002401", "002402", "002403", "002404", "002405", "002406", "002407", "002408", "002409", "002410", "002411", "002412", "002413", "002414", "002415", "002416", "002417", "002418", "002419", "002420", "002421", "002422", "002423", "002424", "002425", "002426", "002427", "002428", "002429", "002430", "002431", "002432", "002433", "002434", "002435", "002436", "002437", "002438", "002439", "002440", "002441", "002442", "002443", "002444", "002445", "002446", "002447", "002448", "002449", "002450", "002451", "002452", "002453", "002454", "002455", "002456", "002457", "002458", "002459", "002460", "002461", "002462", "002463", "002464", "002465", "002466", "002467", "002468", "002469", "002470", "002471", "002472", "002473", "002474", "002475", "002476", "002477", "002478", "002479", "002480", "002481", "002482", "002483", "002484", "002485", "002486", "002487", "002488", "002489", "002490", "002491", "002492", "002493", "002494", "002495", "002496", "002497", "002498", "002499", "002500", "002501", "002502", "002503", "002504", "002505", "002506", "002507", "002508", "002509", "002510", "002511", "002512", "002513", "002514", "002515", "002516", "002517", "002518", "002519", "002520", "002521", "002522", "002523", "002524", "002526", "002527", "002528", "002529", "002530", "002531", "002532", "002533", "002534", "002535", "002536", "002537", "002538", "002539", "002540", "002541", "002542", "002543", "002544", "002545", "002546", "002547", "002548", "002549", "002550", "002551", "002552", "002553", "002554", "002555", "002556", "002557", "002558", "002559", "002560", "002561", "002562", "002563", "002564", "002565", "002566", "002567", "002568", "002569", "002570", "002571", "002572", "002573", "002574", "002575", "002576", "002577", "002578", "002579", "002580", "002581", "002582", "002583", "002584", "002585", "002586", "002587", "002588", "002589", "002590", "002591", "002592", "002593", "002594", "002595", "002596", "002597", "002598", "002599", "002600", "002601", "002602", "002603", "002604", "002605", "002606", "002607", "002608", "002609", "002610", "002611", "002612", "002613", "002614", "002615", "002616", "002617", "002618", "002619", "002620", "002621", "002622", "002623", "002624", "002625", "002626", "002627", "002628", "002629", "002630", "002631", "002632", "002633", "002634", "002635", "002636", "002637", "002638", "002639", "002640", "002641", "002642", "002643", "002644", "002645", "002646", "002647", "002648", "002649", "002650", "002651", "002652", "002653", "002654", "002655", "002656", "002657", "002658", "002659", "002660", "002661", "002662", "002663", "002664", "002665", "002666", "002667", "002668", "002669", "002670", "002671", "002672", "002673", "002674", "002675", "002676", "002677", "002678", "002679", "002680", "002681", "002682", "002683", "002684", "002685", "002686", "002687", "002688", "002689", "002690", "002691", "002692", "002693", "002694", "002695", "002696", "002697", "002698", "002699", "002700", "002701", "002702", "002703", "002705", "002706", "002707", "002708", "002709", "002711", "002712", "002713", "002714", "002715", "002716", "002717", "002718", "002719", "002721", "002722", "002723", "002724", "002725", "002726", "002727", "002728", "002729", "002730", "002731", "002732", "002733", "002734", "002735", "002736", "002737", "002738", "002739", "002740", "002741", "002742", "002743", "002745", "002746", "002747", "002748", "002749", "002750", "002751", "002752", "200011", "200012", "200016", "200017", "200018", "200019", "200020", "200022", "200024", "200025", "200026", "200028", "200029", "200030", "200037", "200045", "200053", "200054", "200055", "200056", "200058", "200152", "200160", "200168", "200413", "200418", "200429", "200468", "200488", "200505", "200512", "200521", "200530", "200539", "200541", "200550", "200553", "200570", "200581", "200596", "200613", "200625", "200706", "200725", "200726", "200761", "200770", "200771", "200869", "200986", "200992", "300001", "300002", "300003", "300004", "300005", "300006", "300007", "300008", "300009", "300010", "300011", "300012", "300013", "300014", "300015", "300016", "300017", "300018", "300019", "300020", "300021", "300022", "300023", "300024", "300025", "300026", "300027", "300028", "300029", "300030", "300031", "300032", "300033", "300034", "300035", "300036", "300037", "300038", "300039", "300040", "300041", "300042", "300043", "300044", "300045", "300046", "300047", "300048", "300049", "300050", "300051", "300052", "300053", "300054", "300055", "300056", "300057", "300058", "300059", "300061", "300062", "300063", "300064", "300065", "300066", "300067", "300068", "300069", "300070", "300071", "300072", "300073", "300074", "300075", "300076", "300077", "300078", "300079", "300080", "300081", "300082", "300083", "300084", "300085", "300086", "300087", "300088", "300089", "300090", "300091", "300092", "300093", "300094", "300095", "300096", "300097", "300098", "300099", "300100", "300101", "300102", "300103", "300104", "300105", "300106", "300107", "300108", "300109", "300110", "300111", "300112", "300113", "300114", "300115", "300116", "300117", "300118", "300119", "300120", "300121", "300122", "300123", "300124", "300125", "300126", "300127", "300128", "300129", "300130", "300131", "300132", "300133", "300134", "300135", "300136", "300137", "300138", "300139", "300140", "300141", "300142", "300143", "300144", "300145", "300146", "300147", "300148", "300149", "300150", "300151", "300152", "300153", "300154", "300155", "300156", "300157", "300158", "300159", "300160", "300161", "300162", "300163", "300164", "300165", "300166", "300167", "300168", "300169", "300170", "300171", "300172", "300173", "300174", "300175", "300176", "300177", "300178", "300179", "300180", "300181", "300182", "300183", "300184", "300185", "300186", "300187", "300188", "300189", "300190", "300191", "300192", "300193", "300194", "300195", "300196", "300197", "300198", "300199", "300200", "300201", "300202", "300203", "300204", "300205", "300206", "300207", "300208", "300209", "300210", "300211", "300212", "300213", "300214", "300215", "300216", "300217", "300218", "300219", "300220", "300221", "300222", "300223", "300224", "300225", "300226", "300227", "300228", "300229", "300230", "300231", "300232", "300233", "300234", "300235", "300236", "300237", "300238", "300239", "300240", "300241", "300242", "300243", "300244", "300245", "300246", "300247", "300248", "300249", "300250", "300251", "300252", "300253", "300254", "300255", "300256", "300257", "300258", "300259", "300260", "300261", "300262", "300263", "300264", "300265", "300266", "300267", "300268", "300269", "300270", "300271", "300272", "300273", "300274", "300275", "300276", "300277", "300278", "300279", "300280", "300281", "300282", "300283", "300284", "300285", "300286", "300287", "300288", "300289", "300290", "300291", "300292", "300293", "300294", "300295", "300296", "300297", "300298", "300299", "300300", "300301", "300302", "300303", "300304", "300305", "300306", "300307", "300308", "300309", "300310", "300311", "300312", "300313", "300314", "300315", "300316", "300317", "300318", "300319", "300320", "300321", "300322", "300323", "300324", "300325", "300326", "300327", "300328", "300329", "300330", "300331", "300332", "300333", "300334", "300335", "300336", "300337", "300338", "300339", "300340", "300341", "300342", "300343", "300344", "300345", "300346", "300347", "300348", "300349", "300350", "300351", "300352", "300353", "300354", "300355", "300356", "300357", "300358", "300359", "300360", "300362", "300363", "300364", "300365", "300366", "300367", "300368", "300369", "300370", "300371", "300372", "300373", "300374", "300375", "300376", "300377", "300378", "300379", "300380", "300381", "300382", "300383", "300384", "300385", "300386", "300387", "300388", "300389", "300390", "300391", "300392", "300393", "300394", "300395", "300396", "300397", "300398", "300399", "300400", "300401", "300402", "300403", "300404", "300405", "300406", "300407", "300408", "300409", "300410", "300411", "300412", "300413", "300414", "300415", "300416", "300417", "300418", "300419", "300420", "300421", "300422", "300423", "300424", "300425", "300426", "300427", "300428", "300429", "300430", "300431", "300432", "300433", "300434", "300435", "300436", "300437", "300438", "300439", "300440", "300441", "300442", "300443", "300444", "300445", "300446", "300447", "300448", "300449", "600000", "600004", "600005", "600006", "600007", "600008", "600009", "600010", "600011", "600012", "600015", "600016", "600017", "600018", "600019", "600020", "600021", "600022", "600023", "600026", "600027", "600028", "600029", "600030", "600031", "600033", "600035", "600036", "600037", "600038", "600039", "600048", "600050", "600051", "600052", "600053", "600054", "600055", "600056", "600057", "600058", "600059", "600060", "600061", "600062", "600063", "600064", "600066", "600067", "600068", "600069", "600070", "600071", "600072", "600073", "600074", "600075", "600076", "600077", "600078", "600079", "600080", "600081", "600082", "600083", "600084", "600085", "600086", "600088", "600089", "600090", "600091", "600093", "600094", "600095", "600096", "600097", "600098", "600099", "600100", "600101", "600103", "600104", "600105", "600106", "600107", "600108", "600109", "600110", "600111", "600112", "600113", "600114", "600115", "600116", "600117", "600118", "600119", "600120", "600121", "600122", "600123", "600125", "600126", "600127", "600128", "600129", "600130", "600131", "600132", "600133", "600135", "600136", "600137", "600138", "600139", "600141", "600143", "600145", "600146", "600148", "600149", "600150", "600151", "600152", "600153", "600155", "600156", "600157", "600158", "600159", "600160", "600161", "600162", "600163", "600165", "600166", "600167", "600168", "600169", "600170", "600171", "600172", "600173", "600175", "600176", "600177", "600178", "600179", "600180", "600182", "600183", "600184", "600185", "600186", "600187", "600188", "600189", "600190", "600191", "600192", "600193", "600195", "600196", "600197", "600198", "600199", "600200", "600201", "600202", "600203", "600206", "600207", "600208", "600209", "600210", "600211", "600212", "600213", "600215", "600216", "600217", "600218", "600219", "600220", "600221", "600222", "600223", "600225", "600226", "600227", "600228", "600229", "600230", "600231", "600232", "600233", "600234", "600235", "600236", "600237", "600238", "600239", "600240", "600241", "600242", "600243", "600246", "600247", "600248", "600249", "600250", "600251", "600252", "600255", "600256", "600257", "600258", "600259", "600260", "600261", "600262", "600265", "600266", "600267", "600268", "600269", "600270", "600271", "600272", "600273", "600275", "600276", "600277", "600278", "600279", "600280", "600281", "600282", "600283", "600284", "600285", "600287", "600288", "600289", "600290", "600291", "600292", "600293", "600295", "600297", "600298", "600299", "600300", "600301", "600302", "600303", "600305", "600306", "600307", "600308", "600309", "600310", "600311", "600312", "600313", "600315", "600316", "600317", "600318", "600319", "600320", "600321", "600322", "600323", "600325", "600326", "600327", "600328", "600329", "600330", "600331", "600332", "600333", "600335", "600336", "600337", "600338", "600339", "600340", "600343", "600345", "600346", "600348", "600350", "600351", "600352", "600353", "600354", "600355", "600356", "600358", "600359", "600360", "600361", "600362", "600363", "600365", "600366", "600367", "600368", "600369", "600370", "600371", "600372", "600373", "600375", "600376", "600377", "600378", "600379", "600380", "600381", "600382", "600383", "600385", "600386", "600387", "600388", "600389", "600390", "600391", "600392", "600393", "600395", "600396", "600397", "600398", "600399", "600400", "600401", "600403", "600405", "600406", "600408", "600409", "600410", "600415", "600416", "600418", "600419", "600420", "600421", "600422", "600423", "600425", "600426", "600428", "600429", "600432", "600433", "600435", "600436", "600438", "600439", "600444", "600446", "600448", "600449", "600452", "600455", "600456", "600458", "600459", "600460", "600461", "600462", "600463", "600466", "600467", "600468", "600469", "600470", "600475", "600476", "600477", "600478", "600479", "600480", "600481", "600482", "600483", "600485", "600486", "600487", "600488", "600489", "600490", "600491", "600493", "600495", "600496", "600497", "600498", "600499", "600500", "600501", "600502", "600503", "600505", "600506", "600507", "600508", "600509", "600510", "600511", "600512", "600513", "600515", "600516", "600517", "600518", "600519", "600520", "600521", "600522", "600523", "600525", "600526", "600527", "600528", "600529", "600530", "600531", "600532", "600533", "600535", "600536", "600537", "600538", "600539", "600540", "600543", "600545", "600546", "600547", "600548", "600549", "600550", "600551", "600552", "600555", "600556", "600557", "600558", "600559", "600560", "600561", "600562", "600563", "600565", "600566", "600567", "600568", "600569", "600570", "600571", "600572", "600573", "600575", "600576", "600577", "600578", "600579", "600580", "600581", "600582", "600583", "600584", "600585", "600586", "600587", "600588", "600589", "600590", "600592", "600593", "600594", "600595", "600596", "600597", "600598", "600599", "600600", "600601", "600602", "600603", "600604", "600605", "600606", "600608", "600609", "600610", "600611", "600612", "600613", "600614", "600615", "600616", "600617", "600618", "600619", "600620", "600621", "600622", "600623", "600624", "600626", "600628", "600629", "600630", "600633", "600634", "600635", "600636", "600637", "600638", "600639", "600640", "600641", "600642", "600643", "600644", "600645", "600647", "600648", "600649", "600650", "600651", "600652", "600653", "600654", "600655", "600656", "600657", "600658", "600660", "600661", "600662", "600663", "600664", "600665", "600666", "600667", "600668", "600671", "600673", "600674", "600675", "600676", "600677", "600678", "600679", "600680", "600681", "600682", "600683", "600684", "600685", "600686", "600687", "600688", "600689", "600690", "600691", "600692", "600693", "600694", "600695", "600696", "600697", "600698", "600699", "600701", "600702", "600703", "600704", "600705", "600706", "600707", "600708", "600710", "600711", "600712", "600713", "600714", "600715", "600716", "600717", "600718", "600719", "600720", "600721", "600722", "600723", "600724", "600725", "600726", "600727", "600728", "600729", "600730", "600731", "600732", "600733", "600734", "600735", "600736", "600737", "600738", "600739", "600740", "600741", "600742", "600743", "600744", "600745", "600746", "600747", "600748", "600749", "600750", "600751", "600753", "600754", "600755", "600756", "600757", "600758", "600759", "600760", "600761", "600763", "600764", "600765", "600766", "600767", "600768", "600769", "600770", "600771", "600773", "600774", "600775", "600776", "600777", "600778", "600779", "600780", "600781", "600782", "600783", "600784", "600785", "600787", "600789", "600790", "600791", "600792", "600793", "600794", "600795", "600796", "600797", "600798", "600800", "600801", "600802", "600803", "600804", "600805", "600806", "600807", "600808", "600809", "600810", "600811", "600812", "600814", "600815", "600816", "600817", "600818", "600819", "600820", "600821", "600822", "600823", "600824", "600825", "600826", "600827", "600828", "600829", "600830", "600831", "600832", "600833", "600834", "600835", "600836", "600837", "600838", "600839", "600841", "600843", "600844", "600845", "600846", "600847", "600848", "600850", "600851", "600853", "600854", "600855", "600856", "600857", "600858", "600859", "600860", "600861", "600862", "600863", "600864", "600865", "600866", "600867", "600868", "600869", "600870", "600871", "600872", "600873", "600874", "600875", "600876", "600877", "600879", "600880", "600881", "600882", "600883", "600884", "600885", "600886", "600887", "600888", "600889", "600890", "600891", "600892", "600893", "600894", "600895", "600896", "600897", "600898", "600900", "600917", "600958", "600959", "600960", "600961", "600962", "600963", "600965", "600966", "600967", "600969", "600970", "600971", "600973", "600975", "600976", "600978", "600979", "600980", "600981", "600982", "600983", "600984", "600985", "600986", "600987", "600988", "600990", "600992", "600993", "600995", "600997", "600998", "600999", "601000", "601001", "601002", "601003", "601005", "601006", "601007", "601008", "601009", "601010", "601011", "601012", "601015", "601016", "601018", "601021", "601028", "601038", "601058", "601069", "601088", "601098", "601099", "601100", "601101", "601106", "601107", "601111", "601113", "601116", "601117", "601118", "601126", "601137", "601139", "601158", "601166", "601168", "601169", "601177", "601179", "601186", "601188", "601198", "601199", "601208", "601216", "601218", "601222", "601225", "601226", "601231", "601233", "601238", "601258", "601268", "601288", "601299", "601311", "601313", "601318", "601328", "601333", "601336", "601339", "601369", "601377", "601388", "601390", "601398", "601515", "601518", "601519", "601555", "601558", "601566", "601567", "601579", "601588", "601599", "601600", "601601", "601607", "601608", "601616", "601618", "601628", "601633", "601636", "601666", "601668", "601669", "601677", "601678", "601688", "601689", "601699", "601700", "601717", "601718", "601727", "601766", "601777", "601788", "601789", "601798", "601799", "601800", "601801", "601808", "601818", "601857", "601866", "601872", "601877", "601880", "601886", "601888", "601890", "601898", "601899", "601901", "601908", "601918", "601919", "601928", "601929", "601933", "601939", "601958", "601965", "601969", "601988", "601989", "601991", "601992", "601996", "601998", "601999", "603000", "603001", "603002", "603003", "603005", "603006", "603008", "603009", "603010", "603011", "603012", "603015", "603017", "603018", "603019", "603020", "603021", "603025", "603030", "603077", "603088", "603099", "603100", "603111", "603118", "603123", "603126", "603128", "603158", "603166", "603167", "603168", "603169", "603188", "603199", "603222", "603268", "603288", "603306", "603308", "603309", "603315", "603318", "603328", "603333", "603338", "603355", "603366", "603368", "603369", "603399", "603456", "603518", "603519", "603555", "603558", "603567", "603588", "603599", "603600", "603601", "603606", "603609", "603611", "603618", "603636", "603678", "603686", "603688", "603698", "603699", "603703", "603729", "603766", "603788", "603789", "603799", "603806", "603808", "603818", "603828", "603869", "603883", "603889", "603898", "603899", "603939", "603969", "603988", "603993", "603997", "603998", "900901", "900902", "900903", "900904", "900905", "900906", "900907", "900908", "900909", "900910", "900911", "900912", "900913", "900914", "900915", "900916", "900917", "900918", "900919", "900920", "900921", "900922", "900923", "900924", "900925", "900926", "900927", "900928", "900929", "900930", "900932", "900933", "900934", "900935", "900936", "900937", "900938", "900939", "900940", "900941", "900942", "900943", "900945", "900946", "900947", "900948", "900950", "900951", "900952", "900953", "900955", "900956", "900957"] \ No newline at end of file diff --git a/vn.datayes/names/fudTicker.json b/vn.datayes/names/fudTicker.json new file mode 100644 index 00000000..41985aff --- /dev/null +++ b/vn.datayes/names/fudTicker.json @@ -0,0 +1 @@ +["150001", "150008", "150009", "150012", "150013", "150016", "150017", "150018", "150019", "150020", "150021", "150022", "150023", "150027", "150028", "150029", "150030", "150031", "150032", "150033", "150034", "150035", "150036", "150037", "150039", "150040", "150042", "150047", "150048", "150049", "150050", "150051", "150052", "150053", "150054", "150055", "150056", "150057", "150058", "150059", "150060", "150064", "150065", "150066", "150067", "150073", "150075", "150076", "150077", "150080", "150083", "150084", "150085", "150086", "150088", "150089", "150090", "150091", "150092", "150093", "150094", "150095", "150096", "150097", "150098", "150099", "150100", "150101", "150102", "150104", "150105", "150106", "150107", "150108", "150109", "150112", "150113", "150114", "150117", "150118", "150120", "150121", "150122", "150123", "150124", "150128", "150129", "150130", "150131", "150133", "150134", "150135", "150136", "150137", "150138", "150139", "150140", "150141", "150142", "150143", "150144", "150145", "150146", "150147", "150148", "150149", "150150", "150151", "150152", "150153", "150154", "150156", "150157", "150158", "150160", "150161", "150164", "150165", "150167", "150168", "150169", "150170", "150171", "150172", "150173", "150174", "150175", "150176", "150177", "150178", "150179", "150180", "150181", "150182", "150184", "150185", "150186", "150187", "150188", "150189", "150190", "150191", "150192", "150193", "150194", "150195", "150196", "150197", "150198", "150199", "150200", "150201", "150203", "150204", "150205", "150206", "150207", "150208", "150209", "150210", "150211", "150212", "150213", "150214", "150215", "150216", "150217", "150218", "150219", "150220", "150221", "150222", "150223", "150224", "150227", "150228", "150229", "150230", "150241", "150242", "159001", "159003", "159005", "159901", "159902", "159903", "159905", "159906", "159907", "159908", "159909", "159910", "159911", "159912", "159913", "159915", "159916", "159917", "159918", "159919", "159920", "159921", "159922", "159923", "159924", "159925", "159926", "159927", "159928", "159929", "159930", "159931", "159932", "159933", "159934", "159935", "159936", "159937", "159938", "159939", "159940", "160105", "160106", "160119", "160123", "160125", "160128", "160130", "160131", "160133", "160211", "160212", "160215", "160216", "160220", "160311", "160314", "160415", "160416", "160505", "160512", "160513", "160515", "160607", "160610", "160611", "160613", "160615", "160616", "160617", "160618", "160621", "160706", "160716", "160717", "160719", "160720", "160805", "160807", "160810", "160812", "160813", "160910", "160915", "160916", "160918", "160919", "161005", "161010", "161015", "161017", "161019", "161115", "161116", "161117", "161119", "161210", "161213", "161216", "161217", "161219", "161222", "161224", "161505", "161607", "161610", "161614", "161706", "161713", "161714", "161716", "161810", "161813", "161815", "161820", "161821", "161831", "161903", "161907", "161908", "161911", "162006", "162105", "162207", "162307", "162308", "162411", "162605", "162607", "162703", "162711", "162712", "162715", "163001", "163110", "163208", "163210", "163302", "163402", "163407", "163409", "163412", "163415", "163503", "163801", "163819", "163821", "163824", "163827", "164105", "164208", "164606", "164701", "164702", "164705", "164808", "164810", "164814", "164815", "164902", "165309", "165311", "165313", "165508", "165509", "165510", "165512", "165513", "165516", "165517", "165705", "165806", "166001", "166006", "166007", "166008", "166009", "166011", "166401", "166902", "166904", "167901", "169101", "184721", "184722", "184728", "500038", "500056", "500058", "502000", "502001", "502002", "502048", "502049", "502050", "505888", "510010", "510020", "510030", "510050", "510060", "510070", "510090", "510110", "510120", "510130", "510150", "510160", "510170", "510180", "510190", "510210", "510220", "510230", "510260", "510270", "510280", "510290", "510300", "510310", "510330", "510410", "510420", "510430", "510440", "510450", "510500", "510510", "510520", "510610", "510620", "510630", "510650", "510660", "510680", "510700", "510880", "510900", "511010", "511210", "511220", "511800", "511810", "511860", "511880", "511990", "512010", "512070", "512110", "512120", "512210", "512220", "512230", "512300", "512310", "512600", "512610", "512640", "512990", "513030", "513100", "513500", "513600", "513660", "518800", "518880"] \ No newline at end of file diff --git a/vn.datayes/names/futTicker.json b/vn.datayes/names/futTicker.json new file mode 100644 index 00000000..8ea62647 --- /dev/null +++ b/vn.datayes/names/futTicker.json @@ -0,0 +1 @@ +["a1505", "a1507", "a1509", "a1511", "a1601", "a1603", "a1605", "a1607", "a1609", "Ag(T+D)", "ag1505", "ag1506", "ag1507", "ag1508", "ag1509", "ag1510", "ag1511", "ag1512", "ag1601", "ag1602", "ag1603", "ag1604", "al1505", "al1506", "al1507", "al1508", "al1509", "al1510", "al1511", "al1512", "al1601", "al1602", "al1603", "al1604", "Au(T+D)", "au1505", "au1506", "au1507", "au1508", "au1510", "au1512", "au1602", "au1604", "b1505", "b1507", "b1509", "b1511", "b1601", "b1603", "bb1505", "bb1506", "bb1507", "bb1508", "bb1509", "bb1510", "bb1511", "bb1512", "bb1601", "bb1602", "bb1603", "bb1604", "bu1505", "bu1506", "bu1507", "bu1508", "bu1509", "bu1510", "bu1512", "bu1603", "bu1606", "bu1609", "bu1612", "bu1703", "c1505", "c1507", "c1509", "c1511", "c1601", "c1603", "CBOZF", "CBOZL", "CBOZN", "CBOZT", "CF505", "CF507", "CF509", "CF511", "CF601", "CF603", "COMGC", "COMHG", "COMSI", "cs1505", "cs1507", "cs1509", "cs1511", "cs1601", "cs1603", "cu1505", "cu1506", "cu1507", "cu1508", "cu1509", "cu1510", "cu1511", "cu1512", "cu1601", "cu1602", "cu1603", "cu1604", "fb1505", "fb1506", "fb1507", "fb1508", "fb1509", "fb1510", "fb1511", "fb1512", "fb1601", "fb1602", "fb1603", "fb1604", "FG505", "FG506", "FG507", "FG508", "FG509", "FG510", "FG511", "FG512", "FG601", "FG602", "FG603", "FG604", "fu1506", "fu1507", "fu1508", "fu1509", "fu1510", "fu1511", "fu1512", "fu1601", "fu1603", "fu1604", "fu1605", "hc1505", "hc1506", "hc1507", "hc1508", "hc1509", "hc1510", "hc1511", "hc1512", "hc1601", "hc1602", "hc1603", "hc1604", "i1505", "i1506", "i1507", "i1508", "i1509", "i1510", "i1511", "i1512", "i1601", "i1602", "i1603", "i1604", "IC1505", "IC1506", "IC1509", "IC1512", "IF1505", "IF1506", "IF1509", "IF1512", "IH1505", "IH1506", "IH1509", "IH1512", "j1505", "j1506", "j1507", "j1508", "j1509", "j1510", "j1511", "j1512", "j1601", "j1602", "j1603", "j1604", "jd1505", "jd1506", "jd1509", "jd1510", "jd1511", "jd1512", "jd1601", "jd1602", "jd1603", "jd1604", "jm1505", "jm1506", "jm1507", "jm1508", "jm1509", "jm1510", "jm1511", "jm1512", "jm1601", "jm1602", "jm1603", "jm1604", "JR505", "JR507", "JR509", "JR511", "JR601", "JR603", "l1505", "l1506", "l1507", "l1508", "l1509", "l1510", "l1511", "l1512", "l1601", "l1602", "l1603", "l1604", "LLG", "LR505", "LR507", "LR509", "LR511", "LR601", "LR603", "m1505", "m1507", "m1508", "m1509", "m1511", "m1512", "m1601", "m1603", "MA506", "MA507", "MA508", "MA509", "MA510", "MA511", "MA512", "MA601", "MA602", "MA603", "MA604", "ME505", "ni1507", "ni1508", "ni1509", "ni1510", "ni1511", "ni1512", "ni1601", "ni1602", "ni1603", "ni1604", "NYMBZ", "NYMNG", "OI505", "OI507", "OI509", "OI511", "OI601", "OI603", "p1505", "p1506", "p1507", "p1508", "p1509", "p1510", "p1511", "p1512", "p1601", "p1602", "p1603", "p1604", "pb1505", "pb1506", "pb1507", "pb1508", "pb1509", "pb1510", "pb1511", "pb1512", "pb1601", "pb1602", "pb1603", "pb1604", "PM505", "PM507", "PM509", "PM511", "PM601", "PM603", "pp1505", "pp1506", "pp1507", "pp1508", "pp1509", "pp1510", "pp1511", "pp1512", "pp1601", "pp1602", "pp1603", "pp1604", "rb1505", "rb1506", "rb1507", "rb1508", "rb1509", "rb1510", "rb1511", "rb1512", "rb1601", "rb1602", "rb1603", "rb1604", "RI505", "RI507", "RI509", "RI511", "RI601", "RI603", "RM505", "RM507", "RM508", "RM509", "RM511", "RM601", "RM603", "RS507", "RS508", "RS509", "RS511", "ru1505", "ru1506", "ru1507", "ru1508", "ru1509", "ru1510", "ru1511", "ru1601", "ru1603", "ru1604", "SF505", "SF506", "SF507", "SF508", "SF509", "SF510", "SF511", "SF512", "SF601", "SF602", "SF603", "SF604", "SM505", "SM506", "SM507", "SM508", "SM509", "SM510", "SM511", "SM512", "SM601", "SM602", "SM603", "SM604", "sn1507", "sn1508", "sn1509", "sn1510", "sn1511", "sn1512", "sn1601", "sn1602", "sn1603", "sn1604", "SR505", "SR507", "SR509", "SR511", "SR601", "SR603", "SR605", "SR607", "SR609", "T1509", "T1512", "T1603", "TA505", "TA506", "TA507", "TA508", "TA509", "TA510", "TA511", "TA512", "TA601", "TA602", "TA603", "TA604", "TC506", "TC507", "TC508", "TC509", "TC510", "TC511", "TC512", "TC601", "TC602", "TC603", "TC604", "TF1506", "TF1509", "TF1512", "TOCRU", "v1505", "v1506", "v1507", "v1508", "v1509", "v1510", "v1511", "v1512", "v1601", "v1602", "v1603", "v1604", "WH505", "WH507", "WH509", "WH511", "WH601", "WH603", "wr1505", "wr1506", "wr1507", "wr1508", "wr1509", "wr1510", "wr1511", "wr1512", "wr1601", "wr1602", "wr1603", "wr1604", "y1505", "y1507", "y1508", "y1509", "y1511", "y1512", "y1601", "y1603", "zn1505", "zn1506", "zn1507", "zn1508", "zn1509", "zn1510", "zn1511", "zn1512", "zn1601", "zn1602", "zn1603", "zn1604"] \ No newline at end of file diff --git a/vn.datayes/names/idxTicker.json b/vn.datayes/names/idxTicker.json new file mode 100644 index 00000000..1e572d8f --- /dev/null +++ b/vn.datayes/names/idxTicker.json @@ -0,0 +1 @@ +["000001", "000002", "000003", "000004", "000005", "000006", "000007", "000008", "000009", "000010", "000011", "000012", "000013", "000015", "000016", "000017", "000018", "000019", "000020", "000021", "000022", "000023", "000025", "000026", "000027", "000028", "000029", "000030", "000031", "000032", "000033", "000034", "000035", "000036", "000037", "000038", "000039", "000040", "000041", "000042", "000043", "000044", "000045", "000046", "000047", "000048", "000049", "000050", "000051", "000052", "000053", "000054", "000055", "000056", "000057", "000058", "000059", "000060", "000061", "000062", "000063", "000064", "000065", "000066", "000067", "000068", "000069", "000070", "000071", "000072", "000073", "000074", "000075", "000076", "000077", "000078", "000079", "000090", "000091", "000092", "000093", "000094", "000095", "000096", "000097", "000098", "000099", "000100", "000101", "000102", "000103", "000104", "000105", "000106", "000107", "000108", "000109", "000110", "000111", "000112", "000113", "000114", "000115", "000116", "000117", "000118", "000119", "000120", "000121", "000122", "000123", "000125", "000126", "000128", "000129", "000130", "000131", "000132", "000133", "000134", "000135", "000136", "000137", "000138", "000139", "000141", "000142", "000145", "000146", "000147", "000148", "000149", "000150", "000151", "000152", "000153", "000155", "000158", "000159", "000160", "000300", "000801", "000802", "000803", "000804", "000805", "000806", "000807", "000808", "000809", "000810", "000811", "000812", "000813", "000814", "000815", "000816", "000817", "000818", "000819", "000820", "000821", "000822", "000823", "000824", "000825", "000826", "000827", "000828", "000829", "000830", "000831", "000832", "000833", "000838", "000839", "000840", "000841", "000842", "000843", "000844", "000846", "000847", "000849", "000850", "000851", "000852", "000855", "000901", "000902", "000903", "000904", "000905", "000906", "000907", "000908", "000909", "000910", "000911", "000912", "000913", "000914", "000915", "000916", "000917", "000918", "000919", "000920", "000921", "000922", "000923", "000924", "000925", "000926", "000927", "000928", "000929", "000930", "000931", "000932", "000933", "000934", "000935", "000936", "000937", "000938", "000939", "000940", "000941", "000942", "000943", "000944", "000945", "000946", "000947", "000948", "000949", "000950", "000951", "000952", "000953", "000954", "000955", "000956", "000957", "000958", "000959", "000960", "000961", "000962", "000963", "000964", "000965", "000966", "000967", "000968", "000969", "000970", "000971", "000972", "000973", "000974", "000975", "000976", "000977", "000978", "000979", "000980", "000981", "000982", "000983", "000984", "000985", "000986", "000987", "000988", "000989", "000990", "000991", "000992", "000993", "000994", "000995", "000996", "000997", "000998", "000999", "399001", "399002", "399003", "399004", "399005", "399006", "399007", "399008", "399009", "399010", "399011", "399012", "399013", "399100", "399101", "399102", "399103", "399106", "399107", "399108", "399231", "399232", "399233", "399234", "399235", "399236", "399237", "399238", "399239", "399240", "399241", "399242", "399243", "399244", "399248", "399249", "399298", "399299", "399300", "399301", "399302", "399303", "399305", "399306", "399307", "399310", "399311", "399312", "399313", "399314", "399315", "399316", "399317", "399318", "399319", "399320", "399321", "399322", "399324", "399326", "399328", "399330", "399332", "399333", "399335", "399337", "399339", "399341", "399344", "399346", "399348", "399350", "399351", "399352", "399353", "399355", "399356", "399357", "399358", "399359", "399360", "399361", "399362", "399363", "399364", "399365", "399366", "399367", "399368", "399369", "399370", "399371", "399372", "399373", "399374", "399375", "399376", "399377", "399378", "399379", "399380", "399381", "399382", "399383", "399384", "399385", "399386", "399387", "399388", "399389", "399390", "399391", "399392", "399393", "399394", "399395", "399396", "399397", "399398", "399399", "399400", "399401", "399402", "399403", "399404", "399405", "399406", "399407", "399408", "399409", "399410", "399411", "399412", "399413", "399415", "399416", "399417", "399418", "399419", "399420", "399481", "399550", "399551", "399552", "399553", "399554", "399555", "399556", "399557", "399602", "399604", "399606", "399608", "399610", "399611", "399612", "399613", "399614", "399615", "399616", "399617", "399618", "399619", "399620", "399621", "399622", "399623", "399624", "399625", "399626", "399627", "399628", "399629", "399630", "399631", "399632", "399633", "399634", "399635", "399636", "399637", "399638", "399639", "399640", "399641", "399642", "399643", "399644", "399645", "399646", "399647", "399648", "399649", "399650", "399651", "399652", "399653", "399654", "399655", "399656", "399657", "399658", "399659", "399660", "399661", "399662", "399663", "399664", "399665", "399666", "399667", "399668", "399669", "399670", "399671", "399672", "399673", "399701", "399702", "399703", "399704", "399705", "399706", "399707", "399802", "399803", "399804", "399805", "399806", "399807", "399808", "399809", "399810", "399811", "399901", "399903", "399904", "399905", "399907", "399908", "399909", "399910", "399911", "399912", "399913", "399914", "399915", "399916", "399917", "399918", "399919", "399920", "399922", "399923", "399925", "399926", "399927", "399928", "399929", "399930", "399931", "399932", "399933", "399934", "399935", "399936", "399937", "399938", "399939", "399941", "399942", "399943", "399944", "399945", "399946", "399947", "399948", "399949", "399950", "399951", "399952", "399953", "399954", "399956", "399957", "399958", "399959", "399960", "399961", "399962", "399963", "399964", "399965", "399966", "399967", "399968", "399969", "399970", "399971", "399972", "399973", "399974", "399975", "399977", "399978", "399979", "399980", "399982", "399990", "399991", "399992", "399993", "399994", "399995", "399996", "399997", "399998", "801001", "801002", "801003", "801005", "801010", "801020", "801030", "801040", "801050", "801080", "801110", "801120", "801130", "801140", "801150", "801160", "801170", "801180", "801200", "801210", "801230", "801250", "801260", "801270", "801280", "801300", "801710", "801720", "801730", "801740", "801750", "801760", "801770", "801780", "801790", "801811", "801812", "801813", "801821", "801822", "801823", "801831", "801832", "801833", "801841", "801842", "801843", "801851", "801852", "801853", "801862", "801863", "801880", "801890", "801901", "801903", "801905", "802600", "802611", "802612", "803611", "803612", "803613", "DYCB1", "DYCB10", "DYCB11", "DYCB12", "DYCB13", "DYCB14", "DYCB15", "DYCB16", "DYCB17", "DYCB18", "DYCB19", "DYCB2", "DYCB20", "DYCB21", "DYCB22", "DYCB23", "DYCB24", "DYCB25", "DYCB26", "DYCB27", "DYCB28", "DYCB29", "DYCB3", "DYCB30", "DYCB31", "DYCB32", "DYCB33", "DYCB34", "DYCB35", "DYCB36", "DYCB37", "DYCB38", "DYCB39", "DYCB4", "DYCB40", "DYCB41", "DYCB42", "DYCB43", "DYCB44", "DYCB45", "DYCB46", "DYCB5", "DYCB6", "DYCB7", "DYCB8", "DYCB9", "H00985", "H01001", "H01006", "H01017", "H11001", "H11006", "H11009", "H11017", "H11020", "H11021", "H11022", "H11023", "H11024", "H11025", "H11026", "H11061", "H11062", "H11063", "H11064", "H11065", "H11066", "H11067", "H11068", "H11069", "H30008", "H30009", "H30021", "H30069", "H30070", "H30071", "H30072", "H30075", "H30076", "H30077", "H30078", "H30120", "H30121", "H30122", "H30123", "H30224", "H30225", "H30226", "H30227", "H30228", "H30264", "H30265", "H30266", "H30318"] \ No newline at end of file diff --git a/vn.datayes/names/optTicker.json b/vn.datayes/names/optTicker.json new file mode 100644 index 00000000..c18a8958 --- /dev/null +++ b/vn.datayes/names/optTicker.json @@ -0,0 +1 @@ +["510050C1512M02950", "510050P1512M03500", "510050C1512M02900", "510050P1512M02950", "510050P1512M02900", "510050C1505M03200", "510050P1505M03200", "510050C1506M03200", "510050P1506M03200", "510050C1509M03200", "510050P1509M03200", "510050C1506M03500", "510050P1505M03500", "510050C1509M03500", "510050P1506M03500", "510050P1512M03300", "510050P1512M03200", "510050C1505M03500", "510050P1512M03400", "510050P1506M02500", "510050C1509M02500", "510050P1509M02500", "510050C1512M03500", "510050P1509M03500", "510050C1506M02500", "510050C1506M03400", "510050P1505M03400", "510050C1509M03300", "510050P1506M03300", "510050C1506M03300", "510050P1505M03300", "510050C1505M03400", "510050P1509M03300", "510050C1505M03300", "510050P1509M02450", "510050C1509M02450", "510050P1506M02450", "510050C1506M02450", "510050P1509M02400", "510050P1506M03000", "510050C1509M03000", "510050P1505M03000", "510050C1506M03000", "510050C1505M03000", "510050P1509M02950", "510050C1509M02950", "510050P1509M02900", "510050P1509M02600", "510050P1506M02600", "510050C1509M02600", "510050C1506M02650", "510050P1506M02650", "510050C1509M02650", "510050P1509M03000", "510050C1505M03100", "510050C1506M03100", "510050P1505M03100", "510050C1509M03100", "510050P1506M03100", "510050P1509M03100", "510050C1506M02750", "510050P1506M02750", "510050C1509M02750", "510050P1509M02750", "510050P1509M02550", "510050C1506M02550", "510050C1509M02550", "510050P1506M02550", "510050C1506M02600", "510050P1506M02850", "510050C1509M02850", "510050P1509M02850", "510050P1509M02700", "510050C1505M02850", "510050P1505M02800", "510050P1505M02850", "510050C1506M02850", "510050P1509M02650", "510050C1509M02700", "510050P1506M02700", "510050C1506M02700", "510050P1509M02200", "510050P1509M02250", "510050C1509M02350", "510050C1509M02400", "510050C1509M02250", "510050C1509M02300", "510050P1506M02400", "510050C1509M02200", "510050P1509M02300", "510050P1509M02350", "510050P1506M02900", "510050C1506M02950", "510050C1506M02900", "510050P1505M02950", "510050P1505M02900", "510050C1505M02950", "510050C1505M02900", "510050C1509M02900", "510050P1506M02950", "510050C1505M02650", "510050C1505M02700", "510050P1506M02800", "510050C1509M02800", "510050C1506M02800", "510050C1505M02550", "510050C1505M02600", "510050P1509M02800", "510050C1505M02500", "510050P1509M03400", "510050P1506M02300", "510050C1505M02800", "510050C1505M02750", "510050P1505M02700", "510050P1505M02750", "510050P1505M02550", "510050P1505M02500", "510050P1505M02650", "510050P1505M02600", "510050C1506M02300", "510050C1506M02250", "510050P1506M02350", "510050C1512M03000", "510050P1506M03400", "510050C1509M03400", "510050C1512M03300", "510050C1512M03400", "510050C1512M03100", "510050C1512M03200", "510050C1506M02200", "510050P1512M03000", "510050P1512M03100", "510050C1506M02400", "510050C1506M02350", "510050P1506M02250", "510050P1506M02200"] \ No newline at end of file diff --git a/vn.datayes/names/secID.json b/vn.datayes/names/secID.json new file mode 100644 index 00000000..d1c73ff4 --- /dev/null +++ b/vn.datayes/names/secID.json @@ -0,0 +1 @@ +["000001.XSHE", "000002.XSHE", "000004.XSHE", "000005.XSHE", "000006.XSHE", "000007.XSHE", "000008.XSHE", "000009.XSHE", "000010.XSHE", "000011.XSHE", "000012.XSHE", "000014.XSHE", "000016.XSHE", "000017.XSHE", "000018.XSHE", "000019.XSHE", "000020.XSHE", "000021.XSHE", "000022.XSHE", "000023.XSHE", "000024.XSHE", "000025.XSHE", "000026.XSHE", "000027.XSHE", "000028.XSHE", "000029.XSHE", "000030.XSHE", "000031.XSHE", "000032.XSHE", "000033.XSHE", "000034.XSHE", "000035.XSHE", "000036.XSHE", "000037.XSHE", "000038.XSHE", "000039.XSHE", "000040.XSHE", "000042.XSHE", "000043.XSHE", "000045.XSHE", "000046.XSHE", "000048.XSHE", "000049.XSHE", "000050.XSHE", "000055.XSHE", "000056.XSHE", "000058.XSHE", "000059.XSHE", "000060.XSHE", "000061.XSHE", "000062.XSHE", "000063.XSHE", "000065.XSHE", "000066.XSHE", "000068.XSHE", "000069.XSHE", "000070.XSHE", "000078.XSHE", "000088.XSHE", "000089.XSHE", "000090.XSHE", "000096.XSHE", "000099.XSHE", "000100.XSHE", "000150.XSHE", "000151.XSHE", "000153.XSHE", "000155.XSHE", "000156.XSHE", "000157.XSHE", "000158.XSHE", "000159.XSHE", "000166.XSHE", "000301.XSHE", "000333.XSHE", "000338.XSHE", "000400.XSHE", "000401.XSHE", "000402.XSHE", "000403.XSHE", "000404.XSHE", "000407.XSHE", "000408.XSHE", "000409.XSHE", "000410.XSHE", "000411.XSHE", "000413.XSHE", "000415.XSHE", "000416.XSHE", "000417.XSHE", "000418.XSHE", "000419.XSHE", "000420.XSHE", "000421.XSHE", "000422.XSHE", "000423.XSHE", "000425.XSHE", "000426.XSHE", "000428.XSHE", "000429.XSHE", "000430.XSHE", "000488.XSHE", "000498.XSHE", "000501.XSHE", "000502.XSHE", "000503.XSHE", "000504.XSHE", "000505.XSHE", "000506.XSHE", "000507.XSHE", "000509.XSHE", "000510.XSHE", "000511.XSHE", "000513.XSHE", "000514.XSHE", "000516.XSHE", "000517.XSHE", "000518.XSHE", "000519.XSHE", "000520.XSHE", "000521.XSHE", "000523.XSHE", "000524.XSHE", "000525.XSHE", "000526.XSHE", "000528.XSHE", "000529.XSHE", "000530.XSHE", "000531.XSHE", "000532.XSHE", "000533.XSHE", "000534.XSHE", "000536.XSHE", "000537.XSHE", "000538.XSHE", "000539.XSHE", "000540.XSHE", "000541.XSHE", "000543.XSHE", "000544.XSHE", "000545.XSHE", "000546.XSHE", "000547.XSHE", "000548.XSHE", "000550.XSHE", "000551.XSHE", "000552.XSHE", "000553.XSHE", "000554.XSHE", "000555.XSHE", "000557.XSHE", "000558.XSHE", "000559.XSHE", "000560.XSHE", "000561.XSHE", "000563.XSHE", "000564.XSHE", "000565.XSHE", "000566.XSHE", "000567.XSHE", "000568.XSHE", "000570.XSHE", "000571.XSHE", "000572.XSHE", "000573.XSHE", "000576.XSHE", "000581.XSHE", "000582.XSHE", "000584.XSHE", "000585.XSHE", "000586.XSHE", "000587.XSHE", "000589.XSHE", "000590.XSHE", "000591.XSHE", "000592.XSHE", "000593.XSHE", "000594.XSHE", "000595.XSHE", "000596.XSHE", "000597.XSHE", "000598.XSHE", "000599.XSHE", "000600.XSHE", "000601.XSHE", "000603.XSHE", "000605.XSHE", "000606.XSHE", "000607.XSHE", "000608.XSHE", "000609.XSHE", "000610.XSHE", "000611.XSHE", "000612.XSHE", "000613.XSHE", "000615.XSHE", "000616.XSHE", "000617.XSHE", "000619.XSHE", "000620.XSHE", "000622.XSHE", "000623.XSHE", "000625.XSHE", "000626.XSHE", "000627.XSHE", "000628.XSHE", "000629.XSHE", "000630.XSHE", "000631.XSHE", "000632.XSHE", "000633.XSHE", "000635.XSHE", "000636.XSHE", "000637.XSHE", "000638.XSHE", "000639.XSHE", "000650.XSHE", "000651.XSHE", "000652.XSHE", "000655.XSHE", "000656.XSHE", "000657.XSHE", "000659.XSHE", "000661.XSHE", "000662.XSHE", "000663.XSHE", "000665.XSHE", "000666.XSHE", "000667.XSHE", "000668.XSHE", "000669.XSHE", "000670.XSHE", "000671.XSHE", "000672.XSHE", "000673.XSHE", "000676.XSHE", "000677.XSHE", "000678.XSHE", "000679.XSHE", "000680.XSHE", "000681.XSHE", "000682.XSHE", "000683.XSHE", "000685.XSHE", "000686.XSHE", "000687.XSHE", "000688.XSHE", "000690.XSHE", "000691.XSHE", "000692.XSHE", "000693.XSHE", "000695.XSHE", "000697.XSHE", "000698.XSHE", "000700.XSHE", "000701.XSHE", "000702.XSHE", "000703.XSHE", "000705.XSHE", "000707.XSHE", "000708.XSHE", "000709.XSHE", "000710.XSHE", "000711.XSHE", "000712.XSHE", "000713.XSHE", "000715.XSHE", "000716.XSHE", "000717.XSHE", "000718.XSHE", "000719.XSHE", "000720.XSHE", "000721.XSHE", "000722.XSHE", "000723.XSHE", "000725.XSHE", "000726.XSHE", "000727.XSHE", "000728.XSHE", "000729.XSHE", "000731.XSHE", "000732.XSHE", "000733.XSHE", "000735.XSHE", "000736.XSHE", "000737.XSHE", "000738.XSHE", "000739.XSHE", "000748.XSHE", "000750.XSHE", "000751.XSHE", "000752.XSHE", "000753.XSHE", "000755.XSHE", "000756.XSHE", "000757.XSHE", "000758.XSHE", "000759.XSHE", "000760.XSHE", "000761.XSHE", "000762.XSHE", "000766.XSHE", "000767.XSHE", "000768.XSHE", "000776.XSHE", "000777.XSHE", "000778.XSHE", "000779.XSHE", "000780.XSHE", "000782.XSHE", "000783.XSHE", "000785.XSHE", "000786.XSHE", "000788.XSHE", "000789.XSHE", "000790.XSHE", "000791.XSHE", "000792.XSHE", "000793.XSHE", "000795.XSHE", "000796.XSHE", "000797.XSHE", "000798.XSHE", "000799.XSHE", "000800.XSHE", "000801.XSHE", "000802.XSHE", "000803.XSHE", "000806.XSHE", "000807.XSHE", "000809.XSHE", "000810.XSHE", "000811.XSHE", "000812.XSHE", "000813.XSHE", "000815.XSHE", "000816.XSHE", "000818.XSHE", "000819.XSHE", "000820.XSHE", "000821.XSHE", "000822.XSHE", "000823.XSHE", "000825.XSHE", "000826.XSHE", "000828.XSHE", "000829.XSHE", "000830.XSHE", "000831.XSHE", "000833.XSHE", "000835.XSHE", "000836.XSHE", "000837.XSHE", "000838.XSHE", "000839.XSHE", "000848.XSHE", "000850.XSHE", "000851.XSHE", "000852.XSHE", "000856.XSHE", "000858.XSHE", "000859.XSHE", "000860.XSHE", "000861.XSHE", "000862.XSHE", "000863.XSHE", "000868.XSHE", "000869.XSHE", "000875.XSHE", "000876.XSHE", "000877.XSHE", "000878.XSHE", "000880.XSHE", "000881.XSHE", "000882.XSHE", "000883.XSHE", "000885.XSHE", "000886.XSHE", "000887.XSHE", "000888.XSHE", "000889.XSHE", "000890.XSHE", "000892.XSHE", "000893.XSHE", "000895.XSHE", "000897.XSHE", "000898.XSHE", "000899.XSHE", "000900.XSHE", "000901.XSHE", "000902.XSHE", "000903.XSHE", "000905.XSHE", "000906.XSHE", "000908.XSHE", "000909.XSHE", "000910.XSHE", "000911.XSHE", "000912.XSHE", "000913.XSHE", "000915.XSHE", "000916.XSHE", "000917.XSHE", "000918.XSHE", "000919.XSHE", "000920.XSHE", "000921.XSHE", "000922.XSHE", "000923.XSHE", "000925.XSHE", "000926.XSHE", "000927.XSHE", "000928.XSHE", "000929.XSHE", "000930.XSHE", "000931.XSHE", "000932.XSHE", "000933.XSHE", "000935.XSHE", "000936.XSHE", "000937.XSHE", "000938.XSHE", "000939.XSHE", "000948.XSHE", "000949.XSHE", "000950.XSHE", "000951.XSHE", "000952.XSHE", "000953.XSHE", "000955.XSHE", "000957.XSHE", "000958.XSHE", "000959.XSHE", "000960.XSHE", "000961.XSHE", "000962.XSHE", "000963.XSHE", "000965.XSHE", "000966.XSHE", "000967.XSHE", "000968.XSHE", "000969.XSHE", "000970.XSHE", "000971.XSHE", "000972.XSHE", "000973.XSHE", "000975.XSHE", "000976.XSHE", "000977.XSHE", "000978.XSHE", "000979.XSHE", "000980.XSHE", "000981.XSHE", "000982.XSHE", "000983.XSHE", "000985.XSHE", "000987.XSHE", "000988.XSHE", "000989.XSHE", "000990.XSHE", "000993.XSHE", "000995.XSHE", "000996.XSHE", "000997.XSHE", "000998.XSHE", "000999.XSHE", "001696.XSHE", "001896.XSHE", "002001.XSHE", "002002.XSHE", "002003.XSHE", "002004.XSHE", "002005.XSHE", "002006.XSHE", "002007.XSHE", "002008.XSHE", "002009.XSHE", "002010.XSHE", "002011.XSHE", "002012.XSHE", "002013.XSHE", "002014.XSHE", "002015.XSHE", "002016.XSHE", "002017.XSHE", "002018.XSHE", "002019.XSHE", "002020.XSHE", "002021.XSHE", "002022.XSHE", "002023.XSHE", "002024.XSHE", "002025.XSHE", "002026.XSHE", "002027.XSHE", "002028.XSHE", "002029.XSHE", "002030.XSHE", "002031.XSHE", "002032.XSHE", "002033.XSHE", "002034.XSHE", "002035.XSHE", "002036.XSHE", "002037.XSHE", "002038.XSHE", "002039.XSHE", "002040.XSHE", "002041.XSHE", "002042.XSHE", "002043.XSHE", "002044.XSHE", "002045.XSHE", "002046.XSHE", "002047.XSHE", "002048.XSHE", "002049.XSHE", "002050.XSHE", "002051.XSHE", "002052.XSHE", "002053.XSHE", "002054.XSHE", "002055.XSHE", "002056.XSHE", "002057.XSHE", "002058.XSHE", "002059.XSHE", "002060.XSHE", "002061.XSHE", "002062.XSHE", "002063.XSHE", "002064.XSHE", "002065.XSHE", "002066.XSHE", "002067.XSHE", "002068.XSHE", "002069.XSHE", "002070.XSHE", "002071.XSHE", "002072.XSHE", "002073.XSHE", "002074.XSHE", "002075.XSHE", "002076.XSHE", "002077.XSHE", "002078.XSHE", "002079.XSHE", "002080.XSHE", "002081.XSHE", "002082.XSHE", "002083.XSHE", "002084.XSHE", "002085.XSHE", "002086.XSHE", "002087.XSHE", "002088.XSHE", "002089.XSHE", "002090.XSHE", "002091.XSHE", "002092.XSHE", "002093.XSHE", "002094.XSHE", "002095.XSHE", "002096.XSHE", "002097.XSHE", "002098.XSHE", "002099.XSHE", "002100.XSHE", "002101.XSHE", "002102.XSHE", "002103.XSHE", "002104.XSHE", "002105.XSHE", "002106.XSHE", "002107.XSHE", "002108.XSHE", "002109.XSHE", "002110.XSHE", "002111.XSHE", "002112.XSHE", "002113.XSHE", "002114.XSHE", "002115.XSHE", "002116.XSHE", "002117.XSHE", "002118.XSHE", "002119.XSHE", "002120.XSHE", "002121.XSHE", "002122.XSHE", "002123.XSHE", "002124.XSHE", "002125.XSHE", "002126.XSHE", "002127.XSHE", "002128.XSHE", "002129.XSHE", "002130.XSHE", "002131.XSHE", "002132.XSHE", "002133.XSHE", "002134.XSHE", "002135.XSHE", "002136.XSHE", "002137.XSHE", "002138.XSHE", "002139.XSHE", "002140.XSHE", "002141.XSHE", "002142.XSHE", "002143.XSHE", "002144.XSHE", "002145.XSHE", "002146.XSHE", "002147.XSHE", "002148.XSHE", "002149.XSHE", "002150.XSHE", "002151.XSHE", "002152.XSHE", "002153.XSHE", "002154.XSHE", "002155.XSHE", "002156.XSHE", "002157.XSHE", "002158.XSHE", "002159.XSHE", "002160.XSHE", "002161.XSHE", "002162.XSHE", "002163.XSHE", "002164.XSHE", "002165.XSHE", "002166.XSHE", "002167.XSHE", "002168.XSHE", "002169.XSHE", "002170.XSHE", "002171.XSHE", "002172.XSHE", "002173.XSHE", "002174.XSHE", "002175.XSHE", "002176.XSHE", "002177.XSHE", "002178.XSHE", "002179.XSHE", "002180.XSHE", "002181.XSHE", "002182.XSHE", "002183.XSHE", "002184.XSHE", "002185.XSHE", "002186.XSHE", "002187.XSHE", "002188.XSHE", "002189.XSHE", "002190.XSHE", "002191.XSHE", "002192.XSHE", "002193.XSHE", "002194.XSHE", "002195.XSHE", "002196.XSHE", "002197.XSHE", "002198.XSHE", "002199.XSHE", "002200.XSHE", "002201.XSHE", "002202.XSHE", "002203.XSHE", "002204.XSHE", "002205.XSHE", "002206.XSHE", "002207.XSHE", "002208.XSHE", "002209.XSHE", "002210.XSHE", "002211.XSHE", "002212.XSHE", "002213.XSHE", "002214.XSHE", "002215.XSHE", "002216.XSHE", "002217.XSHE", "002218.XSHE", "002219.XSHE", "002220.XSHE", "002221.XSHE", "002222.XSHE", "002223.XSHE", "002224.XSHE", "002225.XSHE", "002226.XSHE", "002227.XSHE", "002228.XSHE", "002229.XSHE", "002230.XSHE", "002231.XSHE", "002232.XSHE", "002233.XSHE", "002234.XSHE", "002235.XSHE", "002236.XSHE", "002237.XSHE", "002238.XSHE", "002239.XSHE", "002240.XSHE", "002241.XSHE", "002242.XSHE", "002243.XSHE", "002244.XSHE", "002245.XSHE", "002246.XSHE", "002247.XSHE", "002248.XSHE", "002249.XSHE", "002250.XSHE", "002251.XSHE", "002252.XSHE", "002253.XSHE", "002254.XSHE", "002255.XSHE", "002256.XSHE", "002258.XSHE", "002259.XSHE", "002260.XSHE", "002261.XSHE", "002262.XSHE", "002263.XSHE", "002264.XSHE", "002265.XSHE", "002266.XSHE", "002267.XSHE", "002268.XSHE", "002269.XSHE", "002270.XSHE", "002271.XSHE", "002272.XSHE", "002273.XSHE", "002274.XSHE", "002275.XSHE", "002276.XSHE", "002277.XSHE", "002278.XSHE", "002279.XSHE", "002280.XSHE", "002281.XSHE", "002282.XSHE", "002283.XSHE", "002284.XSHE", "002285.XSHE", "002286.XSHE", "002287.XSHE", "002288.XSHE", "002289.XSHE", "002290.XSHE", "002291.XSHE", "002292.XSHE", "002293.XSHE", "002294.XSHE", "002295.XSHE", "002296.XSHE", "002297.XSHE", "002298.XSHE", "002299.XSHE", "002300.XSHE", "002301.XSHE", "002302.XSHE", "002303.XSHE", "002304.XSHE", "002305.XSHE", "002306.XSHE", "002307.XSHE", "002308.XSHE", "002309.XSHE", "002310.XSHE", "002311.XSHE", "002312.XSHE", "002313.XSHE", "002314.XSHE", "002315.XSHE", "002316.XSHE", "002317.XSHE", "002318.XSHE", "002319.XSHE", "002320.XSHE", "002321.XSHE", "002322.XSHE", "002323.XSHE", "002324.XSHE", "002325.XSHE", "002326.XSHE", "002327.XSHE", "002328.XSHE", "002329.XSHE", "002330.XSHE", "002331.XSHE", "002332.XSHE", "002333.XSHE", "002334.XSHE", "002335.XSHE", "002336.XSHE", "002337.XSHE", "002338.XSHE", "002339.XSHE", "002340.XSHE", "002341.XSHE", "002342.XSHE", "002343.XSHE", "002344.XSHE", "002345.XSHE", "002346.XSHE", "002347.XSHE", "002348.XSHE", "002349.XSHE", "002350.XSHE", "002351.XSHE", "002352.XSHE", "002353.XSHE", "002354.XSHE", "002355.XSHE", "002356.XSHE", "002357.XSHE", "002358.XSHE", "002359.XSHE", "002360.XSHE", "002361.XSHE", "002362.XSHE", "002363.XSHE", "002364.XSHE", "002365.XSHE", "002366.XSHE", "002367.XSHE", "002368.XSHE", "002369.XSHE", "002370.XSHE", "002371.XSHE", "002372.XSHE", "002373.XSHE", "002374.XSHE", "002375.XSHE", "002376.XSHE", "002377.XSHE", "002378.XSHE", "002379.XSHE", "002380.XSHE", "002381.XSHE", "002382.XSHE", "002383.XSHE", "002384.XSHE", "002385.XSHE", "002386.XSHE", "002387.XSHE", "002388.XSHE", "002389.XSHE", "002390.XSHE", "002391.XSHE", "002392.XSHE", "002393.XSHE", "002394.XSHE", "002395.XSHE", "002396.XSHE", "002397.XSHE", "002398.XSHE", "002399.XSHE", "002400.XSHE", "002401.XSHE", "002402.XSHE", "002403.XSHE", "002404.XSHE", "002405.XSHE", "002406.XSHE", "002407.XSHE", "002408.XSHE", "002409.XSHE", "002410.XSHE", "002411.XSHE", "002412.XSHE", "002413.XSHE", "002414.XSHE", "002415.XSHE", "002416.XSHE", "002417.XSHE", "002418.XSHE", "002419.XSHE", "002420.XSHE", "002421.XSHE", "002422.XSHE", "002423.XSHE", "002424.XSHE", "002425.XSHE", "002426.XSHE", "002427.XSHE", "002428.XSHE", "002429.XSHE", "002430.XSHE", "002431.XSHE", "002432.XSHE", "002433.XSHE", "002434.XSHE", "002435.XSHE", "002436.XSHE", "002437.XSHE", "002438.XSHE", "002439.XSHE", "002440.XSHE", "002441.XSHE", "002442.XSHE", "002443.XSHE", "002444.XSHE", "002445.XSHE", "002446.XSHE", "002447.XSHE", "002448.XSHE", "002449.XSHE", "002450.XSHE", "002451.XSHE", "002452.XSHE", "002453.XSHE", "002454.XSHE", "002455.XSHE", "002456.XSHE", "002457.XSHE", "002458.XSHE", "002459.XSHE", "002460.XSHE", "002461.XSHE", "002462.XSHE", "002463.XSHE", "002464.XSHE", "002465.XSHE", "002466.XSHE", "002467.XSHE", "002468.XSHE", "002469.XSHE", "002470.XSHE", "002471.XSHE", "002472.XSHE", "002473.XSHE", "002474.XSHE", "002475.XSHE", "002476.XSHE", "002477.XSHE", "002478.XSHE", "002479.XSHE", "002480.XSHE", "002481.XSHE", "002482.XSHE", "002483.XSHE", "002484.XSHE", "002485.XSHE", "002486.XSHE", "002487.XSHE", "002488.XSHE", "002489.XSHE", "002490.XSHE", "002491.XSHE", "002492.XSHE", "002493.XSHE", "002494.XSHE", "002495.XSHE", "002496.XSHE", "002497.XSHE", "002498.XSHE", "002499.XSHE", "002500.XSHE", "002501.XSHE", "002502.XSHE", "002503.XSHE", "002504.XSHE", "002505.XSHE", "002506.XSHE", "002507.XSHE", "002508.XSHE", "002509.XSHE", "002510.XSHE", "002511.XSHE", "002512.XSHE", "002513.XSHE", "002514.XSHE", "002515.XSHE", "002516.XSHE", "002517.XSHE", "002518.XSHE", "002519.XSHE", "002520.XSHE", "002521.XSHE", "002522.XSHE", "002523.XSHE", "002524.XSHE", "002526.XSHE", "002527.XSHE", "002528.XSHE", "002529.XSHE", "002530.XSHE", "002531.XSHE", "002532.XSHE", "002533.XSHE", "002534.XSHE", "002535.XSHE", "002536.XSHE", "002537.XSHE", "002538.XSHE", "002539.XSHE", "002540.XSHE", "002541.XSHE", "002542.XSHE", "002543.XSHE", "002544.XSHE", "002545.XSHE", "002546.XSHE", "002547.XSHE", "002548.XSHE", "002549.XSHE", "002550.XSHE", "002551.XSHE", "002552.XSHE", "002553.XSHE", "002554.XSHE", "002555.XSHE", "002556.XSHE", "002557.XSHE", "002558.XSHE", "002559.XSHE", "002560.XSHE", "002561.XSHE", "002562.XSHE", "002563.XSHE", "002564.XSHE", "002565.XSHE", "002566.XSHE", "002567.XSHE", "002568.XSHE", "002569.XSHE", "002570.XSHE", "002571.XSHE", "002572.XSHE", "002573.XSHE", "002574.XSHE", "002575.XSHE", "002576.XSHE", "002577.XSHE", "002578.XSHE", "002579.XSHE", "002580.XSHE", "002581.XSHE", "002582.XSHE", "002583.XSHE", "002584.XSHE", "002585.XSHE", "002586.XSHE", "002587.XSHE", "002588.XSHE", "002589.XSHE", "002590.XSHE", "002591.XSHE", "002592.XSHE", "002593.XSHE", "002594.XSHE", "002595.XSHE", "002596.XSHE", "002597.XSHE", "002598.XSHE", "002599.XSHE", "002600.XSHE", "002601.XSHE", "002602.XSHE", "002603.XSHE", "002604.XSHE", "002605.XSHE", "002606.XSHE", "002607.XSHE", "002608.XSHE", "002609.XSHE", "002610.XSHE", "002611.XSHE", "002612.XSHE", "002613.XSHE", "002614.XSHE", "002615.XSHE", "002616.XSHE", "002617.XSHE", "002618.XSHE", "002619.XSHE", "002620.XSHE", "002621.XSHE", "002622.XSHE", "002623.XSHE", "002624.XSHE", "002625.XSHE", "002626.XSHE", "002627.XSHE", "002628.XSHE", "002629.XSHE", "002630.XSHE", "002631.XSHE", "002632.XSHE", "002633.XSHE", "002634.XSHE", "002635.XSHE", "002636.XSHE", "002637.XSHE", "002638.XSHE", "002639.XSHE", "002640.XSHE", "002641.XSHE", "002642.XSHE", "002643.XSHE", "002644.XSHE", "002645.XSHE", "002646.XSHE", "002647.XSHE", "002648.XSHE", "002649.XSHE", "002650.XSHE", "002651.XSHE", "002652.XSHE", "002653.XSHE", "002654.XSHE", "002655.XSHE", "002656.XSHE", "002657.XSHE", "002658.XSHE", "002659.XSHE", "002660.XSHE", "002661.XSHE", "002662.XSHE", "002663.XSHE", "002664.XSHE", "002665.XSHE", "002666.XSHE", "002667.XSHE", "002668.XSHE", "002669.XSHE", "002670.XSHE", "002671.XSHE", "002672.XSHE", "002673.XSHE", "002674.XSHE", "002675.XSHE", "002676.XSHE", "002677.XSHE", "002678.XSHE", "002679.XSHE", "002680.XSHE", "002681.XSHE", "002682.XSHE", "002683.XSHE", "002684.XSHE", "002685.XSHE", "002686.XSHE", "002687.XSHE", "002688.XSHE", "002689.XSHE", "002690.XSHE", "002691.XSHE", "002692.XSHE", "002693.XSHE", "002694.XSHE", "002695.XSHE", "002696.XSHE", "002697.XSHE", "002698.XSHE", "002699.XSHE", "002700.XSHE", "002701.XSHE", "002702.XSHE", "002703.XSHE", "002705.XSHE", "002706.XSHE", "002707.XSHE", "002708.XSHE", "002709.XSHE", "002711.XSHE", "002712.XSHE", "002713.XSHE", "002714.XSHE", "002715.XSHE", "002716.XSHE", "002717.XSHE", "002718.XSHE", "002719.XSHE", "002721.XSHE", "002722.XSHE", "002723.XSHE", "002724.XSHE", "002725.XSHE", "002726.XSHE", "002727.XSHE", "002728.XSHE", "002729.XSHE", "002730.XSHE", "002731.XSHE", "002732.XSHE", "002733.XSHE", "002734.XSHE", "002735.XSHE", "002736.XSHE", "002737.XSHE", "002738.XSHE", "002739.XSHE", "002740.XSHE", "002741.XSHE", "002742.XSHE", "002743.XSHE", "002745.XSHE", "002746.XSHE", "002747.XSHE", "002748.XSHE", "002749.XSHE", "002750.XSHE", "002751.XSHE", "002752.XSHE", "200011.XSHE", "200012.XSHE", "200016.XSHE", "200017.XSHE", "200018.XSHE", "200019.XSHE", "200020.XSHE", "200022.XSHE", "200024.XSHE", "200025.XSHE", "200026.XSHE", "200028.XSHE", "200029.XSHE", "200030.XSHE", "200037.XSHE", "200045.XSHE", "200053.XSHE", "200054.XSHE", "200055.XSHE", "200056.XSHE", "200058.XSHE", "200152.XSHE", "200160.XSHE", "200168.XSHE", "200413.XSHE", "200418.XSHE", "200429.XSHE", "200468.XSHE", "200488.XSHE", "200505.XSHE", "200512.XSHE", "200521.XSHE", "200530.XSHE", "200539.XSHE", "200541.XSHE", "200550.XSHE", "200553.XSHE", "200570.XSHE", "200581.XSHE", "200596.XSHE", "200613.XSHE", "200625.XSHE", "200706.XSHE", "200725.XSHE", "200726.XSHE", "200761.XSHE", "200770.XSHE", "200771.XSHE", "200869.XSHE", "200986.XSHE", "200992.XSHE", "300001.XSHE", "300002.XSHE", "300003.XSHE", "300004.XSHE", "300005.XSHE", "300006.XSHE", "300007.XSHE", "300008.XSHE", "300009.XSHE", "300010.XSHE", "300011.XSHE", "300012.XSHE", "300013.XSHE", "300014.XSHE", "300015.XSHE", "300016.XSHE", "300017.XSHE", "300018.XSHE", "300019.XSHE", "300020.XSHE", "300021.XSHE", "300022.XSHE", "300023.XSHE", "300024.XSHE", "300025.XSHE", "300026.XSHE", "300027.XSHE", "300028.XSHE", "300029.XSHE", "300030.XSHE", "300031.XSHE", "300032.XSHE", "300033.XSHE", "300034.XSHE", "300035.XSHE", "300036.XSHE", "300037.XSHE", "300038.XSHE", "300039.XSHE", "300040.XSHE", "300041.XSHE", "300042.XSHE", "300043.XSHE", "300044.XSHE", "300045.XSHE", "300046.XSHE", "300047.XSHE", "300048.XSHE", "300049.XSHE", "300050.XSHE", "300051.XSHE", "300052.XSHE", "300053.XSHE", "300054.XSHE", "300055.XSHE", "300056.XSHE", "300057.XSHE", "300058.XSHE", "300059.XSHE", "300061.XSHE", "300062.XSHE", "300063.XSHE", "300064.XSHE", "300065.XSHE", "300066.XSHE", "300067.XSHE", "300068.XSHE", "300069.XSHE", "300070.XSHE", "300071.XSHE", "300072.XSHE", "300073.XSHE", "300074.XSHE", "300075.XSHE", "300076.XSHE", "300077.XSHE", "300078.XSHE", "300079.XSHE", "300080.XSHE", "300081.XSHE", "300082.XSHE", "300083.XSHE", "300084.XSHE", "300085.XSHE", "300086.XSHE", "300087.XSHE", "300088.XSHE", "300089.XSHE", "300090.XSHE", "300091.XSHE", "300092.XSHE", "300093.XSHE", "300094.XSHE", "300095.XSHE", "300096.XSHE", "300097.XSHE", "300098.XSHE", "300099.XSHE", "300100.XSHE", "300101.XSHE", "300102.XSHE", "300103.XSHE", "300104.XSHE", "300105.XSHE", "300106.XSHE", "300107.XSHE", "300108.XSHE", "300109.XSHE", "300110.XSHE", "300111.XSHE", "300112.XSHE", "300113.XSHE", "300114.XSHE", "300115.XSHE", "300116.XSHE", "300117.XSHE", "300118.XSHE", "300119.XSHE", "300120.XSHE", "300121.XSHE", "300122.XSHE", "300123.XSHE", "300124.XSHE", "300125.XSHE", "300126.XSHE", "300127.XSHE", "300128.XSHE", "300129.XSHE", "300130.XSHE", "300131.XSHE", "300132.XSHE", "300133.XSHE", "300134.XSHE", "300135.XSHE", "300136.XSHE", "300137.XSHE", "300138.XSHE", "300139.XSHE", "300140.XSHE", "300141.XSHE", "300142.XSHE", "300143.XSHE", "300144.XSHE", "300145.XSHE", "300146.XSHE", "300147.XSHE", "300148.XSHE", "300149.XSHE", "300150.XSHE", "300151.XSHE", "300152.XSHE", "300153.XSHE", "300154.XSHE", "300155.XSHE", "300156.XSHE", "300157.XSHE", "300158.XSHE", "300159.XSHE", "300160.XSHE", "300161.XSHE", "300162.XSHE", "300163.XSHE", "300164.XSHE", "300165.XSHE", "300166.XSHE", "300167.XSHE", "300168.XSHE", "300169.XSHE", "300170.XSHE", "300171.XSHE", "300172.XSHE", "300173.XSHE", "300174.XSHE", "300175.XSHE", "300176.XSHE", "300177.XSHE", "300178.XSHE", "300179.XSHE", "300180.XSHE", "300181.XSHE", "300182.XSHE", "300183.XSHE", "300184.XSHE", "300185.XSHE", "300186.XSHE", "300187.XSHE", "300188.XSHE", "300189.XSHE", "300190.XSHE", "300191.XSHE", "300192.XSHE", "300193.XSHE", "300194.XSHE", "300195.XSHE", "300196.XSHE", "300197.XSHE", "300198.XSHE", "300199.XSHE", "300200.XSHE", "300201.XSHE", "300202.XSHE", "300203.XSHE", "300204.XSHE", "300205.XSHE", "300206.XSHE", "300207.XSHE", "300208.XSHE", "300209.XSHE", "300210.XSHE", "300211.XSHE", "300212.XSHE", "300213.XSHE", "300214.XSHE", "300215.XSHE", "300216.XSHE", "300217.XSHE", "300218.XSHE", "300219.XSHE", "300220.XSHE", "300221.XSHE", "300222.XSHE", "300223.XSHE", "300224.XSHE", "300225.XSHE", "300226.XSHE", "300227.XSHE", "300228.XSHE", "300229.XSHE", "300230.XSHE", "300231.XSHE", "300232.XSHE", "300233.XSHE", "300234.XSHE", "300235.XSHE", "300236.XSHE", "300237.XSHE", "300238.XSHE", "300239.XSHE", "300240.XSHE", "300241.XSHE", "300242.XSHE", "300243.XSHE", "300244.XSHE", "300245.XSHE", "300246.XSHE", "300247.XSHE", "300248.XSHE", "300249.XSHE", "300250.XSHE", "300251.XSHE", "300252.XSHE", "300253.XSHE", "300254.XSHE", "300255.XSHE", "300256.XSHE", "300257.XSHE", "300258.XSHE", "300259.XSHE", "300260.XSHE", "300261.XSHE", "300262.XSHE", "300263.XSHE", "300264.XSHE", "300265.XSHE", "300266.XSHE", "300267.XSHE", "300268.XSHE", "300269.XSHE", "300270.XSHE", "300271.XSHE", "300272.XSHE", "300273.XSHE", "300274.XSHE", "300275.XSHE", "300276.XSHE", "300277.XSHE", "300278.XSHE", "300279.XSHE", "300280.XSHE", "300281.XSHE", "300282.XSHE", "300283.XSHE", "300284.XSHE", "300285.XSHE", "300286.XSHE", "300287.XSHE", "300288.XSHE", "300289.XSHE", "300290.XSHE", "300291.XSHE", "300292.XSHE", "300293.XSHE", "300294.XSHE", "300295.XSHE", "300296.XSHE", "300297.XSHE", "300298.XSHE", "300299.XSHE", "300300.XSHE", "300301.XSHE", "300302.XSHE", "300303.XSHE", "300304.XSHE", "300305.XSHE", "300306.XSHE", "300307.XSHE", "300308.XSHE", "300309.XSHE", "300310.XSHE", "300311.XSHE", "300312.XSHE", "300313.XSHE", "300314.XSHE", "300315.XSHE", "300316.XSHE", "300317.XSHE", "300318.XSHE", "300319.XSHE", "300320.XSHE", "300321.XSHE", "300322.XSHE", "300323.XSHE", "300324.XSHE", "300325.XSHE", "300326.XSHE", "300327.XSHE", "300328.XSHE", "300329.XSHE", "300330.XSHE", "300331.XSHE", "300332.XSHE", "300333.XSHE", "300334.XSHE", "300335.XSHE", "300336.XSHE", "300337.XSHE", "300338.XSHE", "300339.XSHE", "300340.XSHE", "300341.XSHE", "300342.XSHE", "300343.XSHE", "300344.XSHE", "300345.XSHE", "300346.XSHE", "300347.XSHE", "300348.XSHE", "300349.XSHE", "300350.XSHE", "300351.XSHE", "300352.XSHE", "300353.XSHE", "300354.XSHE", "300355.XSHE", "300356.XSHE", "300357.XSHE", "300358.XSHE", "300359.XSHE", "300360.XSHE", "300362.XSHE", "300363.XSHE", "300364.XSHE", "300365.XSHE", "300366.XSHE", "300367.XSHE", "300368.XSHE", "300369.XSHE", "300370.XSHE", "300371.XSHE", "300372.XSHE", "300373.XSHE", "300374.XSHE", "300375.XSHE", "300376.XSHE", "300377.XSHE", "300378.XSHE", "300379.XSHE", "300380.XSHE", "300381.XSHE", "300382.XSHE", "300383.XSHE", "300384.XSHE", "300385.XSHE", "300386.XSHE", "300387.XSHE", "300388.XSHE", "300389.XSHE", "300390.XSHE", "300391.XSHE", "300392.XSHE", "300393.XSHE", "300394.XSHE", "300395.XSHE", "300396.XSHE", "300397.XSHE", "300398.XSHE", "300399.XSHE", "300400.XSHE", "300401.XSHE", "300402.XSHE", "300403.XSHE", "300404.XSHE", "300405.XSHE", "300406.XSHE", "300407.XSHE", "300408.XSHE", "300409.XSHE", "300410.XSHE", "300411.XSHE", "300412.XSHE", "300413.XSHE", "300414.XSHE", "300415.XSHE", "300416.XSHE", "300417.XSHE", "300418.XSHE", "300419.XSHE", "300420.XSHE", "300421.XSHE", "300422.XSHE", "300423.XSHE", "300424.XSHE", "300425.XSHE", "300426.XSHE", "300427.XSHE", "300428.XSHE", "300429.XSHE", "300430.XSHE", "300431.XSHE", "300432.XSHE", "300433.XSHE", "300434.XSHE", "300435.XSHE", "300436.XSHE", "300437.XSHE", "300438.XSHE", "300439.XSHE", "300440.XSHE", "300441.XSHE", "300442.XSHE", "300443.XSHE", "300444.XSHE", "300445.XSHE", "300446.XSHE", "300447.XSHE", "300448.XSHE", "300449.XSHE", "600000.XSHG", "600004.XSHG", "600005.XSHG", "600006.XSHG", "600007.XSHG", "600008.XSHG", "600009.XSHG", "600010.XSHG", "600011.XSHG", "600012.XSHG", "600015.XSHG", "600016.XSHG", "600017.XSHG", "600018.XSHG", "600019.XSHG", "600020.XSHG", "600021.XSHG", "600022.XSHG", "600023.XSHG", "600026.XSHG", "600027.XSHG", "600028.XSHG", "600029.XSHG", "600030.XSHG", "600031.XSHG", "600033.XSHG", "600035.XSHG", "600036.XSHG", "600037.XSHG", "600038.XSHG", "600039.XSHG", "600048.XSHG", "600050.XSHG", "600051.XSHG", "600052.XSHG", "600053.XSHG", "600054.XSHG", "600055.XSHG", "600056.XSHG", "600057.XSHG", "600058.XSHG", "600059.XSHG", "600060.XSHG", "600061.XSHG", "600062.XSHG", "600063.XSHG", "600064.XSHG", "600066.XSHG", "600067.XSHG", "600068.XSHG", "600069.XSHG", "600070.XSHG", "600071.XSHG", "600072.XSHG", "600073.XSHG", "600074.XSHG", "600075.XSHG", "600076.XSHG", "600077.XSHG", "600078.XSHG", "600079.XSHG", "600080.XSHG", "600081.XSHG", "600082.XSHG", "600083.XSHG", "600084.XSHG", "600085.XSHG", "600086.XSHG", "600088.XSHG", "600089.XSHG", "600090.XSHG", "600091.XSHG", "600093.XSHG", "600094.XSHG", "600095.XSHG", "600096.XSHG", "600097.XSHG", "600098.XSHG", "600099.XSHG", "600100.XSHG", "600101.XSHG", "600103.XSHG", "600104.XSHG", "600105.XSHG", "600106.XSHG", "600107.XSHG", "600108.XSHG", "600109.XSHG", "600110.XSHG", "600111.XSHG", "600112.XSHG", "600113.XSHG", "600114.XSHG", "600115.XSHG", "600116.XSHG", "600117.XSHG", "600118.XSHG", "600119.XSHG", "600120.XSHG", "600121.XSHG", "600122.XSHG", "600123.XSHG", "600125.XSHG", "600126.XSHG", "600127.XSHG", "600128.XSHG", "600129.XSHG", "600130.XSHG", "600131.XSHG", "600132.XSHG", "600133.XSHG", "600135.XSHG", "600136.XSHG", "600137.XSHG", "600138.XSHG", "600139.XSHG", "600141.XSHG", "600143.XSHG", "600145.XSHG", "600146.XSHG", "600148.XSHG", "600149.XSHG", "600150.XSHG", "600151.XSHG", "600152.XSHG", "600153.XSHG", "600155.XSHG", "600156.XSHG", "600157.XSHG", "600158.XSHG", "600159.XSHG", "600160.XSHG", "600161.XSHG", "600162.XSHG", "600163.XSHG", "600165.XSHG", "600166.XSHG", "600167.XSHG", "600168.XSHG", "600169.XSHG", "600170.XSHG", "600171.XSHG", "600172.XSHG", "600173.XSHG", "600175.XSHG", "600176.XSHG", "600177.XSHG", "600178.XSHG", "600179.XSHG", "600180.XSHG", "600182.XSHG", "600183.XSHG", "600184.XSHG", "600185.XSHG", "600186.XSHG", "600187.XSHG", "600188.XSHG", "600189.XSHG", "600190.XSHG", "600191.XSHG", "600192.XSHG", "600193.XSHG", "600195.XSHG", "600196.XSHG", "600197.XSHG", "600198.XSHG", "600199.XSHG", "600200.XSHG", "600201.XSHG", "600202.XSHG", "600203.XSHG", "600206.XSHG", "600207.XSHG", "600208.XSHG", "600209.XSHG", "600210.XSHG", "600211.XSHG", "600212.XSHG", "600213.XSHG", "600215.XSHG", "600216.XSHG", "600217.XSHG", "600218.XSHG", "600219.XSHG", "600220.XSHG", "600221.XSHG", "600222.XSHG", "600223.XSHG", "600225.XSHG", "600226.XSHG", "600227.XSHG", "600228.XSHG", "600229.XSHG", "600230.XSHG", "600231.XSHG", "600232.XSHG", "600233.XSHG", "600234.XSHG", "600235.XSHG", "600236.XSHG", "600237.XSHG", "600238.XSHG", "600239.XSHG", "600240.XSHG", "600241.XSHG", "600242.XSHG", "600243.XSHG", "600246.XSHG", "600247.XSHG", "600248.XSHG", "600249.XSHG", "600250.XSHG", "600251.XSHG", "600252.XSHG", "600255.XSHG", "600256.XSHG", "600257.XSHG", "600258.XSHG", "600259.XSHG", "600260.XSHG", "600261.XSHG", "600262.XSHG", "600265.XSHG", "600266.XSHG", "600267.XSHG", "600268.XSHG", "600269.XSHG", "600270.XSHG", "600271.XSHG", "600272.XSHG", "600273.XSHG", "600275.XSHG", "600276.XSHG", "600277.XSHG", "600278.XSHG", "600279.XSHG", "600280.XSHG", "600281.XSHG", "600282.XSHG", "600283.XSHG", "600284.XSHG", "600285.XSHG", "600287.XSHG", "600288.XSHG", "600289.XSHG", "600290.XSHG", "600291.XSHG", "600292.XSHG", "600293.XSHG", "600295.XSHG", "600297.XSHG", "600298.XSHG", "600299.XSHG", "600300.XSHG", "600301.XSHG", "600302.XSHG", "600303.XSHG", "600305.XSHG", "600306.XSHG", "600307.XSHG", "600308.XSHG", "600309.XSHG", "600310.XSHG", "600311.XSHG", "600312.XSHG", "600313.XSHG", "600315.XSHG", "600316.XSHG", "600317.XSHG", "600318.XSHG", "600319.XSHG", "600320.XSHG", "600321.XSHG", "600322.XSHG", "600323.XSHG", "600325.XSHG", "600326.XSHG", "600327.XSHG", "600328.XSHG", "600329.XSHG", "600330.XSHG", "600331.XSHG", "600332.XSHG", "600333.XSHG", "600335.XSHG", "600336.XSHG", "600337.XSHG", "600338.XSHG", "600339.XSHG", "600340.XSHG", "600343.XSHG", "600345.XSHG", "600346.XSHG", "600348.XSHG", "600350.XSHG", "600351.XSHG", "600352.XSHG", "600353.XSHG", "600354.XSHG", "600355.XSHG", "600356.XSHG", "600358.XSHG", "600359.XSHG", "600360.XSHG", "600361.XSHG", "600362.XSHG", "600363.XSHG", "600365.XSHG", "600366.XSHG", "600367.XSHG", "600368.XSHG", "600369.XSHG", "600370.XSHG", "600371.XSHG", "600372.XSHG", "600373.XSHG", "600375.XSHG", "600376.XSHG", "600377.XSHG", "600378.XSHG", "600379.XSHG", "600380.XSHG", "600381.XSHG", "600382.XSHG", "600383.XSHG", "600385.XSHG", "600386.XSHG", "600387.XSHG", "600388.XSHG", "600389.XSHG", "600390.XSHG", "600391.XSHG", "600392.XSHG", "600393.XSHG", "600395.XSHG", "600396.XSHG", "600397.XSHG", "600398.XSHG", "600399.XSHG", "600400.XSHG", "600401.XSHG", "600403.XSHG", "600405.XSHG", "600406.XSHG", "600408.XSHG", "600409.XSHG", "600410.XSHG", "600415.XSHG", "600416.XSHG", "600418.XSHG", "600419.XSHG", "600420.XSHG", "600421.XSHG", "600422.XSHG", "600423.XSHG", "600425.XSHG", "600426.XSHG", "600428.XSHG", "600429.XSHG", "600432.XSHG", "600433.XSHG", "600435.XSHG", "600436.XSHG", "600438.XSHG", "600439.XSHG", "600444.XSHG", "600446.XSHG", "600448.XSHG", "600449.XSHG", "600452.XSHG", "600455.XSHG", "600456.XSHG", "600458.XSHG", "600459.XSHG", "600460.XSHG", "600461.XSHG", "600462.XSHG", "600463.XSHG", "600466.XSHG", "600467.XSHG", "600468.XSHG", "600469.XSHG", "600470.XSHG", "600475.XSHG", "600476.XSHG", "600477.XSHG", "600478.XSHG", "600479.XSHG", "600480.XSHG", "600481.XSHG", "600482.XSHG", "600483.XSHG", "600485.XSHG", "600486.XSHG", "600487.XSHG", "600488.XSHG", "600489.XSHG", "600490.XSHG", "600491.XSHG", "600493.XSHG", "600495.XSHG", "600496.XSHG", "600497.XSHG", "600498.XSHG", "600499.XSHG", "600500.XSHG", "600501.XSHG", "600502.XSHG", "600503.XSHG", "600505.XSHG", "600506.XSHG", "600507.XSHG", "600508.XSHG", "600509.XSHG", "600510.XSHG", "600511.XSHG", "600512.XSHG", "600513.XSHG", "600515.XSHG", "600516.XSHG", "600517.XSHG", "600518.XSHG", "600519.XSHG", "600520.XSHG", "600521.XSHG", "600522.XSHG", "600523.XSHG", "600525.XSHG", "600526.XSHG", "600527.XSHG", "600528.XSHG", "600529.XSHG", "600530.XSHG", "600531.XSHG", "600532.XSHG", "600533.XSHG", "600535.XSHG", "600536.XSHG", "600537.XSHG", "600538.XSHG", "600539.XSHG", "600540.XSHG", "600543.XSHG", "600545.XSHG", "600546.XSHG", "600547.XSHG", "600548.XSHG", "600549.XSHG", "600550.XSHG", "600551.XSHG", "600552.XSHG", "600555.XSHG", "600556.XSHG", "600557.XSHG", "600558.XSHG", "600559.XSHG", "600560.XSHG", "600561.XSHG", "600562.XSHG", "600563.XSHG", "600565.XSHG", "600566.XSHG", "600567.XSHG", "600568.XSHG", "600569.XSHG", "600570.XSHG", "600571.XSHG", "600572.XSHG", "600573.XSHG", "600575.XSHG", "600576.XSHG", "600577.XSHG", "600578.XSHG", "600579.XSHG", "600580.XSHG", "600581.XSHG", "600582.XSHG", "600583.XSHG", "600584.XSHG", "600585.XSHG", "600586.XSHG", "600587.XSHG", "600588.XSHG", "600589.XSHG", "600590.XSHG", "600592.XSHG", "600593.XSHG", "600594.XSHG", "600595.XSHG", "600596.XSHG", "600597.XSHG", "600598.XSHG", "600599.XSHG", "600600.XSHG", "600601.XSHG", "600602.XSHG", "600603.XSHG", "600604.XSHG", "600605.XSHG", "600606.XSHG", "600608.XSHG", "600609.XSHG", "600610.XSHG", "600611.XSHG", "600612.XSHG", "600613.XSHG", "600614.XSHG", "600615.XSHG", "600616.XSHG", "600617.XSHG", "600618.XSHG", "600619.XSHG", "600620.XSHG", "600621.XSHG", "600622.XSHG", "600623.XSHG", "600624.XSHG", "600626.XSHG", "600628.XSHG", "600629.XSHG", "600630.XSHG", "600633.XSHG", "600634.XSHG", "600635.XSHG", "600636.XSHG", "600637.XSHG", "600638.XSHG", "600639.XSHG", "600640.XSHG", "600641.XSHG", "600642.XSHG", "600643.XSHG", "600644.XSHG", "600645.XSHG", "600647.XSHG", "600648.XSHG", "600649.XSHG", "600650.XSHG", "600651.XSHG", "600652.XSHG", "600653.XSHG", "600654.XSHG", "600655.XSHG", "600656.XSHG", "600657.XSHG", "600658.XSHG", "600660.XSHG", "600661.XSHG", "600662.XSHG", "600663.XSHG", "600664.XSHG", "600665.XSHG", "600666.XSHG", "600667.XSHG", "600668.XSHG", "600671.XSHG", "600673.XSHG", "600674.XSHG", "600675.XSHG", "600676.XSHG", "600677.XSHG", "600678.XSHG", "600679.XSHG", "600680.XSHG", "600681.XSHG", "600682.XSHG", "600683.XSHG", "600684.XSHG", "600685.XSHG", "600686.XSHG", "600687.XSHG", "600688.XSHG", "600689.XSHG", "600690.XSHG", "600691.XSHG", "600692.XSHG", "600693.XSHG", "600694.XSHG", "600695.XSHG", "600696.XSHG", "600697.XSHG", "600698.XSHG", "600699.XSHG", "600701.XSHG", "600702.XSHG", "600703.XSHG", "600704.XSHG", "600705.XSHG", "600706.XSHG", "600707.XSHG", "600708.XSHG", "600710.XSHG", "600711.XSHG", "600712.XSHG", "600713.XSHG", "600714.XSHG", "600715.XSHG", "600716.XSHG", "600717.XSHG", "600718.XSHG", "600719.XSHG", "600720.XSHG", "600721.XSHG", "600722.XSHG", "600723.XSHG", "600724.XSHG", "600725.XSHG", "600726.XSHG", "600727.XSHG", "600728.XSHG", "600729.XSHG", "600730.XSHG", "600731.XSHG", "600732.XSHG", "600733.XSHG", "600734.XSHG", "600735.XSHG", "600736.XSHG", "600737.XSHG", "600738.XSHG", "600739.XSHG", "600740.XSHG", "600741.XSHG", "600742.XSHG", "600743.XSHG", "600744.XSHG", "600745.XSHG", "600746.XSHG", "600747.XSHG", "600748.XSHG", "600749.XSHG", "600750.XSHG", "600751.XSHG", "600753.XSHG", "600754.XSHG", "600755.XSHG", "600756.XSHG", "600757.XSHG", "600758.XSHG", "600759.XSHG", "600760.XSHG", "600761.XSHG", "600763.XSHG", "600764.XSHG", "600765.XSHG", "600766.XSHG", "600767.XSHG", "600768.XSHG", "600769.XSHG", "600770.XSHG", "600771.XSHG", "600773.XSHG", "600774.XSHG", "600775.XSHG", "600776.XSHG", "600777.XSHG", "600778.XSHG", "600779.XSHG", "600780.XSHG", "600781.XSHG", "600782.XSHG", "600783.XSHG", "600784.XSHG", "600785.XSHG", "600787.XSHG", "600789.XSHG", "600790.XSHG", "600791.XSHG", "600792.XSHG", "600793.XSHG", "600794.XSHG", "600795.XSHG", "600796.XSHG", "600797.XSHG", "600798.XSHG", "600800.XSHG", "600801.XSHG", "600802.XSHG", "600803.XSHG", "600804.XSHG", "600805.XSHG", "600806.XSHG", "600807.XSHG", "600808.XSHG", "600809.XSHG", "600810.XSHG", "600811.XSHG", "600812.XSHG", "600814.XSHG", "600815.XSHG", "600816.XSHG", "600817.XSHG", "600818.XSHG", "600819.XSHG", "600820.XSHG", "600821.XSHG", "600822.XSHG", "600823.XSHG", "600824.XSHG", "600825.XSHG", "600826.XSHG", "600827.XSHG", "600828.XSHG", "600829.XSHG", "600830.XSHG", "600831.XSHG", "600832.XSHG", "600833.XSHG", "600834.XSHG", "600835.XSHG", "600836.XSHG", "600837.XSHG", "600838.XSHG", "600839.XSHG", "600841.XSHG", "600843.XSHG", "600844.XSHG", "600845.XSHG", "600846.XSHG", "600847.XSHG", "600848.XSHG", "600850.XSHG", "600851.XSHG", "600853.XSHG", "600854.XSHG", "600855.XSHG", "600856.XSHG", "600857.XSHG", "600858.XSHG", "600859.XSHG", "600860.XSHG", "600861.XSHG", "600862.XSHG", "600863.XSHG", "600864.XSHG", "600865.XSHG", "600866.XSHG", "600867.XSHG", "600868.XSHG", "600869.XSHG", "600870.XSHG", "600871.XSHG", "600872.XSHG", "600873.XSHG", "600874.XSHG", "600875.XSHG", "600876.XSHG", "600877.XSHG", "600879.XSHG", "600880.XSHG", "600881.XSHG", "600882.XSHG", "600883.XSHG", "600884.XSHG", "600885.XSHG", "600886.XSHG", "600887.XSHG", "600888.XSHG", "600889.XSHG", "600890.XSHG", "600891.XSHG", "600892.XSHG", "600893.XSHG", "600894.XSHG", "600895.XSHG", "600896.XSHG", "600897.XSHG", "600898.XSHG", "600900.XSHG", "600917.XSHG", "600958.XSHG", "600959.XSHG", "600960.XSHG", "600961.XSHG", "600962.XSHG", "600963.XSHG", "600965.XSHG", "600966.XSHG", "600967.XSHG", "600969.XSHG", "600970.XSHG", "600971.XSHG", "600973.XSHG", "600975.XSHG", "600976.XSHG", "600978.XSHG", "600979.XSHG", "600980.XSHG", "600981.XSHG", "600982.XSHG", "600983.XSHG", "600984.XSHG", "600985.XSHG", "600986.XSHG", "600987.XSHG", "600988.XSHG", "600990.XSHG", "600992.XSHG", "600993.XSHG", "600995.XSHG", "600997.XSHG", "600998.XSHG", "600999.XSHG", "601000.XSHG", "601001.XSHG", "601002.XSHG", "601003.XSHG", "601005.XSHG", "601006.XSHG", "601007.XSHG", "601008.XSHG", "601009.XSHG", "601010.XSHG", "601011.XSHG", "601012.XSHG", "601015.XSHG", "601016.XSHG", "601018.XSHG", "601021.XSHG", "601028.XSHG", "601038.XSHG", "601058.XSHG", "601069.XSHG", "601088.XSHG", "601098.XSHG", "601099.XSHG", "601100.XSHG", "601101.XSHG", "601106.XSHG", "601107.XSHG", "601111.XSHG", "601113.XSHG", "601116.XSHG", "601117.XSHG", "601118.XSHG", "601126.XSHG", "601137.XSHG", "601139.XSHG", "601158.XSHG", "601166.XSHG", "601168.XSHG", "601169.XSHG", "601177.XSHG", "601179.XSHG", "601186.XSHG", "601188.XSHG", "601198.XSHG", "601199.XSHG", "601208.XSHG", "601216.XSHG", "601218.XSHG", "601222.XSHG", "601225.XSHG", "601226.XSHG", "601231.XSHG", "601233.XSHG", "601238.XSHG", "601258.XSHG", "601268.XSHG", "601288.XSHG", "601299.XSHG", "601311.XSHG", "601313.XSHG", "601318.XSHG", "601328.XSHG", "601333.XSHG", "601336.XSHG", "601339.XSHG", "601369.XSHG", "601377.XSHG", "601388.XSHG", "601390.XSHG", "601398.XSHG", "601515.XSHG", "601518.XSHG", "601519.XSHG", "601555.XSHG", "601558.XSHG", "601566.XSHG", "601567.XSHG", "601579.XSHG", "601588.XSHG", "601599.XSHG", "601600.XSHG", "601601.XSHG", "601607.XSHG", "601608.XSHG", "601616.XSHG", "601618.XSHG", "601628.XSHG", "601633.XSHG", "601636.XSHG", "601666.XSHG", "601668.XSHG", "601669.XSHG", "601677.XSHG", "601678.XSHG", "601688.XSHG", "601689.XSHG", "601699.XSHG", "601700.XSHG", "601717.XSHG", "601718.XSHG", "601727.XSHG", "601766.XSHG", "601777.XSHG", "601788.XSHG", "601789.XSHG", "601798.XSHG", "601799.XSHG", "601800.XSHG", "601801.XSHG", "601808.XSHG", "601818.XSHG", "601857.XSHG", "601866.XSHG", "601872.XSHG", "601877.XSHG", "601880.XSHG", "601886.XSHG", "601888.XSHG", "601890.XSHG", "601898.XSHG", "601899.XSHG", "601901.XSHG", "601908.XSHG", "601918.XSHG", "601919.XSHG", "601928.XSHG", "601929.XSHG", "601933.XSHG", "601939.XSHG", "601958.XSHG", "601965.XSHG", "601969.XSHG", "601988.XSHG", "601989.XSHG", "601991.XSHG", "601992.XSHG", "601996.XSHG", "601998.XSHG", "601999.XSHG", "603000.XSHG", "603001.XSHG", "603002.XSHG", "603003.XSHG", "603005.XSHG", "603006.XSHG", "603008.XSHG", "603009.XSHG", "603010.XSHG", "603011.XSHG", "603012.XSHG", "603015.XSHG", "603017.XSHG", "603018.XSHG", "603019.XSHG", "603020.XSHG", "603021.XSHG", "603025.XSHG", "603030.XSHG", "603077.XSHG", "603088.XSHG", "603099.XSHG", "603100.XSHG", "603111.XSHG", "603118.XSHG", "603123.XSHG", "603126.XSHG", "603128.XSHG", "603158.XSHG", "603166.XSHG", "603167.XSHG", "603168.XSHG", "603169.XSHG", "603188.XSHG", "603199.XSHG", "603222.XSHG", "603268.XSHG", "603288.XSHG", "603306.XSHG", "603308.XSHG", "603309.XSHG", "603315.XSHG", "603318.XSHG", "603328.XSHG", "603333.XSHG", "603338.XSHG", "603355.XSHG", "603366.XSHG", "603368.XSHG", "603369.XSHG", "603399.XSHG", "603456.XSHG", "603518.XSHG", "603519.XSHG", "603555.XSHG", "603558.XSHG", "603567.XSHG", "603588.XSHG", "603599.XSHG", "603600.XSHG", "603601.XSHG", "603606.XSHG", "603609.XSHG", "603611.XSHG", "603618.XSHG", "603636.XSHG", "603678.XSHG", "603686.XSHG", "603688.XSHG", "603698.XSHG", "603699.XSHG", "603703.XSHG", "603729.XSHG", "603766.XSHG", "603788.XSHG", "603789.XSHG", "603799.XSHG", "603806.XSHG", "603808.XSHG", "603818.XSHG", "603828.XSHG", "603869.XSHG", "603883.XSHG", "603889.XSHG", "603898.XSHG", "603899.XSHG", "603939.XSHG", "603969.XSHG", "603988.XSHG", "603993.XSHG", "603997.XSHG", "603998.XSHG", "900901.XSHG", "900902.XSHG", "900903.XSHG", "900904.XSHG", "900905.XSHG", "900906.XSHG", "900907.XSHG", "900908.XSHG", "900909.XSHG", "900910.XSHG", "900911.XSHG", "900912.XSHG", "900913.XSHG", "900914.XSHG", "900915.XSHG", "900916.XSHG", "900917.XSHG", "900918.XSHG", "900919.XSHG", "900920.XSHG", "900921.XSHG", "900922.XSHG", "900923.XSHG", "900924.XSHG", "900925.XSHG", "900926.XSHG", "900927.XSHG", "900928.XSHG", "900929.XSHG", "900930.XSHG", "900932.XSHG", "900933.XSHG", "900934.XSHG", "900935.XSHG", "900936.XSHG", "900937.XSHG", "900938.XSHG", "900939.XSHG", "900940.XSHG", "900941.XSHG", "900942.XSHG", "900943.XSHG", "900945.XSHG", "900946.XSHG", "900947.XSHG", "900948.XSHG", "900950.XSHG", "900951.XSHG", "900952.XSHG", "900953.XSHG", "900955.XSHG", "900956.XSHG", "900957.XSHG"] \ No newline at end of file diff --git a/vn.datayes/prepare.sh b/vn.datayes/prepare.sh new file mode 100755 index 00000000..61470ff7 --- /dev/null +++ b/vn.datayes/prepare.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +dir_n=names +if [ ! -d $dir_n ]; then + mkdir $dir_n +fi + +dir_c=config +if [ ! -d $dir_c ]; then + mkdir $dir_c +fi + +echo [vn-past]: Configuration starts. + +python - << EOF + +from storage import * +import pandas as pd +import os +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) + +mc._collNames['equTicker'] = mc._allEquTickers() +print '[MONGOD]: Equity tickers collected.' + +mc._collNames['secID'] = mc._allSecIds() +print '[MONGOD]: Security IDs collected.' + +mc._collNames['futTicker'] = mc._allFutTickers() +print '[MONGOD]: Future tickers collected.' + +mc._collNames['optTicker'] = mc._allOptTickers() +print '[MONGOD]: Option symbols collected.' + +mc._collNames['fudTicker'] = mc._allFudTickers() +print '[MONGOD]: Mutual Fund symbols collected.' + +mc._collNames['idxTicker'] = mc._allIdxTickers() +print '[MONGOD]: Index symbols collected.' + +mc._ensure_index() + +EOF + + +echo [vn-past]: Configuration finished. +echo [vn-past]: Selected databases: +cd ./names +ls -l + +echo [vn-past]: Prepare to construct[c]/update[u] databases... + +read -r -p "[vn-past]: Waiting for orders[c/u]: " response +if [[ $response =~ ^([uU][pP][dD][aA][tT][eE]|[uU])$ ]] +then + echo [API]: Prepare to update data... + read -r -p "[API]: Confirm? [y/N] " response + if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]] + then + cd - + chmod +x update.sh + ./update.sh + + else + echo [vn-past]: Do not update. + : + fi + +else + echo [API]: Prepare to download Bars... + read -r -p "[API]: Confirm? [y/N] " response + if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]] + then + cd - + chmod +x download.sh + ./download.sh + + else + echo [vn-past]: Do not download. + : + fi +fi +echo [vn-past]: Finished. \ No newline at end of file diff --git a/vn.datayes/storage.py b/vn.datayes/storage.py new file mode 100644 index 00000000..ed86a9e1 --- /dev/null +++ b/vn.datayes/storage.py @@ -0,0 +1,657 @@ +import os +import json +import pymongo +import pandas as pd + +from datetime import datetime, timedelta +from api import Config, PyApi +from api import BaseDataContainer, History, Bar + +from errors import (VNPAST_ConfigError, VNPAST_RequestError, +VNPAST_DataConstructorError, VNPAST_DatabaseError) + +class DBConfig(Config): + """ + Json-like config object; inherits from Config() + + Contains all kinds of settings relating to database settings. + + privates + -------- + Inherited from api.Config, plus: + + * client: pymongo.MongoClient object, the connection + that is to be used for this session. + * body: dictionary; the main content of config. + + - client: pymongo.MongoClient(), refers to self.client. + + - dbs: dictionary, is a mapping from database alias + to another dictionary, which inclues configurations + and themselves(i.e. pymongo.database entity) + Concretely, dbs has the structure like: + { + alias1 : { + 'self': client[dbName1], + 'index': dbIndex1, + 'collNames': collectionNameType1 + }, + alias2 : { + 'self': client[dbName2], + 'index': dbIndex2, + 'collNames': collectionNameType2 + }, ... + } + where alias#: string; + dbs.alias#.self: pymongo.database; + dbs.alias#.index: string; + dbs.alias#.collNames: string; + + - dbNames: list; a list of database alias. + + """ + head = 'DB config' + + client = pymongo.MongoClient() + body = { + 'client': client, + 'dbs': { + 'EQU_M1': { + 'self': client['DATAYES_EQUITY_M1'], + 'index': 'dateTime', + 'collNames': 'secID' + }, + 'EQU_D1': { + 'self': client['DATAYES_EQUITY_D1'], + 'index': 'date', + 'collNames': 'equTicker' + }, + 'FUT_D1': { + 'self': client['DATAYES_FUTURE_D1'], + 'index': 'date', + 'collNames': 'futTicker' + }, + 'OPT_D1': { + 'self': client['DATAYES_OPTION_D1'], + 'index': 'date', + 'collNames': 'optTicker' + }, + 'FUD_D1': { + 'self': client['DATAYES_FUND_D1'], + 'index': 'date', + 'collNames': 'fudTicker' + }, + 'IDX_D1': { + 'self': client['DATAYES_INDEX_D1'], + 'index': 'date', + 'collNames': 'idxTicker' + } + }, + 'dbNames': ['EQU_M1', 'EQU_D1', 'FUT_D1', + 'OPT_D1', 'FUD_D1', 'IDX_D1'] + } + + def __init__(self, head=None, token=None, body=None): + """ + Inherited constructor. + + parameters + ---------- + * head: string; the name of config file. Default is None. + * token: string; user's token. + * body: dictionary; the main content of config + """ + super(DBConfig, self).__init__(head, token, body) + + def view(self): + """ Reloaded Prettify printing method. """ + config_view = { + 'dbConfig_head' : self.head, + 'dbConfig_body' : str(self.body), + } + print json.dumps(config_view, + indent=4, + sort_keys=True) + +#---------------------------------------------------------------------- +# MongoDB Controller class + +class MongodController(object): + """ + The MongoDB controller interface. + + MongodController is initialized with a DBConfig configuration + object and a PyApi object, which has already been contructed with + its own Config json. The default version of constructor actually + does nothing special about the database. Yet if user executes shell + script prepare.sh to prepare the connection, MongodController will + firstly gather symbols that are going to become collection names + in corresponding databases. This process is done one database by another, + user can skip useless databases by editing the scripts. + Then, it ensures the index of each collection due to the 'index' value + in DBConfig.body.dbs. Concretely, for D1 bars, the index will be 'date', + and for intraday bars, it will be 'dateTime'; both take the form of + datetime.datetime timestamp. + + download() and update() methods of controller dynamically construct + and maintain the databases, requesting data via PyApi. Once the database + is constructed, MongodController can access required data via its fetch() + method. + + + privates + -------- + * _config: DBConfig object; a container of all useful settings for the + databases. + + * _api: PyApi object; is responsible for making requests. + + * _client: pymongo.MongoClient object; the connection to MongoDB. + + * _dbs: dictionary; a mapping from database names to another dictionary, + which includes configurations of the database and the pymongo.database + entity. Inherited from _config.body.['dbs']. Note that keys + self._dbs are mere strings, only self._dbs[key]['self'] refers to the + pymongo.Database object. + + * _dbNames: list; a list of names of databases. + + * _collNames: dictionary; mapping from self._db[key]['collNames'] attribute + to the names of collections(i.e. tickers) within. + - example: _collNames['equTicker'] = ['000001', '000002', ...] + + * _connected: boolean; whether the MongoClient was connected to or not. + + * _mapTickersToSecIDs: dictionary; mapping from stock tickers to + its security ID. + + + example + ------- + >> myApi = PyApi(Config()) + >> mydbs = DBConfig() + >> controller = MongodController(mydbs, myApi) + >> controller._get_coll_names() + >> controller._ensure_index() + >> controller.download_equity_D1(20130101, 20150801) + >> controller.update_equity_D1() + + """ + _config = DBConfig() + _api = None + + _client = None + _dbs = None + _dbNames = [] + _collNames = dict() + _connected = False + + _mapTickersToSecIDs = dict() + + def __init__(self, config, api): + """ + Constructor. + + parameters + ---------- + * config: DBConfig object; specifies database configs. + * api: PyApi object. + + """ + self._api = api # Set Datayes PyApi. + if config.body: + try: + self._config = config.body + self._client = config.body['client'] + self._dbs = config.body['dbs'] + self._dbNames = config.body['dbNames'] + self._connected = True + except KeyError: + msg = '[MONGOD]: Unable to configure database; ' + \ + 'config file is incomplete.' + raise VNPAST_ConfigError(msg) + except Exception,e: + msg = '[MONGOD]: Unable to configure database; ' + str(e) + raise VNPAST_ConfigError(msg) + + if self._connected: + #self._get_coll_names() + #self._ensure_index() + pass + + def view(self): + """ + NOT IMPLEMENTED + """ + return + + #---------------------------------------------------------------------- + # Get collection names methods. + + """ + Decorator; + Targeting at path dName, if exists, read data from this file; + if not, execute handle() which returns a json-like data and + stores the data at dName path. + + parameters + ---------- + * dName: string; the specific path of file that __md looks at. + """ + def __md(dName): + def _md(get): + def handle(*args, **kwargs): + try: + if os.path.isfile(dName): + # if directory exists, read from it. + jsonFile = open(dName,'r') + data = json.loads(jsonFile.read()) + jsonFile.close() + else: + # if not, get data via *get method, + # then write to the file. + data = get(*args, **kwargs) + jsonFile = open(dName, 'w+') + jsonFile.write(json.dumps(data)) + jsonFile.close() + #print data + return data + except Exception,e: + raise e + return handle + return _md + + @__md('names/equTicker.json') + def _allEquTickers(self): + """get all equity tickers, decorated by @__md().""" + data = self._api.get_equity_D1() + allEquTickers = list(data.body['ticker']) + return allEquTickers + + @__md('names/secID.json') + def _allSecIds(self): + """get all security IDs, decorated by @__md().""" + data = self._api.get_equity_D1() + allTickers = list(data.body['ticker']) + exchangeCDs = list(data.body['exchangeCD']) + allSecIds = [allTickers[k]+'.'+exchangeCDs[k] for k in range( + len(allTickers))] + return allSecIds + + @__md('names/futTicker.json') + def _allFutTickers(self): + """get all future tickers, decorated by @__md().""" + data = self._api.get_future_D1() + allFutTickers = list(data.body['ticker']) + return allFutTickers + + @__md('names/optTicker.json') + def _allOptTickers(self): + """get all option tickers, decorated by @__md().""" + data = self._api.get_option_D1() + allOptTickers = list(data.body['ticker']) + return allOptTickers + + @__md('names/fudTicker.json') + def _allFudTickers(self): + """get all fund tickers, decorated by @__md().""" + data = self._api.get_fund_D1() + allFudTickers = list(data.body['ticker']) + return allFudTickers + + @__md('names/idxTicker.json') + def _allIdxTickers(self): + """get all index tickers, decorated by @__md().""" + data = self._api.get_index_D1() + allIdxTickers = list(data.body['ticker']) + return allIdxTickers + + @__md('names/bndTicker.json') + def _allBndTickers(self): + """get all bond tickers, decorated by @__md().""" + data = self._api.get_bond_D1() + allBndTickers = list(data.body['ticker']) + return allBndTickers + + def _get_coll_names(self): + """ + get all instruments'names and store them in self._collNames. + + """ + try: + if not os.path.exists('names'): + os.makedirs('names') + + self._collNames['equTicker'] = self._allEquTickers() + self._collNames['fudTicker'] = self._allFudTickers() + self._collNames['secID'] = self._allSecIds() + self._collNames['futTicker'] = self._allFutTickers() + self._collNames['optTicker'] = self._allOptTickers() + self._collNames['idxTicker'] = self._allIdxTickers() + + print '[MONGOD]: Collection names gotten.' + return 1 + except AssertionError: + warning = '[MONGOD]: Warning, collection names ' + \ + 'is an empty list.' + print warning + except Exception, e: + msg = '[MONGOD]: Unable to set collection names; ' + \ + str(e) + raise VNPAST_DatabaseError(msg) + + #---------------------------------------------------------------------- + # Ensure collection index method. + + def _ensure_index(self): + """ + Ensure indices for all databases and collections. + + first access self._dbs config to get index column names; + then get collection names from self._collNames and loop + over all collections. + + """ + if self._collNames and self._dbs: + try: + for dbName in self._dbs: + # Iterate over database configurations. + + db = self._dbs[dbName] + dbSelf = db['self'] + index = db['index'] + collNames = self._collNames[db['collNames']] + # db['self'] is the pymongo.Database object. + + for name in collNames: + coll = dbSelf[name] + coll.ensure_index([(index, + pymongo.DESCENDING)], unique=True) + print '[MONGOD]: MongoDB index set.' + return 1 + except KeyError: + msg = '[MONGOD]: Unable to set collection indices; ' + \ + 'infomation in Config.body["dbs"] is incomplete.' + raise VNPAST_DatabaseError(msg) + except Exception, e: + msg = '[MONGOD]: Unable to set collection indices; ' + str(e) + raise VNPAST_DatabaseError(msg) + + #---------------------------------------------------------------------- + # Download method. + + def download_equity_D1(self, start, end, sessionNum=30): + """ + + """ + try: + db = self._dbs['EQU_D1']['self'] + self._api.get_equity_D1_mongod(db, start, end, sessionNum) + except Exception, e: + msg = '[MONGOD]: Unable to download data; ' + str(e) + raise VNPAST_DatabaseError(msg) + + def download_equity_M1(self, tasks, startYr=2012, endYr=2015): + """ + + """ + + try: + # map equity tickers to security IDs. + if self._mapTickersToSecIDs: + maps = self._mapTickersToSecIDs + else: + assert os.isfile('./names/secID.json') + jsonFile = open(dName,'r') + allSecIds = json.loads(jsonFile.read()) + jsonFile.close() + allTickers = [s.split('.')[0] for s in allSecIds] + maps = dict(zip(allTickers, allSecIds)) + self._mapTickersToSecIDs = maps + tasks_ = [maps[task] for task in tasks] + + db = self._dbs['EQU_M1']['self'] + self._api.get_equity_M1_interMonth(db, id=1, + startYr = startYr, + endYr = endYr, + tasks = tasks_) + except AssertionError: + msg = '[MONGOD]: Cannot map tickers to secIDs; ' + \ + 'secID.json does not exist.' + raise VNPAST_DatabaseError(msg) + except Exception, e: + msg = '[MONGOD]: Unable to download data; ' + str(e) + raise VNPAST_DatabaseError(msg) + + def download_bond_D1(self, start, end, sessionNum=30): + """ + + """ + pass + + def download_future_D1(self, start, end, sessionNum=30): + """ + + """ + try: + db = self._dbs['FUT_D1']['self'] + self._api.get_future_D1_mongod(db, start, end, sessionNum) + except Exception, e: + msg = '[MONGOD]: Unable to download data; ' + str(e) + raise VNPAST_DatabaseError(msg) + + def download_option_D1(self, start, end, sessionNum=30): + """ + + """ + try: + db = self._dbs['OPT_D1']['self'] + self._api.get_option_D1_mongod(db, start, end, sessionNum) + except Exception, e: + msg = '[MONGOD]: Unable to download data; ' + str(e) + raise VNPAST_DatabaseError(msg) + + def download_index_D1(self, start, end, sessionNum=30): + """ + + """ + try: + db = self._dbs['IDX_D1']['self'] + self._api.get_index_D1_mongod(db, start, end, sessionNum) + except Exception, e: + msg = '[MONGOD]: Unable to download data; ' + str(e) + raise VNPAST_DatabaseError(msg) + + def download_fund_D1(self, start, end, sessionNum=30): + """ + + """ + try: + db = self._dbs['FUD_D1']['self'] + self._api.get_fund_D1_mongod(db, start, end, sessionNum) + except Exception, e: + msg = '[MONGOD]: Unable to download data; ' + str(e) + raise VNPAST_DatabaseError(msg) + + #---------------------------------------------------------------------- + # Update methods. + + def __update(self, key, target1, target2, sessionNum): + """ + Basic update method. + Looks into the database specified by 'key', find the latest + record in the collection of it. Then update the collections + till last trading date. + + parameters + ---------- + * key: string; a database alias (refer to the database config) + e.g., 'EQU_D1'. + * target1: method; pointer to the function with which controller + obtain all tickers in the database. Concretely, target1 are + self._all#Tickers methods. + * target2: method; pointer to the api overlord requesting functions + i.e. self._api.get_###_mongod methods. + * sessionNum: integer; the number of threads. + + """ + try: + # get databases and tickers + db = self._dbs[key]['self'] + index = self._dbs[key]['index'] + allTickers = target1() + coll = db[allTickers[0]] + + # find the latest timestamp in collection. + latest = coll.find_one( + sort=[(index, pymongo.DESCENDING)])[index] + start = datetime.strftime( + latest + timedelta(days=1),'%Y%m%d') + end = datetime.strftime(datetime.now(), '%Y%m%d') + + # then download. + target2(db, start, end, sessionNum) + return db + + except Exception, e: + msg = '[MONGOD]: Unable to update data; ' + str(e) + raise VNPAST_DatabaseError(msg) + + + def update_equity_D1(self, sessionNum=30): + """ + + """ + db = self.__update(key = 'EQU_D1', + target1 = self._allEquTickers, + target2 = self._api.get_equity_D1_mongod, + sessionNum = sessionNum) + return db + + def update_future_D1(self, sessionNum=30): + """ + + """ + db = self.__update(key = 'FUT_D1', + target1 = self._allFutTickers, + target2 = self._api.get_future_D1_mongod, + sessionNum = sessionNum) + return db + + def update_option_D1(self, sessionNum=30): + """ + + """ + db = self.__update(key = 'OPT_D1', + target1 = self._allOptTickers, + target2 = self._api.get_option_D1_mongod, + sessionNum = sessionNum) + return db + + def update_index_D1(self, sessionNum=30): + """ + + """ + db = self.__update(key = 'IDX_D1', + target1 = self._allIdxTickers, + target2 = self._api.get_index_D1_mongod, + sessionNum = sessionNum) + return db + + def update_fund_D1(self, sessionNum=30): + """ + + """ + db = self.__update(key = 'FUD_D1', + target1 = self._allFudTickers, + target2 = self._api.get_fund_D1_mongod, + sessionNum = sessionNum) + return db + + #----------------------------------------------------------------------# + # stuff that will be deprecated + + def update_equity_D1_(self, sessionNum=30): + """ + + """ + try: + # set databases and tickers + db = self._dbs['EQU_D1']['self'] + index = self._dbs['EQU_D1']['index'] + allEquTickers = self._allEquTickers() + coll = db[allEquTickers[0]] + + # find the latest timestamp in collection. + latest = coll.find_one( + sort=[(index, pymongo.DESCENDING)])[index] + start = datetime.strftime(latest + timedelta(days=1),'%Y%m%d') + end = datetime.strftime(datetime.now(), '%Y%m%d') + + # then download. + self._api.get_equity_D1_mongod(db, start, end, sessionNum) + + except Exception, e: + msg = '[MONGOD]: Unable to update data; ' + str(e) + raise VNPAST_DatabaseError(msg) + + def update_equity_M1(self): + """ + + """ + pass + + #---------------------------------------------------------------------- + # Fetch method. + + def fetch(self, dbName, ticker, start, end, output='list'): + """ + + """ + # check inputs' validity. + if output not in ['df', 'list', 'json']: + raise ValueError('[MONGOD]: Unsupported output type.') + if dbName not in self._dbNames: + raise ValueError('[MONGOD]: Unable to locate database name.') + + db = self._dbs[dbName] + dbSelf = db['self'] + dbIndex = db['index'] + try: + coll = db[ticker] + if len(start)==8 and len(end)==8: + # yyyymmdd, len()=8 + start = datetime.strptime(start, '%Y%m%d') + end = datetime.strptime(end, '%Y%m%d') + elif len(start)==14 and len(end)==14: + # yyyymmdd HH:MM, len()=14 + start = datetime.strptime(start, '%Y%m%d %H:%M') + end = datetime.strptime(end, '%Y%m%d %H:%M') + else: + pass + docs = [] + + # find in MongoDB. + for doc in coll.find(filter={dbIndex: {'$lte': end, + '$gte': start}}, projection={'_id': False}): + docs.append(doc) + + if output == 'list': + return docs[::-1] + + except Exception, e: + msg = '[MONGOD]: Error encountered when fetching data' + \ + 'from MongoDB; '+ str(e) + return -1 + +if __name__ == '__main__': + dc = DBConfig() + api = PyApi(Config()) + mc = MongodController(dc, api) + + mc.update_index_D1() + + + + + diff --git a/vn.datayes/tests.py b/vn.datayes/tests.py new file mode 100644 index 00000000..979dd4f6 --- /dev/null +++ b/vn.datayes/tests.py @@ -0,0 +1,119 @@ +from api import * + +def test_config(): + cfig = Config() + print cfig.body, cfig.head, cfig.token + cfig.view() + +def test_mktbar_D1(): + api = PyApi(Config()) + data = api.get_equity_D1() + print data.body + +def test_mktbar_M1(): + api = PyApi(Config()) + data = api.get_equity_M1() + print data.body.tail() + +def test_bond_D1(): + api = PyApi(Config()) + data = api.get_bond_D1() + print data.body.tail() + +def test_fut_D1(): + api = PyApi(Config()) + data = api.get_future_D1() + print data.body + +def test_fund_D1(): + api = PyApi(Config()) + data = api.get_fund_D1() + print data.body + +def test_index_D1(): + api = PyApi(Config()) + data = api.get_index_D1() + print data.body + +def test_option_D1(): + api = PyApi(Config()) + data = api.get_option_D1() + print data.body + +def test_factors_D1(): + api = PyApi(Config()) + data = api.get_stockFactor_D1() + print data.body + +def test_bs(): + api = PyApi(Config()) + data = api.get_balanceSheet() + print data.body + +def test_cf(): + api = PyApi(Config()) + data = api.get_cashFlow() + print data.body + +def test_is(): + api = PyApi(Config()) + data = api.get_incomeStatement() + print data.body + +def test_output(): + api = PyApi(Config()) + data = api.get_equity_D1(ticker='000001',output='list') + print data + +def test_mongod_get_drudgery(): + c = MongoClient() + db = c['test_dy'] + api = PyApi(Config()) + api.get_equity_D1_drudgery(id=1, db=db, + start='20130101', end='20150801', + tasks=['000001','000002']) + +def test_mongod_get_all(): + c = MongoClient() + db = c['test_dy'] + api = PyApi(Config()) + api.get_equity_D1_mongod(db=db, start='20130101', end='20150801') + +def test_mktbar_M1_get_drudgery(): + c = MongoClient() + db = c['test_dy_m1'] + api = PyApi(Config()) + api.get_equity_M1_drudgery(id=1, db=db, + start='20150701', end='20150801', + tasks=['000001.XSHE','000002.XSHE']) + +def test_mktbar_M1_get_all(): + c = MongoClient() + db = c['test_dy_m1'] + api = PyApi(Config()) + api.get_equity_M1_mongod(db=db) + +def test_mktbar_M1_get_interM(): + c = MongoClient() + db = c['test_dy_m1'] + api = PyApi(Config()) + api.get_equity_M1_interMonth(db=db, id=0, tasks=['000001.XSHE','000002.XSHE']) + +if __name__ == '__main__': + #test_config() + #test_mktbar_D1() + #test_bond_D1() + #test_fut_D1() + #test_fund_D1() + #test_index_D1() + #test_option_D1() + #test_factors_D1() + #test_mktbar_M1() + #test_bs() + #test_cf() + #test_is() + #test_output() + #test_mongod_get_all() + #test_mktbar_M1_get_drudgery() + #test_mktbar_M1_get_all() + test_mktbar_M1_get_interM() \ No newline at end of file diff --git a/vn.datayes/update.sh b/vn.datayes/update.sh new file mode 100755 index 00000000..6d51cf26 --- /dev/null +++ b/vn.datayes/update.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +echo [API]: Prepare to update DATAYES_FUTURE_D1... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.update_future_D1() +EOF +echo [API]: DATAYES_FUTURE_D1 updated. + +echo [API]: Prepare to update DATAYES_INDEX_D1... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.update_index_D1() +EOF +echo [API]: DATAYES_INDEX_D1 updated. + +echo [API]: Prepare to update DATAYES_OPTION_D1... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.update_option_D1() +EOF +echo [API]: DATAYES_OPTION_D1 updated. + +echo [API]: Prepare to update DATAYES_FUND_D1... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.update_fund_D1() +EOF +echo [API]: DATAYES_FUND_D1 updated. +echo [MONGOD]: Update finished. + +echo [API]: Prepare to update DATAYES_EQUITY_D1... +python - << EOF +from storage import * +dc = DBConfig() +api = PyApi(Config()) +mc = MongodController(dc, api) +mc.update_equity_D1() +EOF +echo [API]: DATAYES_EQUITY_D1 updated. \ No newline at end of file