mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
25fb571a0f
- A draft of the "Quick Start" section for your README. - Enable logging of backtesting in Qlib and store rich-text descriptions in Trace. - Support one-step debugging for factor extraction.
39 lines
837 B
Python
39 lines
837 B
Python
"""
|
|
Factor workflow with session control
|
|
"""
|
|
|
|
import fire
|
|
|
|
from rdagent.app.qlib_rd_loop.conf import FACTOR_PROP_SETTING
|
|
from rdagent.components.workflow.rd_loop import RDLoop
|
|
from rdagent.core.exception import FactorEmptyError
|
|
|
|
|
|
class FactorRDLoop(RDLoop):
|
|
skip_loop_error = (FactorEmptyError,)
|
|
|
|
|
|
def main(path=None, step_n=None):
|
|
"""
|
|
You can continue running session by
|
|
|
|
.. code-block:: python
|
|
|
|
dotenv run -- python rdagent/app/qlib_rd_loop/factor_w_sc.py $LOG_PATH/__session__/1/0_propose --step_n 1 # `step_n` is a optional paramter
|
|
|
|
"""
|
|
if path is None:
|
|
model_loop = FactorRDLoop(FACTOR_PROP_SETTING)
|
|
else:
|
|
model_loop = FactorRDLoop.load(path)
|
|
model_loop.run(step_n=step_n)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
fire.Fire(main)
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
fire.Fire(main)
|