Add year to backtest breakdowns
This commit is contained in:
@@ -59,7 +59,7 @@ AVAILABLE_PAIRLISTS = [
|
|||||||
"VolatilityFilter",
|
"VolatilityFilter",
|
||||||
]
|
]
|
||||||
AVAILABLE_DATAHANDLERS = ["json", "jsongz", "feather", "parquet"]
|
AVAILABLE_DATAHANDLERS = ["json", "jsongz", "feather", "parquet"]
|
||||||
BACKTEST_BREAKDOWNS = ["day", "week", "month"]
|
BACKTEST_BREAKDOWNS = ["day", "week", "month", "year"]
|
||||||
BACKTEST_CACHE_AGE = ["none", "day", "week", "month"]
|
BACKTEST_CACHE_AGE = ["none", "day", "week", "month"]
|
||||||
BACKTEST_CACHE_DEFAULT = "day"
|
BACKTEST_CACHE_DEFAULT = "day"
|
||||||
DRY_RUN_WALLET = 1000
|
DRY_RUN_WALLET = 1000
|
||||||
|
|||||||
@@ -212,6 +212,8 @@ def _get_resample_from_period(period: str) -> str:
|
|||||||
return "1W-MON"
|
return "1W-MON"
|
||||||
if period == "month":
|
if period == "month":
|
||||||
return "1ME"
|
return "1ME"
|
||||||
|
if period == "year":
|
||||||
|
return "1Y"
|
||||||
raise ValueError(f"Period {period} is not supported.")
|
raise ValueError(f"Period {period} is not supported.")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user