Skip to content

Commit

Permalink
(feat) simplify file templates
Browse files Browse the repository at this point in the history
  • Loading branch information
cardosofede committed Oct 3, 2023
1 parent 87a0f1d commit c6b7202
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/file_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def get_optuna_suggest_str(field_name: str, properties: Dict):
if field_name == "candles_config":
return f"""{field_name}=[
CandlesConfig(connector=exchange, trading_pair=trading_pair,
interval="3m", max_records=1000000) # Max number of candles for the real-time bot,
interval="1h", max_records=1000000)
]"""
if field_name == "strategy_name":
return f"{field_name}='{properties.get('default', '_')}'"
Expand Down Expand Up @@ -111,8 +111,8 @@ def strategy_optimization_template(strategy_info: dict):
def objective(trial):
try:
# General configuration for the backtesting
exchange = trial.suggest_categorical('exchange', ['binance_perpetual', ])
trading_pair = trial.suggest_categorical('trading_pair', ['BTC-USDT', ])
exchange = "binance_perpetual"
trading_pair = "BTC-USDT"
start = "2023-01-01"
end = "2023-08-01"
initial_portfolio_usd = 1000.0
Expand Down

0 comments on commit c6b7202

Please sign in to comment.