백테스트 수정중
This commit is contained in:
@@ -334,7 +334,7 @@ class BacktestEngine:
|
||||
avg_lose=0.0,
|
||||
max_win=0.0,
|
||||
max_lose=0.0,
|
||||
equity_curve=[],
|
||||
equity_curve=self.equity_curve,
|
||||
trades=[],
|
||||
final_positions=[]
|
||||
)
|
||||
@@ -445,7 +445,8 @@ class BacktestEngine:
|
||||
prev_portfolio_value = config.initial_capital
|
||||
|
||||
for current_date in all_dates:
|
||||
current_date_obj = datetime.strptime(current_date, "%Y%m%d").date()
|
||||
fmt = "%Y%m%d" if len(current_date) == 8 else "%Y-%m-%d"
|
||||
current_date_obj = datetime.strptime(current_date, fmt).date()
|
||||
|
||||
# 각 종목별 신호 생성 및 주문 실행
|
||||
current_prices = {}
|
||||
|
||||
Reference in New Issue
Block a user