Skip to content

Commit 717fe0d

Browse files
committed
Fix string formatting
1 parent e25a5f4 commit 717fe0d

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

investing_algorithm_framework/infrastructure/data_providers/ccxt.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,12 @@ def prepare_backtest_data(
257257
end_date=backtest_end_date
258258
)
259259

260+
n_min = TimeFrame.from_value(self.time_frame).amount_of_minutes
260261
# Assume self.data is a Polars DataFrame with a "Datetime" column
261262
expected_dates = pl.datetime_range(
262263
start=required_start_date,
263264
end=backtest_end_date,
264-
interval=f"{
265-
TimeFrame.from_value(self.time_frame).amount_of_minutes
266-
}m",
265+
interval=f"{n_min}m",
267266
eager=True
268267
).to_list()
269268

investing_algorithm_framework/infrastructure/data_providers/csv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,13 @@ def prepare_backtest_data(
263263
TimeFrame.from_value(self.time_frame).amount_of_minutes * 60
264264
)
265265

266+
n_min = TimeFrame.from_value(self.time_frame).amount_of_minutes
267+
266268
# Assume self.data is a Polars DataFrame with a "Datetime" column
267269
expected_dates = pl.datetime_range(
268270
start=required_start_date,
269271
end=backtest_end_date,
270-
interval=f"{
271-
TimeFrame.from_value(self.time_frame).amount_of_minutes
272-
}m",
272+
interval=f"{n_min}m",
273273
eager=True
274274
).to_list()
275275

investing_algorithm_framework/infrastructure/data_providers/pandas.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,12 @@ def prepare_backtest_data(
294294
TimeFrame.from_value(self.time_frame).amount_of_minutes * 60
295295
)
296296

297+
n_min = TimeFrame.from_value(self.time_frame).amount_of_minutes
297298
# Assume self.data is a Polars DataFrame with a "Datetime" column
298299
expected_dates = pl.datetime_range(
299300
start=required_start_date,
300301
end=backtest_end_date,
301-
interval=f"{
302-
TimeFrame.from_value(self.time_frame).amount_of_minutes
303-
}m",
302+
interval=f"{n_min}m",
304303
eager=True
305304
).to_list()
306305

0 commit comments

Comments
 (0)