We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.11.3
3.8.10
Windows
目前使用run_file的形式运行策略,并使用 rqalpha-mod-incremental进行策略持久化; 由于策略会每日读取一个文件,目前用如下方式:
run_file("./strategy/strategy_test.py", config={ ... "extra": { "log_level": "info", "context_vars": {"file": "当日加载的文件路径"}, }, ... })
通过 context_vars 的形式进行传值给 ucontext 会被 persist_helper 中之前的内容覆盖 main.py#L205 ; 目前的解决方法就是直接固定死context_vars中需要读取的文件路径,然后每日进行覆盖,但感觉这种方式不太灵活;请问下有没有更好的方式对持久化的策略传参呢?
ucontext
persist_helper
The text was updated successfully, but these errors were encountered:
策略内动态调整的参数应该在 before_trading 阶段读取。persisit的目的是保存策略运行状态。
before_trading
Sorry, something went wrong.
No branches or pull requests
1. RQAlpha的版本
4.11.3
2. Python的版本
3.8.10
3. 是Windows/Linux/MacOS or others?
Windows
4. 您出现问题对应的源码/或者能复现问题的简易代码 以及对应的配置
目前使用run_file的形式运行策略,并使用 rqalpha-mod-incremental进行策略持久化; 由于策略会每日读取一个文件,目前用如下方式:
通过 context_vars 的形式进行传值给
ucontext
会被persist_helper
中之前的内容覆盖 main.py#L205 ;目前的解决方法就是直接固定死context_vars中需要读取的文件路径,然后每日进行覆盖,但感觉这种方式不太灵活;请问下有没有更好的方式对持久化的策略传参呢?
The text was updated successfully, but these errors were encountered: