Skip to content

Commit

Permalink
#drop unused
Browse files Browse the repository at this point in the history
  • Loading branch information
yutiansut committed May 18, 2022
1 parent 5f52b7f commit 5e5a907
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions QUANTAXIS/QAStrategy/qactabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ def x1(self, item):

def debug_t0(self):
self.running_mode = 'backtest'
self.database = pymongo.MongoClient(mongo_ip).QUANTAXIS
user = QA_User(username=self.username, password=self.password)
port = user.new_portfolio(self.portfolio)
self.acc = port.new_accountpro(
account_cookie=self.strategy_id, init_cash=self.init_cash, init_hold={
self.code: 100000},
market_type=self.market_type, running_environment=RUNNING_ENVIRONMENT.TZERO)
self.positions = self.acc.get_position(self.code)
# self.database = pymongo.MongoClient(mongo_ip).QUANTAXIS
# user = QA_User(username=self.username, password=self.password)
# port = user.new_portfolio(self.portfolio)
# self.acc = port.new_accountpro(
# account_cookie=self.strategy_id, init_cash=self.init_cash, init_hold={
# self.code: 100000},
# market_type=self.market_type, running_environment=RUNNING_ENVIRONMENT.TZERO)
# self.positions = self.acc.get_position(self.code)
data = QA.QA_quotation(self.code.upper(), self.start, self.end, source=QA.DATASOURCE.MONGO,
frequence=self.frequence, market=self.market_type, output=QA.OUTPUT_FORMAT.DATASTRUCT)

Expand Down
20 changes: 10 additions & 10 deletions QUANTAXIS/QAStrategy/qamultibase.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
from QUANTAXIS.QAUtil.QAParameter import MARKET_TYPE, RUNNING_ENVIRONMENT, ORDER_DIRECTION
from QAPUBSUB.consumer import subscriber_topic, subscriber_routing
from QAPUBSUB.producer import publisher_routing
from QUANTAXIS.QAStrategy.qactabase import QAStrategyCTABase
from QUANTAXIS.QAStrategy.qactabase import QAStrategyCtaBase
from QUANTAXIS.QIFI.QifiAccount import QIFI_Account


class QAStrategyStockBase(QAStrategyCTABase):
class QAStrategyStockBase(QAStrategyCtaBase):

def __init__(self, code=['000001'], frequence='1min', strategy_id='QA_STRATEGY', risk_check_gap=1, portfolio='default',
start='2019-01-01', end='2019-10-21', send_wx=False, market_type='stock_cn',
Expand Down Expand Up @@ -141,16 +141,16 @@ def run(self):

def debug(self):
self.running_mode = 'backtest'
self.database = pymongo.MongoClient(mongo_ip).QUANTAXIS
user = QA_User(username="admin", password='admin')
port = user.new_portfolio(self.portfolio)
self.acc = port.new_accountpro(
account_cookie=self.strategy_id, init_cash=self.init_cash, market_type=self.market_type, frequence= self.frequence)
#self.positions = self.acc.get_position(self.code)
# self.database = pymongo.MongoClient(mongo_ip).QUANTAXIS
# user = QA_User(username="admin", password='admin')
# port = user.new_portfolio(self.portfolio)
# self.acc = port.new_accountpro(
# account_cookie=self.strategy_id, init_cash=self.init_cash, market_type=self.market_type, frequence= self.frequence)
# #self.positions = self.acc.get_position(self.code)

print(self.acc)
# print(self.acc)

print(self.acc.market_type)
# print(self.acc.market_type)
data = QA.QA_quotation(self.code, self.start, self.end, source=QA.DATASOURCE.MONGO,
frequence=self.frequence, market=self.market_type, output=QA.OUTPUT_FORMAT.DATASTRUCT)

Expand Down

0 comments on commit 5e5a907

Please sign in to comment.