Align JoinQuant targets to execution dates
This commit is contained in:
@@ -28,9 +28,23 @@ def joinquant():
|
||||
)
|
||||
@click.option("--start-date", default=None, help="Inclusive YYYY-MM-DD start date")
|
||||
@click.option("--end-date", default=None, help="Inclusive YYYY-MM-DD end date")
|
||||
@click.option(
|
||||
"--execution-calendar-path",
|
||||
default=None,
|
||||
help="Daily data parquet/dataset used to shift position dates to next execution session",
|
||||
)
|
||||
@click.option("--out-dir", default="plugins_output/joinquant/targets", show_default=True)
|
||||
@click.option("--force", is_flag=True, help="Overwrite frozen target/snapshot files")
|
||||
def export_targets_cmd(positions_path, portfolio_name, mode, start_date, end_date, out_dir, force):
|
||||
def export_targets_cmd(
|
||||
positions_path,
|
||||
portfolio_name,
|
||||
mode,
|
||||
start_date,
|
||||
end_date,
|
||||
execution_calendar_path,
|
||||
out_dir,
|
||||
force,
|
||||
):
|
||||
"""Export frozen daily target files for JoinQuant."""
|
||||
snapshots = export_targets(
|
||||
positions_path=positions_path,
|
||||
@@ -38,6 +52,7 @@ def export_targets_cmd(positions_path, portfolio_name, mode, start_date, end_dat
|
||||
mode=mode,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
execution_calendar_path=execution_calendar_path,
|
||||
out_dir=out_dir,
|
||||
force=force,
|
||||
)
|
||||
@@ -139,4 +154,3 @@ def write_wrapper_cmd(portfolio_name, mode, out_path, allow_short):
|
||||
allow_short=allow_short,
|
||||
)
|
||||
click.echo(f"Saved JoinQuant wrapper strategy: {path}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user