diff --git a/bktest/cli.py b/bktest/cli.py index a3b4bb6..90afb65 100644 --- a/bktest/cli.py +++ b/bktest/cli.py @@ -92,6 +92,7 @@ @click.option('--file-parquet-column-date', type=str, default="date", show_default=True, help="Specify the column name containing the dates.") @click.option('--file-parquet-column-symbol', type=str, default="symbol", show_default=True, help="Specify the column name containing the symbols.") @click.option('--file-parquet-column-price', type=str, default="price", show_default=True, help="Specify the column name containing the prices.") +@click.option('--work-with-returns', is_flag=True, help="Use returns instead of prices.") # @click.pass_context def cli(ctx: click.Context, **kwargs): @@ -138,7 +139,7 @@ def main( # factset: bool, factset_username_serial: str, factset_api_key: str, # - file_parquet, file_parquet_column_date, file_parquet_column_symbol, file_parquet_column_price, + file_parquet, file_parquet_column_date, file_parquet_column_symbol, file_parquet_column_price, work_with_returns ): logging.getLogger('matplotlib.font_manager').setLevel(logging.ERROR) @@ -336,7 +337,8 @@ def main( caching=not no_caching, allow_weekends=weekends, allow_holidays=holidays, - holiday_provider=holiday_provider + holiday_provider=holiday_provider, + work_with_prices=not work_with_returns ).run()