We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb9ee29 commit b7a566dCopy full SHA for b7a566d
examples/joinquant/new_stocks_purchase.py
@@ -23,4 +23,7 @@ def process_initialize(context):
23
24
25
def purchase_new_stocks(context):
26
- g.__executor.purchase_new_stocks()
+ if context.run_params.type == 'sim_trade':
27
+ g.__executor.purchase_new_stocks()
28
+ else:
29
+ log.info('回测中不进行新股申购')
examples/ricequant/new_stocks_purchase.py
@@ -24,4 +24,7 @@ def before_trading(context):
def purchase_new_stocks(context, bar_dict):
- context.__executor.purchase_new_stocks()
+ if context.run_info.run_type == RUN_TYPE.PAPER_TRADING:
+ context.__executor.purchase_new_stocks()
30
+ logger.info('回测中不进行新股申购')
0 commit comments