vnpy/examples/TurtleStrategy/.ipynb_checkpoints/run-checkpoint.ipynb

726 lines
50 KiB
Plaintext
Raw Normal View History

{
"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",
2018-11-11 07:25:59 +00:00
"execution_count": 3,
"metadata": {
"scrolled": false
},
2018-11-11 07:25:59 +00:00
"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"
2018-11-11 07:25:59 +00:00
]
}
],
"source": [
"engine.loadData()\n",
"engine.runBacktesting()\n",
"engine.calculateResult()"
]
},
{
"cell_type": "code",
2018-11-11 07:25:59 +00:00
"execution_count": 4,
"metadata": {},
2018-11-11 07:25:59 +00:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"44093646.23195201\n"
]
2018-11-11 07:25:59 +00:00
},
{
"data": {
"image/png": "iVBORw0KGg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XJ/TjgXc384dPdzCqTxY9MpL5ZIuz5n2oopb8Adms3HWUF5YUcqCshp9cdErY1qpcs7u09ZOiWJs+8qy1n1hrLw5VMCInUtushl3fYJm/bj+VtQ5+9Po6z/6KWofPCLxIWLy9BIDS6voWx6JxWPf2Q84kPiQng59d7GwCuenMQW16jpTE+OMm3i5piXz3nCEsKzjClAc+YsiP3/U5fmo/Z03+V/M38ex/dlJY4n/wzYZ9ZXz7hc+555/rWLqjpE3xHc/WgxUAfPcrQ4LyfOGmEZsSM5o3kxw+VsstL63mB6+t9ewblutsann18z1Eg4NlLftJOxqtnzMj5+H3NvPAu5vpkZFE17QkTumdReFDF/FfUwYE9XVumzmMO2b53gC99+JRnNI7i5vPHuyzf/Uu//cNHnl/Cws2HeLlFXuY88dl7R4ZWlPfwJLthwFnEu+RkcyPZo9s13NFmpK4xIz6Bv9t3Z9ta7ohNmNkLpMGZvPcf3a2GAwUCQV+Ri0u3By5/tD+/P6THQAM6J4e0tcxxnDbrGG8dcs0zh6ew20zh3HjmYP4921nkZuVwhWn9fOcu8VVO/Z2rNbBwi2+Nz/nvrjSM1CnLX41fyPXPrucTfvLOVJZR05mbC0E4U1JXGLG4WO1fvdXes3bMbZfFy4a25uio9UUVzjPb4hAzTcl0fmn5a9v9PKdR1rsi6Q+XZwTPn3j9ODWvI9nXP+uvHDjZO5o1i3xZxeN8nTzO1rZsvvoKj+187VFZTzj+hAK1LKCEv66zLm
2018-11-11 07:25:59 +00:00
"text/plain": [
"<matplotlib.figure.Figure at 0x86a5990>"
2018-11-11 07:25:59 +00:00
]
},
"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)"
]
},
2018-11-11 07:25:59 +00:00
{
"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
}