call_formula - 调用模型

call_formula 是 QMT 内置 Python 中用于调用模型的接口。

原型

call_formula(formula_name,stock_code,period,start_time="",end_time="",count=-1,dividend_type="none",extend_param={})

释义

call_formula 是 QMT 内置 Python 中用于调用模型的接口。

研究:官方目录未明确;回测:官方目录未明确;模拟:官方目录未明确;实盘:官方目录未明确。

参数

参数 是否必填 官方原始定义
formula_name formula_name
stock_code stock_code
period period
start_time start_time=""
end_time end_time=""
count count=-1
dividend_type dividend_type="none"
extend_param extend_param={}

返回值

以实际接口返回和下方详细说明为准。

示例

示例

def handlebar(ContextInfo):

basket={'600000.SH':0.06,'000001.SZ':0.01}

argsDict={'a':100,'__basket':basket}

modelRet=call_formula('单股模型示范','000300.SH','1d','20240101','20240201',-1,"none",argsDict)

print(modelRet)

详细说明