GithubHelp home page GithubHelp logo

Comments (3)

umruuu avatar umruuu commented on June 4, 2024
    for param in params:
        cnt += 1
        print(f"{gpName} 正在回测{cnt}/{total}")
        name = param["name"]
        param_content = content.replace("$NAME$", name)
        if is_yaml:
            param_content = json.dumps(yaml.full_load(param_content))
        
        engine.configBacktest(param["start_time"], param["end_time"])
        time_range = (param["start_time"], param["end_time"])
        # 去掉多余的参数
        param.pop("start_time")
        param.pop("end_time")
        if self.cpp_stra_module is not None:
            param.pop("name")
            engine.setExternalCtaStrategy(name, self.cpp_stra_module, self.cpp_stra_type, param)
        else:
            straInfo = self.strategy_type(**param)
            engine.set_cta_strategy(straInfo,slippage=1)
        engine.commitBTConfig()

print(2)

        engine.run_backtest()# !!!!!!!!在这里中断了,没有任何提示,接下来就是summary.json找不到

print(1)

        self.__ayalyze_result__(name, time_range, param, capital, rf, period)

from wtpy.

wondertrader avatar wondertrader commented on June 4, 2024

没遇到过,我试试看

from wtpy.

wondertrader avatar wondertrader commented on June 4, 2024

这个问题,我怀疑和一些字符串长度的限制有关

from wtpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.