{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "from datetime import datetime\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "from turtleEngine import BacktestingEngine" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "16:05:52.965000:\t投资组合的合约代码['IF99', 'I99', 'CU99', 'TA99']\n", "16:05:52.966000:\t投资组合的初始价值10000000\n" ] } ], "source": [ "engine = BacktestingEngine()\n", "engine.setPeriod(datetime(2014, 1, 1), datetime(2018, 12, 30))\n", "engine.initPortfolio('test.csv', 10000000)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "16:05:53.031000:\tIF99数据加载完成,总数据量:1185\n", "16:05:53.064000:\tI99数据加载完成,总数据量:1185\n", "16:05:53.096000:\tCU99数据加载完成,总数据量:1185\n", "16:05:53.130000:\tTA99数据加载完成,总数据量:1185\n", "16:05:53.131000:\t全部数据加载完成\n", "16:05:53.131000:\t开始回放K线数据\n", "16:05:53.383000:\tK线数据回放结束\n", "16:05:53.383000:\t开始统计回测结果\n", "16:05:53.392000:\t回测结果统计结束\n" ] } ], "source": [ "engine.loadData()\n", "engine.runBacktesting()\n", "engine.calculateResult()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "44093646.23195201\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEDCAYAAADDbTRuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xl81NW9//HXyb5DgIQ97IssshhARLECKi7V1h2v1VZ7+d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b1cyHQHfgI5yfNR0A31/m9cNbAyoFS13ZWs+f8CtHfOyUo5cbZLrzW9bMB+EmkyxbO9xwYD6x0PdebQHakyxfGsqcBJUCXSJcrAmX/BbAZZ4XlL0BypMsXpnJ/hrOishaYGcjra9i9iEgM04hNEZEYpiQuIhLDlMRFRGKYkriISAxTEhcRiWFK4iIiMUxJXEQkhv1/vcSgaES5clcAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# 汇总每日盈亏,绘制简单资金曲线\n", "l = [result.totalPnl for result in engine.resultList]\n", "dateList = [result.date for result in engine.resultList]\n", "equity = np.cumsum(l)\n", "plt.plot(dateList, equity)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2014-04-03 00:00:00 IF99 多 开仓 2175.2 8\n", "2014-04-04 00:00:00 I99 多 开仓 803.5 52\n", "2014-04-08 00:00:00 IF99 多 开仓 2195.8 8\n", "2014-04-08 00:00:00 IF99 多 开仓 2216.2 8\n", "2014-04-08 00:00:00 IF99 多 开仓 2236.8 8\n", "2014-04-08 00:00:00 I99 多 开仓 813.5 52\n", "2014-04-08 00:00:00 I99 多 开仓 823.0 52\n", "2014-04-18 00:00:00 I99 空 平仓 784.5 156\n", "2014-04-21 00:00:00 TA99 空 开仓 6272.0 240\n", "2014-04-21 00:00:00 TA99 空 开仓 6230.0 240\n", "2014-04-22 00:00:00 IF99 空 平仓 2165.2 32\n", "2014-04-22 00:00:00 TA99 空 开仓 6190.0 240\n", "2014-04-24 00:00:00 CU99 多 开仓 47260.0 30\n", "2014-04-25 00:00:00 CU99 多 开仓 47590.0 30\n", "2014-04-25 00:00:00 CU99 多 开仓 47930.0 30\n", "2014-04-28 00:00:00 I99 空 开仓 758.0 58\n", "2014-05-05 00:00:00 IF99 空 开仓 2130.0 9\n", "2014-05-05 00:00:00 TA99 空 开仓 6148.0 240\n", "2014-05-07 00:00:00 I99 空 开仓 749.5 58\n", "2014-05-08 00:00:00 I99 空 开仓 740.5 58\n", "2014-05-09 00:00:00 I99 空 开仓 732.0 58\n", "2014-05-12 00:00:00 CU99 多 开仓 48260.0 30\n", "2014-05-15 00:00:00 TA99 多 平仓 6240.0 960\n", "2014-05-19 00:00:00 IF99 空 开仓 2111.8 9\n", "2014-05-19 00:00:00 IF99 空 开仓 2093.4 9\n", "2014-05-21 00:00:00 TA99 多 开仓 6324.0 252\n", "2014-05-21 00:00:00 TA99 多 开仓 6364.0 252\n", "2014-05-21 00:00:00 TA99 多 开仓 6402.0 252\n", "2014-05-23 00:00:00 TA99 多 开仓 6442.0 252\n", "2014-05-28 00:00:00 IF99 多 平仓 2166.8 27\n", "2014-06-05 00:00:00 CU99 空 平仓 47860.0 120\n", "2014-06-13 00:00:00 IF99 多 开仓 2176.2 11\n", "2014-06-16 00:00:00 IF99 多 开仓 2191.6 11\n", "2014-06-19 00:00:00 IF99 空 平仓 2129.6 22\n", "2014-06-23 00:00:00 I99 多 平仓 693.0 232\n", "2014-06-23 00:00:00 CU99 多 开仓 49310.0 38\n", "2014-06-26 00:00:00 CU99 多 开仓 49570.0 38\n", "2014-07-01 00:00:00 CU99 多 开仓 49830.0 38\n", "2014-07-01 00:00:00 CU99 多 开仓 50090.0 38\n", "2014-07-08 00:00:00 TA99 空 平仓 6986.0 1008\n", "2014-07-21 00:00:00 I99 空 开仓 679.5 71\n", "2014-07-22 00:00:00 IF99 多 开仓 2182.4 14\n", "2014-07-22 00:00:00 IF99 多 开仓 2194.0 14\n", "2014-07-23 00:00:00 IF99 多 开仓 2205.6 14\n", "2014-07-23 00:00:00 I99 空 开仓 673.5 71\n", "2014-07-24 00:00:00 IF99 多 开仓 2217.4 14\n", "2014-07-24 00:00:00 I99 空 开仓 666.5 71\n", "2014-08-05 00:00:00 I99 多 平仓 692.0 213\n", "2014-08-12 00:00:00 I99 空 开仓 665.5 86\n", "2014-08-14 00:00:00 I99 空 开仓 659.5 86\n", "2014-08-14 00:00:00 I99 空 开仓 653.5 86\n", "2014-08-14 00:00:00 CU99 空 平仓 49170.0 152\n", "2014-08-14 00:00:00 TA99 空 开仓 7052.0 185\n", "2014-08-15 00:00:00 TA99 空 开仓 6998.0 185\n", "2014-08-18 00:00:00 TA99 空 开仓 6944.0 185\n", "2014-08-18 00:00:00 TA99 空 开仓 6890.0 185\n", "2014-08-20 00:00:00 I99 空 开仓 648.0 86\n", "2014-08-26 00:00:00 IF99 空 平仓 2339.4 56\n", "2014-09-03 00:00:00 IF99 多 开仓 2399.6 11\n", "2014-09-03 00:00:00 IF99 多 开仓 2414.6 11\n", "2014-09-04 00:00:00 IF99 多 开仓 2429.6 11\n", "2014-09-04 00:00:00 IF99 多 开仓 2444.8 11\n", "2014-09-10 00:00:00 CU99 空 开仓 48600.0 37\n", "2014-09-11 00:00:00 CU99 空 开仓 48330.0 37\n", "2014-09-17 00:00:00 CU99 多 平仓 49150.0 74\n", "2014-09-22 00:00:00 IF99 空 平仓 2394.4 44\n", "2014-09-22 00:00:00 CU99 空 开仓 47920.0 30\n", "2014-09-22 00:00:00 CU99 空 开仓 47590.0 30\n", "2014-09-25 00:00:00 IF99 多 开仓 2484.6 9\n", "2014-10-14 00:00:00 I99 多 平仓 571.5 344\n", "2014-10-17 00:00:00 IF99 空 平仓 2428.8 9\n", "2014-10-17 00:00:00 CU99 空 开仓 46780.0 30\n", "2014-10-24 00:00:00 TA99 多 平仓 5718.0 740\n", "2014-10-27 00:00:00 IF99 空 开仓 2379.4 10\n", "2014-10-29 00:00:00 IF99 多 平仓 2446.8 10\n", "2014-10-30 00:00:00 CU99 多 平仓 47940.0 90\n", "2014-10-31 00:00:00 IF99 多 开仓 2499.6 10\n", "2014-10-31 00:00:00 IF99 多 开仓 2516.6 10\n", "2014-11-05 00:00:00 CU99 空 开仓 46480.0 32\n", "2014-11-07 00:00:00 IF99 多 开仓 2533.6 10\n", "2014-11-07 00:00:00 IF99 多 开仓 2550.4 10\n", "2014-11-13 00:00:00 TA99 多 开仓 5736.0 178\n", "2014-11-19 00:00:00 TA99 多 开仓 5792.0 178\n", "2014-11-24 00:00:00 CU99 多 平仓 47770.0 32\n", "2014-11-27 00:00:00 CU99 空 开仓 46450.0 33\n", "2014-11-28 00:00:00 CU99 空 开仓 46150.0 33\n", "2014-11-28 00:00:00 CU99 空 开仓 45850.0 33\n", "2014-11-28 00:00:00 TA99 空 平仓 5436.0 356\n", "2014-12-01 00:00:00 CU99 空 开仓 45540.0 33\n", "2014-12-01 00:00:00 TA99 空 开仓 5304.0 161\n", "2014-12-01 00:00:00 TA99 空 开仓 5248.0 161\n", "2014-12-08 00:00:00 TA99 空 开仓 5186.0 161\n", "2014-12-09 00:00:00 TA99 空 开仓 5046.0 161\n", "2015-01-19 00:00:00 IF99 空 平仓 3509.0 40\n", "2015-01-21 00:00:00 TA99 多 平仓 4740.0 644\n", "2015-01-26 00:00:00 I99 空 开仓 470.5 83\n", "2015-01-26 00:00:00 I99 空 开仓 464.5 83\n", "2015-02-13 00:00:00 I99 多 平仓 483.0 166\n", "2015-02-13 00:00:00 CU99 多 平仓 41940.0 132\n", "2015-03-05 00:00:00 I99 空 开仓 466.0 101\n", "2015-03-05 00:00:00 I99 空 开仓 461.5 101\n", "2015-03-06 00:00:00 I99 空 开仓 456.5 101\n", "2015-03-06 00:00:00 I99 空 开仓 451.5 101\n", "2015-03-13 00:00:00 IF99 多 开仓 3659.2 3\n", "2015-03-16 00:00:00 IF99 多 开仓 3707.0 3\n", "2015-03-16 00:00:00 TA99 空 开仓 4704.0 194\n", "2015-03-16 00:00:00 TA99 空 开仓 4652.0 194\n", "2015-03-17 00:00:00 IF99 多 开仓 3761.4 3\n", "2015-03-18 00:00:00 IF99 多 开仓 3806.2 3\n", "2015-03-23 00:00:00 CU99 多 开仓 43260.0 28\n", "2015-03-23 00:00:00 CU99 多 开仓 43620.0 28\n", "2015-03-23 00:00:00 CU99 多 开仓 43990.0 28\n", "2015-03-24 00:00:00 CU99 多 开仓 44350.0 28\n", "2015-03-24 00:00:00 TA99 多 平仓 4858.0 388\n", "2015-03-30 00:00:00 TA99 空 开仓 4630.0 181\n", "2015-04-02 00:00:00 TA99 空 开仓 4576.0 181\n", "2015-04-07 00:00:00 TA99 多 平仓 4822.0 362\n", "2015-04-08 00:00:00 TA99 多 开仓 4922.0 183\n", "2015-04-08 00:00:00 TA99 多 开仓 4978.0 183\n", "2015-04-09 00:00:00 CU99 空 平仓 43060.0 112\n", "2015-04-14 00:00:00 TA99 多 开仓 5086.0 183\n", "2015-04-17 00:00:00 I99 多 平仓 401.0 404\n", "2015-04-28 00:00:00 CU99 多 开仓 44090.0 30\n", "2015-05-04 00:00:00 CU99 多 开仓 45320.0 30\n", "2015-05-04 00:00:00 CU99 多 开仓 45320.0 30\n", "2015-05-06 00:00:00 IF99 空 平仓 4531.2 12\n", "2015-05-06 00:00:00 I99 多 开仓 437.0 77\n", "2015-05-06 00:00:00 I99 多 开仓 443.5 77\n", "2015-05-15 00:00:00 I99 空 平仓 417.5 154\n", "2015-05-18 00:00:00 TA99 空 平仓 5256.0 549\n", "2015-05-20 00:00:00 CU99 空 平仓 45310.0 90\n", "2015-06-08 00:00:00 IF99 多 开仓 5370.6 2\n", "2015-06-10 00:00:00 I99 多 开仓 444.0 91\n", "2015-06-11 00:00:00 I99 多 开仓 449.5 91\n", "2015-06-12 00:00:00 CU99 空 开仓 42550.0 36\n", "2015-06-15 00:00:00 CU99 空 开仓 42280.0 36\n", "2015-06-16 00:00:00 CU99 空 开仓 42000.0 36\n", "2015-06-17 00:00:00 IF99 空 平仓 4994.8 2\n", "2015-06-17 00:00:00 I99 空 平仓 429.5 182\n", "2015-06-17 00:00:00 CU99 空 开仓 41730.0 36\n", "2015-06-19 00:00:00 IF99 空 开仓 4711.2 2\n", "2015-06-19 00:00:00 IF99 空 开仓 4617.0 2\n", "2015-06-23 00:00:00 IF99 空 开仓 4522.8 2\n", "2015-06-25 00:00:00 IF99 多 平仓 4899.8 6\n", "2015-06-26 00:00:00 IF99 空 开仓 4464.6 2\n", "2015-06-26 00:00:00 IF99 空 开仓 4358.6 2\n", "2015-06-26 00:00:00 IF99 空 开仓 4252.6 2\n", "2015-06-29 00:00:00 IF99 空 开仓 4146.6 2\n", "2015-06-30 00:00:00 I99 空 开仓 419.5 94\n", "2015-06-30 00:00:00 I99 空 开仓 414.5 94\n", "2015-07-29 00:00:00 I99 多 平仓 378.5 188\n", "2015-08-10 00:00:00 IF99 多 平仓 3991.2 8\n", "2015-08-24 00:00:00 IF99 空 开仓 3272.8 1\n", "2015-08-24 00:00:00 IF99 空 开仓 3160.8 1\n", "2015-08-25 00:00:00 IF99 空 开仓 3034.0 1\n", "2015-08-25 00:00:00 IF99 空 开仓 2936.4 1\n", "2015-08-25 00:00:00 I99 空 开仓 358.5 91\n", "2015-08-25 00:00:00 TA99 空 开仓 4310.0 195\n", "2015-08-28 00:00:00 I99 多 平仓 380.0 91\n", "2015-08-28 00:00:00 TA99 多 平仓 4472.0 195\n", "2015-09-09 00:00:00 I99 多 开仓 394.5 89\n", "2015-09-09 00:00:00 CU99 多 平仓 39960.0 144\n", "2015-09-10 00:00:00 I99 多 开仓 400.0 89\n", "2015-09-10 00:00:00 I99 多 开仓 405.5 89\n", "2015-09-11 00:00:00 I99 多 开仓 411.0 89\n", "2015-09-15 00:00:00 I99 空 平仓 389.0 356\n", "2015-09-29 00:00:00 I99 空 开仓 358.0 89\n", "2015-09-29 00:00:00 I99 空 开仓 354.0 89\n", "2015-09-29 00:00:00 CU99 空 开仓 37780.0 26\n", "2015-09-29 00:00:00 CU99 空 开仓 37780.0 26\n", "2015-10-08 00:00:00 CU99 多 平仓 39370.0 52\n", "2015-10-08 00:00:00 TA99 多 开仓 4726.0 202\n", "2015-10-09 00:00:00 I99 多 平仓 376.5 178\n", "2015-10-09 00:00:00 TA99 多 开仓 4776.0 202\n", "2015-10-12 00:00:00 IF99 多 平仓 3341.0 4\n", "2015-10-22 00:00:00 TA99 空 平仓 4604.0 404\n", "2015-10-27 00:00:00 I99 空 开仓 353.0 107\n", "2015-10-28 00:00:00 I99 空 开仓 348.5 107\n", "2015-11-03 00:00:00 I99 空 开仓 343.5 107\n", "2015-11-03 00:00:00 I99 空 开仓 339.0 107\n", "2015-11-05 00:00:00 CU99 空 开仓 38240.0 31\n", "2015-11-06 00:00:00 CU99 空 开仓 37920.0 31\n", "2015-11-09 00:00:00 CU99 空 开仓 37600.0 31\n", "2015-11-10 00:00:00 CU99 空 开仓 37280.0 31\n", "2015-11-16 00:00:00 TA99 空 开仓 4548.0 231\n", "2015-11-16 00:00:00 TA99 空 开仓 4506.0 231\n", "2015-11-26 00:00:00 TA99 多 平仓 4632.0 462\n", "2015-12-08 00:00:00 TA99 空 开仓 4426.0 231\n", "2015-12-08 00:00:00 TA99 空 开仓 4382.0 231\n", "2015-12-11 00:00:00 CU99 多 平仓 35630.0 124\n", "2015-12-18 00:00:00 I99 多 平仓 298.5 428\n", "2015-12-21 00:00:00 IF99 多 开仓 3786.6 4\n", "2015-12-23 00:00:00 IF99 多 开仓 3831.8 4\n", "2015-12-28 00:00:00 IF99 空 平仓 3650.4 8\n", "2015-12-30 00:00:00 TA99 多 平仓 4444.0 462\n", "2016-01-04 00:00:00 IF99 空 开仓 3504.4 4\n", "2016-01-04 00:00:00 IF99 空 开仓 3460.4 4\n", "2016-01-04 00:00:00 IF99 空 开仓 3416.4 4\n", "2016-01-05 00:00:00 IF99 空 开仓 3372.6 4\n", "2016-01-11 00:00:00 CU99 空 开仓 34850.0 30\n", "2016-01-12 00:00:00 TA99 空 开仓 4252.0 286\n", "2016-01-14 00:00:00 CU99 空 开仓 34520.0 30\n", "2016-01-18 00:00:00 TA99 空 开仓 4206.0 286\n", "2016-01-19 00:00:00 TA99 多 平仓 4346.0 572\n", "2016-01-27 00:00:00 CU99 多 平仓 35560.0 60\n", "2016-02-01 00:00:00 I99 多 开仓 326.5 128\n", "2016-02-04 00:00:00 I99 多 开仓 330.0 128\n", "2016-02-04 00:00:00 I99 多 开仓 334.0 128\n", "2016-02-04 00:00:00 CU99 多 开仓 36540.0 34\n", "2016-02-15 00:00:00 TA99 多 开仓 4440.0 307\n", "2016-02-17 00:00:00 IF99 多 平仓 2969.2 16\n", "2016-02-18 00:00:00 I99 多 开仓 338.0 128\n", "2016-02-19 00:00:00 TA99 多 开仓 4472.0 307\n", "2016-02-26 00:00:00 TA99 空 平仓 4384.0 614\n", "2016-03-01 00:00:00 TA99 多 开仓 4500.0 331\n", "2016-03-01 00:00:00 TA99 多 开仓 4530.0 331\n", "2016-03-01 00:00:00 TA99 多 开仓 4560.0 331\n", "2016-03-02 00:00:00 CU99 多 开仓 36840.0 34\n", "2016-03-02 00:00:00 TA99 多 开仓 4592.0 331\n", "2016-03-28 00:00:00 I99 空 平仓 389.0 512\n", "2016-03-30 00:00:00 CU99 空 平仓 37130.0 68\n", "2016-04-13 00:00:00 IF99 多 开仓 3245.2 4\n", "2016-04-20 00:00:00 IF99 空 平仓 3093.8 4\n", "2016-04-20 00:00:00 I99 多 开仓 436.5 66\n", "2016-04-20 00:00:00 I99 多 开仓 444.0 66\n", "2016-04-20 00:00:00 I99 多 开仓 451.5 66\n", "2016-04-21 00:00:00 I99 多 开仓 459.5 66\n", "2016-04-22 00:00:00 CU99 多 开仓 38380.0 33\n", "2016-04-22 00:00:00 CU99 多 开仓 38550.0 33\n", "2016-04-26 00:00:00 CU99 空 平仓 37630.0 66\n", "2016-04-27 00:00:00 I99 空 平仓 429.0 264\n", "2016-05-06 00:00:00 TA99 空 平仓 4802.0 1324\n", "2016-05-10 00:00:00 I99 空 开仓 378.0 49\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2016-05-13 00:00:00 I99 空 开仓 368.0 49\n", "2016-05-13 00:00:00 I99 空 开仓 358.0 49\n", "2016-05-13 00:00:00 CU99 空 开仓 35690.0 31\n", "2016-05-13 00:00:00 CU99 空 开仓 35360.0 31\n", "2016-05-20 00:00:00 CU99 空 开仓 35040.0 31\n", "2016-05-23 00:00:00 I99 空 开仓 348.0 49\n", "2016-05-23 00:00:00 TA99 空 开仓 4552.0 187\n", "2016-05-31 00:00:00 IF99 空 开仓 2905.2 6\n", "2016-05-31 00:00:00 IF99 空 开仓 2878.0 6\n", "2016-06-01 00:00:00 IF99 多 平仓 3137.8 12\n", "2016-06-03 00:00:00 IF99 多 开仓 3165.6 5\n", "2016-06-06 00:00:00 CU99 多 平仓 36210.0 93\n", "2016-06-07 00:00:00 I99 多 平仓 359.5 196\n", "2016-06-13 00:00:00 IF99 空 平仓 3033.8 5\n", "2016-06-14 00:00:00 TA99 多 平仓 4758.0 187\n", "2016-06-20 00:00:00 TA99 多 开仓 4806.0 212\n", "2016-06-23 00:00:00 CU99 多 开仓 36300.0 35\n", "2016-06-24 00:00:00 CU99 多 开仓 36580.0 35\n", "2016-06-28 00:00:00 CU99 多 开仓 36860.0 35\n", "2016-06-28 00:00:00 CU99 多 开仓 37140.0 35\n", "2016-06-29 00:00:00 TA99 多 开仓 4854.0 212\n", "2016-07-04 00:00:00 TA99 多 开仓 4900.0 212\n", "2016-07-06 00:00:00 TA99 空 平仓 4712.0 636\n", "2016-07-07 00:00:00 IF99 多 开仓 3166.6 6\n", "2016-07-11 00:00:00 IF99 多 开仓 3194.4 6\n", "2016-07-12 00:00:00 IF99 多 开仓 3222.4 6\n", "2016-07-13 00:00:00 IF99 多 开仓 3250.4 6\n", "2016-07-19 00:00:00 TA99 空 开仓 4672.0 204\n", "2016-07-27 00:00:00 IF99 空 平仓 3173.6 24\n", "2016-07-28 00:00:00 I99 多 开仓 451.5 59\n", "2016-07-28 00:00:00 CU99 空 平仓 37640.0 140\n", "2016-07-29 00:00:00 TA99 空 开仓 4622.0 204\n", "2016-07-29 00:00:00 TA99 空 开仓 4574.0 204\n", "2016-08-01 00:00:00 I99 多 开仓 460.0 59\n", "2016-08-05 00:00:00 I99 多 开仓 468.5 59\n", "2016-08-08 00:00:00 I99 多 开仓 477.5 59\n", "2016-08-09 00:00:00 TA99 多 平仓 4758.0 612\n", "2016-08-11 00:00:00 IF99 多 开仓 3245.6 7\n", "2016-08-11 00:00:00 I99 空 平仓 443.0 236\n", "2016-08-12 00:00:00 IF99 多 开仓 3268.6 7\n", "2016-08-12 00:00:00 TA99 多 开仓 4806.0 245\n", "2016-08-15 00:00:00 IF99 多 开仓 3291.4 7\n", "2016-08-15 00:00:00 IF99 多 开仓 3314.4 7\n", "2016-08-17 00:00:00 TA99 多 开仓 4846.0 245\n", "2016-08-17 00:00:00 TA99 多 开仓 4886.0 245\n", "2016-08-25 00:00:00 TA99 空 平仓 4732.0 735\n", "2016-08-29 00:00:00 I99 空 开仓 424.0 60\n", "2016-08-29 00:00:00 I99 空 开仓 416.0 60\n", "2016-08-31 00:00:00 I99 空 开仓 407.5 60\n", "2016-09-08 00:00:00 I99 空 开仓 399.5 60\n", "2016-09-12 00:00:00 IF99 空 平仓 3227.8 28\n", "2016-09-14 00:00:00 IF99 空 开仓 3189.8 8\n", "2016-09-21 00:00:00 CU99 多 开仓 37410.0 47\n", "2016-09-22 00:00:00 CU99 多 开仓 37620.0 47\n", "2016-09-23 00:00:00 CU99 多 开仓 37840.0 47\n", "2016-09-28 00:00:00 TA99 空 开仓 4702.0 312\n", "2016-09-29 00:00:00 I99 多 平仓 414.5 240\n", "2016-10-10 00:00:00 IF99 多 平仓 3260.4 8\n", "2016-10-11 00:00:00 CU99 多 开仓 38050.0 47\n", "2016-10-11 00:00:00 TA99 多 平仓 4816.0 312\n", "2016-10-14 00:00:00 I99 多 开仓 422.0 78\n", "2016-10-14 00:00:00 I99 多 开仓 428.5 78\n", "2016-10-14 00:00:00 I99 多 开仓 435.0 78\n", "2016-10-14 00:00:00 CU99 空 平仓 37230.0 188\n", "2016-10-19 00:00:00 IF99 多 开仓 3294.2 9\n", "2016-10-19 00:00:00 I99 多 开仓 441.0 78\n", "2016-10-20 00:00:00 TA99 多 开仓 4852.0 315\n", "2016-10-20 00:00:00 TA99 多 开仓 4882.0 315\n", "2016-10-20 00:00:00 TA99 多 开仓 4914.0 315\n", "2016-10-20 00:00:00 TA99 多 开仓 4946.0 315\n", "2016-10-24 00:00:00 IF99 多 开仓 3312.8 9\n", "2016-11-03 00:00:00 TA99 空 平仓 4834.0 1260\n", "2016-11-10 00:00:00 TA99 多 开仓 5010.0 277\n", "2016-11-10 00:00:00 TA99 多 开仓 5046.0 277\n", "2016-11-11 00:00:00 TA99 多 开仓 5082.0 277\n", "2016-11-11 00:00:00 TA99 多 开仓 5118.0 277\n", "2016-11-14 00:00:00 TA99 空 平仓 4974.0 1108\n", "2016-12-07 00:00:00 IF99 空 平仓 3433.0 18\n", "2016-12-09 00:00:00 TA99 多 开仓 5402.0 215\n", "2016-12-09 00:00:00 TA99 多 开仓 5448.0 215\n", "2016-12-12 00:00:00 TA99 多 开仓 5496.0 215\n", "2016-12-12 00:00:00 TA99 多 开仓 5542.0 215\n", "2016-12-19 00:00:00 I99 空 平仓 568.0 312\n", "2016-12-20 00:00:00 TA99 空 平仓 5356.0 860\n", "2017-01-13 00:00:00 CU99 多 开仓 47310.0 19\n", "2017-01-13 00:00:00 CU99 多 开仓 47840.0 19\n", "2017-01-16 00:00:00 IF99 空 开仓 3220.6 9\n", "2017-01-16 00:00:00 IF99 空 开仓 3202.0 9\n", "2017-01-16 00:00:00 I99 多 开仓 612.5 37\n", "2017-01-16 00:00:00 I99 多 开仓 626.0 37\n", "2017-01-16 00:00:00 I99 多 开仓 639.5 37\n", "2017-01-16 00:00:00 CU99 多 开仓 48370.0 19\n", "2017-01-17 00:00:00 IF99 多 平仓 3277.0 18\n", "2017-01-17 00:00:00 I99 多 开仓 653.5 37\n", "2017-01-18 00:00:00 CU99 空 平仓 46240.0 57\n", "2017-01-20 00:00:00 IF99 多 开仓 3352.0 8\n", "2017-01-23 00:00:00 IF99 多 开仓 3372.2 8\n", "2017-01-23 00:00:00 I99 空 平仓 598.5 148\n", "2017-01-23 00:00:00 TA99 多 开仓 5540.0 205\n", "2017-01-24 00:00:00 TA99 多 开仓 5588.0 205\n", "2017-01-25 00:00:00 TA99 多 开仓 5636.0 205\n", "2017-01-25 00:00:00 TA99 多 开仓 5686.0 205\n", "2017-02-10 00:00:00 IF99 多 开仓 3392.2 8\n", "2017-02-10 00:00:00 I99 多 开仓 658.0 34\n", "2017-02-10 00:00:00 I99 多 开仓 673.0 34\n", "2017-02-13 00:00:00 I99 多 开仓 687.5 34\n", "2017-02-20 00:00:00 TA99 空 平仓 5662.0 820\n", "2017-03-03 00:00:00 IF99 空 平仓 3383.4 24\n", "2017-03-03 00:00:00 I99 空 平仓 659.5 102\n", "2017-03-09 00:00:00 I99 空 开仓 625.0 36\n", "2017-03-09 00:00:00 CU99 空 开仓 47120.0 22\n", "2017-03-09 00:00:00 CU99 空 开仓 46670.0 22\n", "2017-03-09 00:00:00 TA99 空 开仓 5244.0 206\n", "2017-03-10 00:00:00 CU99 空 开仓 46210.0 22\n", "2017-03-10 00:00:00 TA99 空 开仓 5190.0 206\n", "2017-03-10 00:00:00 TA99 空 开仓 5146.0 206\n", "2017-03-13 00:00:00 TA99 空 开仓 5098.0 206\n", "2017-03-15 00:00:00 I99 多 平仓 680.5 36\n", "2017-03-16 00:00:00 CU99 多 平仓 48040.0 66\n", "2017-03-22 00:00:00 I99 空 开仓 612.0 36\n", "2017-03-24 00:00:00 IF99 多 开仓 3456.6 10\n", "2017-03-24 00:00:00 IF99 多 开仓 3473.2 10\n", "2017-03-24 00:00:00 I99 空 开仓 594.5 36\n", "2017-03-27 00:00:00 I99 空 开仓 584.5 36\n", "2017-03-27 00:00:00 I99 空 开仓 570.5 36\n", "2017-03-28 00:00:00 CU99 空 开仓 46180.0 23\n", "2017-03-30 00:00:00 IF99 空 平仓 3407.0 20\n", "2017-03-30 00:00:00 CU99 多 平仓 47920.0 23\n", "2017-04-05 00:00:00 IF99 多 开仓 3474.4 10\n", "2017-04-05 00:00:00 IF99 多 开仓 3491.0 10\n", "2017-04-11 00:00:00 IF99 多 开仓 3509.2 10\n", "2017-04-13 00:00:00 CU99 空 开仓 45750.0 23\n", "2017-04-17 00:00:00 IF99 空 平仓 3442.2 30\n", "2017-04-17 00:00:00 CU99 多 平仓 47520.0 23\n", "2017-04-19 00:00:00 CU99 空 开仓 45640.0 21\n", "2017-04-20 00:00:00 CU99 空 开仓 45170.0 21\n", "2017-04-28 00:00:00 I99 多 平仓 515.5 144\n", "2017-05-02 00:00:00 CU99 多 平仓 47060.0 42\n", "2017-05-04 00:00:00 IF99 空 开仓 3371.6 10\n", "2017-05-05 00:00:00 IF99 空 开仓 3355.4 10\n", "2017-05-05 00:00:00 IF99 空 开仓 3339.0 10\n", "2017-05-05 00:00:00 CU99 空 开仓 44900.0 23\n", "2017-05-16 00:00:00 IF99 多 平仓 3404.4 30\n", "2017-05-22 00:00:00 CU99 多 平仓 45730.0 23\n", "2017-05-23 00:00:00 TA99 多 平仓 5034.0 824\n", "2017-05-25 00:00:00 IF99 多 开仓 3433.6 10\n", "2017-05-25 00:00:00 IF99 多 开仓 3449.8 10\n", "2017-05-25 00:00:00 IF99 多 开仓 3466.0 10\n", "2017-05-26 00:00:00 IF99 多 开仓 3482.2 10\n", "2017-05-31 00:00:00 I99 空 开仓 439.0 46\n", "2017-05-31 00:00:00 I99 空 开仓 428.5 46\n", "2017-06-01 00:00:00 I99 空 开仓 417.5 46\n", "2017-06-01 00:00:00 TA99 空 开仓 4774.0 249\n", "2017-06-12 00:00:00 CU99 多 开仓 46440.0 31\n", "2017-06-13 00:00:00 TA99 多 平仓 4934.0 249\n", "2017-06-23 00:00:00 CU99 多 开仓 46760.0 31\n", "2017-06-27 00:00:00 I99 多 平仓 437.5 138\n", "2017-06-28 00:00:00 I99 多 开仓 455.5 60\n", "2017-06-28 00:00:00 CU99 多 开仓 47080.0 31\n", "2017-06-29 00:00:00 I99 多 开仓 464.0 60\n", "2017-06-29 00:00:00 I99 多 开仓 472.0 60\n", "2017-08-11 00:00:00 IF99 空 平仓 3657.0 40\n", "2017-08-15 00:00:00 I99 空 平仓 526.5 180\n", "2017-09-04 00:00:00 TA99 多 开仓 5410.0 258\n", "2017-09-08 00:00:00 CU99 空 平仓 52050.0 93\n", "2017-09-11 00:00:00 I99 空 开仓 520.0 41\n", "2017-09-11 00:00:00 TA99 空 平仓 5254.0 258\n", "2017-09-14 00:00:00 I99 空 开仓 508.0 41\n", "2017-09-18 00:00:00 I99 空 开仓 496.0 41\n", "2017-09-21 00:00:00 I99 空 开仓 484.0 41\n", "2017-09-28 00:00:00 TA99 空 开仓 5194.0 266\n", "2017-09-28 00:00:00 TA99 空 开仓 5156.0 266\n", "2017-09-28 00:00:00 TA99 空 开仓 5118.0 266\n", "2017-10-09 00:00:00 TA99 空 开仓 5082.0 266\n", "2017-10-13 00:00:00 CU99 多 开仓 53520.0 26\n", "2017-10-16 00:00:00 CU99 多 开仓 53900.0 26\n", "2017-10-16 00:00:00 CU99 多 开仓 54290.0 26\n", "2017-10-16 00:00:00 CU99 多 开仓 54680.0 26\n", "2017-10-20 00:00:00 I99 多 平仓 468.0 164\n", "2017-10-30 00:00:00 TA99 多 平仓 5230.0 1064\n", "2017-11-06 00:00:00 TA99 多 开仓 5244.0 320\n", "2017-11-06 00:00:00 TA99 多 开仓 5274.0 320\n", "2017-11-06 00:00:00 TA99 多 开仓 5306.0 320\n", "2017-11-07 00:00:00 TA99 多 开仓 5338.0 320\n", "2017-11-09 00:00:00 CU99 空 平仓 53470.0 104\n", "2017-11-15 00:00:00 CU99 空 开仓 53280.0 22\n", "2017-11-28 00:00:00 TA99 空 平仓 5388.0 1280\n", "2017-11-30 00:00:00 CU99 空 开仓 52820.0 22\n", "2017-12-04 00:00:00 I99 多 开仓 551.0 62\n", "2017-12-04 00:00:00 TA99 多 开仓 5568.0 249\n", "2017-12-06 00:00:00 CU99 空 开仓 52360.0 22\n", "2017-12-06 00:00:00 CU99 空 开仓 51910.0 22\n", "2017-12-07 00:00:00 I99 空 平仓 518.5 62\n", "2017-12-07 00:00:00 TA99 空 平仓 5408.0 249\n", "2017-12-14 00:00:00 TA99 空 开仓 5340.0 248\n", "2017-12-18 00:00:00 CU99 多 平仓 53730.0 88\n", "2017-12-25 00:00:00 IF99 多 开仓 4103.6 6\n", "2017-12-25 00:00:00 CU99 多 开仓 55000.0 25\n", "2017-12-25 00:00:00 CU99 多 开仓 55400.0 25\n", "2017-12-26 00:00:00 TA99 多 平仓 5444.0 248\n", "2017-12-27 00:00:00 IF99 空 平仓 3996.6 6\n", "2017-12-28 00:00:00 CU99 多 开仓 55790.0 25\n", "2018-01-02 00:00:00 IF99 多 开仓 4105.4 6\n", "2018-01-03 00:00:00 IF99 多 开仓 4132.2 6\n", "2018-01-03 00:00:00 TA99 多 开仓 5584.0 295\n", "2018-01-04 00:00:00 TA99 多 开仓 5618.0 295\n", "2018-01-04 00:00:00 TA99 多 开仓 5652.0 295\n", "2018-01-08 00:00:00 IF99 多 开仓 4159.0 6\n", "2018-01-08 00:00:00 I99 多 开仓 553.0 57\n", "2018-01-12 00:00:00 CU99 空 平仓 54580.0 75\n", "2018-01-22 00:00:00 CU99 空 开仓 53650.0 29\n", "2018-01-23 00:00:00 I99 空 平仓 526.5 57\n", "2018-01-24 00:00:00 CU99 空 开仓 53190.0 29\n", "2018-01-24 00:00:00 CU99 空 开仓 52960.0 29\n", "2018-01-25 00:00:00 CU99 多 平仓 54340.0 87\n", "2018-01-29 00:00:00 I99 空 开仓 517.0 65\n", "2018-01-31 00:00:00 I99 空 开仓 509.0 65\n", "2018-02-01 00:00:00 IF99 空 平仓 4253.2 18\n", "2018-02-06 00:00:00 TA99 空 平仓 5630.0 885\n", "2018-02-08 00:00:00 CU99 空 开仓 52780.0 27\n", "2018-02-08 00:00:00 CU99 空 开仓 52410.0 27\n", "2018-02-08 00:00:00 CU99 空 开仓 52050.0 27\n", "2018-02-09 00:00:00 IF99 空 开仓 3937.4 5\n", "2018-02-09 00:00:00 IF99 空 开仓 3902.4 5\n", "2018-02-09 00:00:00 IF99 空 开仓 3867.4 5\n", "2018-02-09 00:00:00 IF99 空 开仓 3832.4 5\n", "2018-02-09 00:00:00 I99 多 平仓 533.0 130\n", "2018-02-09 00:00:00 CU99 空 开仓 51680.0 27\n", "2018-02-22 00:00:00 IF99 多 平仓 4010.2 20\n", "2018-02-22 00:00:00 CU99 多 平仓 53270.0 108\n", "2018-02-23 00:00:00 I99 多 开仓 549.0 75\n", "2018-02-26 00:00:00 I99 多 开仓 556.0 75\n", "2018-02-26 00:00:00 TA99 多 开仓 5788.0 291\n", "2018-02-27 00:00:00 TA99 多 开仓 5822.0 291\n", "2018-03-05 00:00:00 I99 空 平仓 529.0 150\n", "2018-03-07 00:00:00 TA99 空 平仓 5684.0 582\n", "2018-03-08 00:00:00 I99 空 开仓 506.5 79\n", "2018-03-09 00:00:00 I99 空 开仓 500.0 79\n", "2018-03-09 00:00:00 I99 空 开仓 493.5 79\n", "2018-03-09 00:00:00 I99 空 开仓 487.5 79\n", "2018-03-09 00:00:00 TA99 空 开仓 5570.0 290\n", "2018-03-09 00:00:00 TA99 空 开仓 5536.0 290\n", "2018-03-16 00:00:00 TA99 空 开仓 5502.0 290\n", "2018-03-20 00:00:00 TA99 空 开仓 5468.0 290\n", "2018-03-21 00:00:00 CU99 空 开仓 51250.0 27\n", "2018-03-21 00:00:00 CU99 空 开仓 50890.0 27\n", "2018-04-10 00:00:00 CU99 多 平仓 51280.0 54\n", "2018-04-17 00:00:00 IF99 空 开仓 3740.8 5\n", "2018-04-17 00:00:00 TA99 多 平仓 5500.0 1160\n", "2018-04-18 00:00:00 IF99 空 开仓 3704.4 5\n", "2018-04-19 00:00:00 I99 多 平仓 461.0 316\n", "2018-04-19 00:00:00 CU99 多 开仓 52020.0 27\n", "2018-04-19 00:00:00 CU99 多 开仓 52260.0 27\n", "2018-05-08 00:00:00 IF99 多 平仓 3832.8 10\n", "2018-05-09 00:00:00 CU99 空 平仓 51040.0 54\n", "2018-05-15 00:00:00 TA99 多 开仓 5836.0 302\n", "2018-05-16 00:00:00 TA99 多 开仓 5870.0 302\n", "2018-05-16 00:00:00 TA99 多 开仓 5902.0 302\n", "2018-05-21 00:00:00 IF99 多 开仓 3922.2 6\n", "2018-05-22 00:00:00 TA99 空 平仓 5770.0 906\n", "2018-05-23 00:00:00 I99 空 开仓 451.0 75\n", "2018-05-23 00:00:00 CU99 多 开仓 52370.0 34\n", "2018-05-24 00:00:00 IF99 空 平仓 3822.0 6\n", "2018-05-30 00:00:00 IF99 空 开仓 3714.2 6\n", "2018-05-30 00:00:00 CU99 空 平仓 51190.0 34\n", "2018-06-04 00:00:00 CU99 多 开仓 52470.0 33\n", "2018-06-05 00:00:00 CU99 多 开仓 52780.0 33\n", "2018-06-06 00:00:00 I99 多 平仓 469.5 75\n", "2018-06-06 00:00:00 CU99 多 开仓 53080.0 33\n", "2018-06-06 00:00:00 CU99 多 开仓 53380.0 33\n", "2018-06-07 00:00:00 IF99 多 平仓 3827.6 6\n", "2018-06-19 00:00:00 IF99 空 开仓 3667.4 6\n", "2018-06-19 00:00:00 IF99 空 开仓 3659.2 6\n", "2018-06-19 00:00:00 IF99 空 开仓 3631.0 6\n", "2018-06-19 00:00:00 IF99 空 开仓 3602.8 6\n", "2018-06-19 00:00:00 I99 空 开仓 446.5 87\n", "2018-06-19 00:00:00 CU99 空 平仓 52170.0 132\n", "2018-06-25 00:00:00 I99 多 平仓 469.5 87\n", "2018-06-28 00:00:00 TA99 多 开仓 5822.0 296\n", "2018-07-02 00:00:00 CU99 空 开仓 51370.0 32\n", "2018-07-03 00:00:00 TA99 多 开仓 5854.0 296\n", "2018-07-04 00:00:00 CU99 空 开仓 51050.0 32\n", "2018-07-04 00:00:00 CU99 空 开仓 50740.0 32\n", "2018-07-04 00:00:00 CU99 空 开仓 50430.0 32\n", "2018-07-09 00:00:00 TA99 多 开仓 5888.0 296\n", "2018-07-12 00:00:00 IF99 多 平仓 3476.2 24\n", "2018-07-19 00:00:00 TA99 多 开仓 5922.0 296\n", "2018-07-23 00:00:00 I99 多 开仓 476.0 110\n", "2018-07-25 00:00:00 CU99 多 平仓 49840.0 128\n", "2018-07-27 00:00:00 I99 多 开仓 480.5 110\n", "2018-07-27 00:00:00 I99 多 开仓 485.0 110\n", "2018-07-27 00:00:00 I99 多 开仓 489.5 110\n", "2018-08-02 00:00:00 I99 空 平仓 471.5 440\n", "2018-08-06 00:00:00 IF99 空 开仓 3272.8 4\n", "2018-08-06 00:00:00 IF99 空 开仓 3234.4 4\n", "2018-08-06 00:00:00 I99 多 开仓 493.5 110\n", "2018-08-06 00:00:00 I99 多 开仓 498.0 110\n", "2018-08-06 00:00:00 I99 多 开仓 502.5 110\n", "2018-08-06 00:00:00 I99 多 开仓 507.5 110\n", "2018-08-09 00:00:00 IF99 多 平仓 3387.8 8\n", "2018-08-16 00:00:00 IF99 空 开仓 3224.6 4\n", "2018-08-16 00:00:00 I99 空 平仓 489.0 440\n", "2018-08-17 00:00:00 IF99 空 开仓 3189.8 4\n", "2018-08-27 00:00:00 IF99 多 平仓 3346.8 8\n", "2018-09-05 00:00:00 CU99 空 开仓 47260.0 30\n", "2018-09-11 00:00:00 TA99 空 平仓 7666.0 1184\n", "2018-09-12 00:00:00 IF99 空 开仓 3188.4 5\n", "2018-09-13 00:00:00 CU99 多 平仓 48580.0 30\n", "2018-09-19 00:00:00 I99 多 开仓 508.0 92\n", "2018-09-19 00:00:00 I99 多 开仓 513.5 92\n", "2018-09-19 00:00:00 CU99 多 开仓 49160.0 30\n", "2018-09-19 00:00:00 CU99 多 开仓 49460.0 30\n", "2018-09-21 00:00:00 IF99 多 平仓 3325.4 5\n", "2018-09-21 00:00:00 CU99 多 开仓 49790.0 30\n", "2018-09-25 00:00:00 CU99 多 开仓 50300.0 30\n", "2018-09-26 00:00:00 IF99 多 开仓 3425.0 5\n", "2018-09-26 00:00:00 IF99 多 开仓 3457.6 5\n", "2018-09-28 00:00:00 I99 空 平仓 492.5 184\n", "2018-10-08 00:00:00 IF99 空 平仓 3326.8 10\n", "2018-10-10 00:00:00 I99 多 开仓 513.5 97\n", "2018-10-11 00:00:00 IF99 空 开仓 3183.6 5\n", "2018-10-11 00:00:00 IF99 空 开仓 3150.8 5\n", "2018-10-11 00:00:00 IF99 空 开仓 3118.0 5\n", "2018-10-17 00:00:00 IF99 空 开仓 3085.2 5\n", "2018-10-17 00:00:00 I99 多 开仓 519.0 97\n", "2018-10-18 00:00:00 I99 多 开仓 524.0 97\n", "2018-10-18 00:00:00 I99 多 开仓 529.0 97\n", "2018-10-18 00:00:00 TA99 空 开仓 7084.0 118\n", "2018-10-18 00:00:00 TA99 空 开仓 6998.0 118\n", "2018-10-22 00:00:00 IF99 多 平仓 3216.6 20\n", "2018-10-22 00:00:00 TA99 空 开仓 6914.0 118\n", "2018-10-25 00:00:00 CU99 空 平仓 49610.0 120\n", "2018-10-25 00:00:00 TA99 空 开仓 6830.0 118\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2018-10-31 00:00:00 CU99 空 开仓 49400.0 31\n", "2018-10-31 00:00:00 CU99 空 开仓 49080.0 31\n", "2018-11-01 00:00:00 CU99 空 开仓 48760.0 31\n", "2018-11-02 00:00:00 I99 空 平仓 509.5 388\n", "2018-11-05 00:00:00 CU99 多 平仓 50050.0 93\n" ] } ], "source": [ "# 查看逐笔的交易记录\n", "for dt, l in engine.tradeDict.items():\n", " for trade in l:\n", " print dt, trade.vtSymbol, trade.direction, trade.offset, trade.price, trade.volume" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.14" } }, "nbformat": 4, "nbformat_minor": 2 }