|
18 | 18 | from QUANTAXIS.QAUtil.QAParameter import MARKET_TYPE, RUNNING_ENVIRONMENT, ORDER_DIRECTION
|
19 | 19 | from QAPUBSUB.consumer import subscriber_topic, subscriber_routing
|
20 | 20 | from QAPUBSUB.producer import publisher_routing
|
21 |
| -from QUANTAXIS.QAStrategy.qactabase import QAStrategyCTABase |
| 21 | +from QUANTAXIS.QAStrategy.qactabase import QAStrategyCtaBase |
22 | 22 | from QUANTAXIS.QIFI.QifiAccount import QIFI_Account
|
23 | 23 |
|
24 | 24 |
|
25 |
| -class QAStrategyStockBase(QAStrategyCTABase): |
| 25 | +class QAStrategyStockBase(QAStrategyCtaBase): |
26 | 26 |
|
27 | 27 | def __init__(self, code=['000001'], frequence='1min', strategy_id='QA_STRATEGY', risk_check_gap=1, portfolio='default',
|
28 | 28 | start='2019-01-01', end='2019-10-21', send_wx=False, market_type='stock_cn',
|
@@ -141,16 +141,16 @@ def run(self):
|
141 | 141 |
|
142 | 142 | def debug(self):
|
143 | 143 | self.running_mode = 'backtest'
|
144 |
| - self.database = pymongo.MongoClient(mongo_ip).QUANTAXIS |
145 |
| - user = QA_User(username="admin", password='admin') |
146 |
| - port = user.new_portfolio(self.portfolio) |
147 |
| - self.acc = port.new_accountpro( |
148 |
| - account_cookie=self.strategy_id, init_cash=self.init_cash, market_type=self.market_type, frequence= self.frequence) |
149 |
| - #self.positions = self.acc.get_position(self.code) |
| 144 | + # self.database = pymongo.MongoClient(mongo_ip).QUANTAXIS |
| 145 | + # user = QA_User(username="admin", password='admin') |
| 146 | + # port = user.new_portfolio(self.portfolio) |
| 147 | + # self.acc = port.new_accountpro( |
| 148 | + # account_cookie=self.strategy_id, init_cash=self.init_cash, market_type=self.market_type, frequence= self.frequence) |
| 149 | + # #self.positions = self.acc.get_position(self.code) |
150 | 150 |
|
151 |
| - print(self.acc) |
| 151 | + # print(self.acc) |
152 | 152 |
|
153 |
| - print(self.acc.market_type) |
| 153 | + # print(self.acc.market_type) |
154 | 154 | data = QA.QA_quotation(self.code, self.start, self.end, source=QA.DATASOURCE.MONGO,
|
155 | 155 | frequence=self.frequence, market=self.market_type, output=QA.OUTPUT_FORMAT.DATASTRUCT)
|
156 | 156 |
|
|
0 commit comments