567717cc14a8c73b263153e0813e7218819b48ea,QUANTAXIS/QAMarket/QABacktestBroker.py,QA_BacktestBroker,warp,#QA_BacktestBroker#Any#,188
Before Change
order.date = exact_time[0:10]
order.datetime = "{} 09:30:00".format(order.date)
elif order.frequence in [FREQUENCE.ONE_MIN, FREQUENCE.FIVE_MIN, FREQUENCE.FIFTEEN_MIN, FREQUENCE.THIRTY_MIN, FREQUENCE.SIXTY_MIN]:
exact_time = str(datetime.datetime.strptime(
order.datetime, "%Y-%m-%d %H-%M-%S") + datetime.timedelta(minute=1))
order.date = exact_time[0:10]
order.datetime = exact_time
elif order.order_model == ORDER_MODEL.STRICT:
After Change
else:
order.price = float(self.market_data.get("low"))
if order.market_type is MARKET_TYPE.STOCK_CN and order.towards is ORDER_DIRECTION.BUY:
if order.order_model is AMOUNT_MODEL.BY_MONEY:
amount = order.money / \
(order.price*(1+order.commission_coeff))
money = order.money
else:
amount = order.amount
money = order.amount * order.price * \
(1+order.commission_coeff)
order.amount = int(amount / 100) * 100
order.money = money
return order
def get_market(self, order):
get_market func
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 567717cc14a8c73b263153e0813e7218819b48ea
Time: 2018-05-16
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAMarket/QABacktestBroker.py
Class Name: QA_BacktestBroker
Method Name: warp
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: b8bd07c86553e12e05d7f0a011ecbc2626a26aed
Time: 2018-05-17
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAMarket/QABacktestBroker.py
Class Name: QA_BacktestBroker
Method Name: warp
Project Name: Infinidat/infi.clickhouse_orm
Commit Name: 38472012dbf35fb9bf123d524f9a0a18ff096eb7
Time: 2017-10-03
Author: tsionyx@gmail.com
File Name: src/infi/clickhouse_orm/fields.py
Class Name: DateTimeField
Method Name: to_python