Merge pull request #1699 from vnpy/master

[Merge] master -> dev
This commit is contained in:
vn.py 2019-05-15 12:07:29 +08:00 committed by GitHub
commit ed9949c7ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 5 deletions

View File

@ -51,6 +51,15 @@ vn.py是一套基于Python的开源量化交易系统开发框架于2015年1
* 1Token(onetoken):数字货币券商(现货、期货) * 1Token(onetoken):数字货币券商(现货、期货)
* OKEX (okex):数字货币现货
* HUOBI(huobi):数字货币现货
* Bitfinex(bitfinex):数字货币现货
* 1Token(onetoken):数字货币券商(现货、期货)
3. 开箱即用的各类量化策略交易应用vnpy.app 3. 开箱即用的各类量化策略交易应用vnpy.app
* cta_strategyCTA策略引擎模块在保持易用性的同时允许用户针对CTA类策略运行过程中委托的报撤行为进行细粒度控制降低交易滑点、实现高频策略 * cta_strategyCTA策略引擎模块在保持易用性的同时允许用户针对CTA类策略运行过程中委托的报撤行为进行细粒度控制降低交易滑点、实现高频策略

View File

@ -16,7 +16,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -58,6 +58,7 @@
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",

View File

@ -47,7 +47,7 @@ def main():
main_engine.add_gateway(OnetokenGateway) main_engine.add_gateway(OnetokenGateway)
main_engine.add_gateway(OkexfGateway) main_engine.add_gateway(OkexfGateway)
main_engine.add_gateway(HbdmGateway) main_engine.add_gateway(HbdmGateway)
main_engine.add_app(CtaStrategyApp) main_engine.add_app(CtaStrategyApp)
main_engine.add_app(CtaBacktesterApp) main_engine.add_app(CtaBacktesterApp)
main_engine.add_app(CsvLoaderApp) main_engine.add_app(CsvLoaderApp)

View File

@ -1 +1 @@
__version__ = "2.0.1" __version__ = "2.0.2"

View File

@ -339,7 +339,7 @@ class BacktesterEngine(BaseEngine):
self.write_log(f"{vt_symbol}-{interval}开始下载历史数据") self.write_log(f"{vt_symbol}-{interval}开始下载历史数据")
symbol, exchange = extract_vt_symbol(vt_symbol) symbol, exchange = extract_vt_symbol(vt_symbol)
req = HistoryRequest( req = HistoryRequest(
symbol=symbol, symbol=symbol,
exchange=exchange, exchange=exchange,

View File

@ -1163,7 +1163,6 @@ def load_tick_data(
symbol, exchange, start, end symbol, exchange, start, end
) )
# GA related global value # GA related global value
ga_end = None ga_end = None
ga_mode = None ga_mode = None

View File

@ -310,6 +310,7 @@ def init_models(db: Database, driver: Driver):
).execute() ).execute()
else: else:
for c in chunked(dicts, 50): for c in chunked(dicts, 50):
DbTickData.insert_many(c).on_conflict_replace().execute()
DbTickData.insert_many( DbTickData.insert_many(
c).on_conflict_replace().execute() c).on_conflict_replace().execute()