Skip to content

Commit

Permalink
fix ide wn
Browse files Browse the repository at this point in the history
  • Loading branch information
bbfamily committed Aug 27, 2017
1 parent 915e57e commit 707f1a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 118 deletions.
3 changes: 2 additions & 1 deletion abupy/CoreBu/ABuFixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ def _parse_version(version_string):
from six.moves import zip, xrange, range, reduce, map, filter

try:
# noinspection all
from six.moves import cPickle as pickle
except ImportError:
# noinspection PyUnresolvedReferences
# noinspection all
from six.moves import cPickle as pickle

if six.PY3:
Expand Down
118 changes: 1 addition & 117 deletions abupy_lecture/8-A股市场的回测(ABU量化使用文档).ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -582,126 +582,10 @@
}
],
"source": [
"print('买入出价格为:{}'.format(view_orders.ix[0].buy_price))\n",
"print('买入价格为:{}'.format(view_orders.ix[0].buy_price))\n",
"trade_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>buy_date</th>\n",
" <th>buy_price</th>\n",
" <th>buy_cnt</th>\n",
" <th>buy_factor</th>\n",
" <th>symbol</th>\n",
" <th>buy_pos</th>\n",
" <th>buy_type_str</th>\n",
" <th>expect_direction</th>\n",
" <th>sell_type_extra</th>\n",
" <th>sell_date</th>\n",
" <th>sell_price</th>\n",
" <th>sell_type</th>\n",
" <th>ml_features</th>\n",
" <th>key</th>\n",
" <th>profit</th>\n",
" <th>result</th>\n",
" <th>profit_cg</th>\n",
" <th>profit_cg_hunder</th>\n",
" <th>keep_days</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2015-11-10</th>\n",
" <td>20151110</td>\n",
" <td>13.565</td>\n",
" <td>14700.0</td>\n",
" <td>AbuFactorBuyBreak:42</td>\n",
" <td>000002</td>\n",
" <td>AbuAtrPosition</td>\n",
" <td>call</td>\n",
" <td>1.0</td>\n",
" <td>AbuFactorAtrNStop:stop_win=3.0</td>\n",
" <td>20160704</td>\n",
" <td>21.27</td>\n",
" <td>win</td>\n",
" <td>None</td>\n",
" <td>1038</td>\n",
" <td>113263.5</td>\n",
" <td>1</td>\n",
" <td>0.568</td>\n",
" <td>56.8006</td>\n",
" <td>237</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2015-11-19</th>\n",
" <td>20151119</td>\n",
" <td>13.670</td>\n",
" <td>14400.0</td>\n",
" <td>AbuFactorBuyBreak:60</td>\n",
" <td>000002</td>\n",
" <td>AbuAtrPosition</td>\n",
" <td>call</td>\n",
" <td>1.0</td>\n",
" <td>AbuFactorAtrNStop:stop_win=3.0</td>\n",
" <td>20160704</td>\n",
" <td>21.27</td>\n",
" <td>win</td>\n",
" <td>None</td>\n",
" <td>1045</td>\n",
" <td>109440.0</td>\n",
" <td>1</td>\n",
" <td>0.556</td>\n",
" <td>55.5962</td>\n",
" <td>228</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" buy_date buy_price buy_cnt buy_factor symbol \\\n",
"2015-11-10 20151110 13.565 14700.0 AbuFactorBuyBreak:42 000002 \n",
"2015-11-19 20151119 13.670 14400.0 AbuFactorBuyBreak:60 000002 \n",
"\n",
" buy_pos buy_type_str expect_direction \\\n",
"2015-11-10 AbuAtrPosition call 1.0 \n",
"2015-11-19 AbuAtrPosition call 1.0 \n",
"\n",
" sell_type_extra sell_date sell_price sell_type \\\n",
"2015-11-10 AbuFactorAtrNStop:stop_win=3.0 20160704 21.27 win \n",
"2015-11-19 AbuFactorAtrNStop:stop_win=3.0 20160704 21.27 win \n",
"\n",
" ml_features key profit result profit_cg profit_cg_hunder \\\n",
"2015-11-10 None 1038 113263.5 1 0.568 56.8006 \n",
"2015-11-19 None 1045 109440.0 1 0.556 55.5962 \n",
"\n",
" keep_days \n",
"2015-11-10 237 \n",
"2015-11-19 228 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"orders_pd[orders_pd['sell_date']==20160704]"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 707f1a0

Please sign in to comment.