diff --git a/README.md b/README.md index 679cfff2..727090f8 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,15 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1 * 1Token(onetoken):数字货币券商(现货、期货) + * OKEX (okex):数字货币现货 + + * HUOBI(huobi):数字货币现货 + + * Bitfinex(bitfinex):数字货币现货 + + * 1Token(onetoken):数字货币券商(现货、期货) + + 3. 开箱即用的各类量化策略交易应用(vnpy.app): * cta_strategy:CTA策略引擎模块,在保持易用性的同时,允许用户针对CTA类策略运行过程中委托的报撤行为进行细粒度控制(降低交易滑点、实现高频策略) diff --git a/tests/backtesting/turtle.ipynb b/tests/backtesting/turtle.ipynb index a3a4db10..a7ef84f1 100644 --- a/tests/backtesting/turtle.ipynb +++ b/tests/backtesting/turtle.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -58,6 +58,7 @@ "metadata": { "scrolled": true }, + "outputs": [ { "name": "stdout", diff --git a/tests/trader/run.py b/tests/trader/run.py index 82b60deb..f1ffd168 100644 --- a/tests/trader/run.py +++ b/tests/trader/run.py @@ -47,7 +47,7 @@ def main(): main_engine.add_gateway(OnetokenGateway) main_engine.add_gateway(OkexfGateway) main_engine.add_gateway(HbdmGateway) - + main_engine.add_app(CtaStrategyApp) main_engine.add_app(CtaBacktesterApp) main_engine.add_app(CsvLoaderApp) diff --git a/vnpy/__init__.py b/vnpy/__init__.py index 159d48b8..0309ae29 100644 --- a/vnpy/__init__.py +++ b/vnpy/__init__.py @@ -1 +1 @@ -__version__ = "2.0.1" +__version__ = "2.0.2" diff --git a/vnpy/app/cta_backtester/engine.py b/vnpy/app/cta_backtester/engine.py index 7ed94fbf..dec4492b 100644 --- a/vnpy/app/cta_backtester/engine.py +++ b/vnpy/app/cta_backtester/engine.py @@ -339,7 +339,7 @@ class BacktesterEngine(BaseEngine): self.write_log(f"{vt_symbol}-{interval}开始下载历史数据") symbol, exchange = extract_vt_symbol(vt_symbol) - + req = HistoryRequest( symbol=symbol, exchange=exchange, diff --git a/vnpy/app/cta_strategy/backtesting.py b/vnpy/app/cta_strategy/backtesting.py index f901ef19..b463a8c4 100644 --- a/vnpy/app/cta_strategy/backtesting.py +++ b/vnpy/app/cta_strategy/backtesting.py @@ -1163,7 +1163,6 @@ def load_tick_data( symbol, exchange, start, end ) - # GA related global value ga_end = None ga_mode = None diff --git a/vnpy/trader/database/database_sql.py b/vnpy/trader/database/database_sql.py index b2a39460..6415c1bb 100644 --- a/vnpy/trader/database/database_sql.py +++ b/vnpy/trader/database/database_sql.py @@ -310,6 +310,7 @@ def init_models(db: Database, driver: Driver): ).execute() else: for c in chunked(dicts, 50): + DbTickData.insert_many(c).on_conflict_replace().execute() DbTickData.insert_many( c).on_conflict_replace().execute()