bug fixes

This commit is contained in:
Oleg Sheynin
2025-07-25 06:39:17 +00:00
parent 1af35000ab
commit bcf4447cb6
6 changed files with 601 additions and 820 deletions
+1 -1
View File
@@ -417,7 +417,7 @@ class BacktestResult:
# Print pair returns with disequilibrium information
day_return = 0.0
if self.pairs_trades_[pair]:
if pair in self.pairs_trades_:
print(f"{pair}:")
pair_return = 0.0
+6
View File
@@ -6,6 +6,12 @@ import pandas as pd
def load_sqlite_to_dataframe(db_path:str, query:str) -> pd.DataFrame:
df: pd.DataFrame = pd.DataFrame()
import os
if not os.path.exists(db_path):
print(f"WARNING: database file {db_path} does not exist")
return df
try:
conn = sqlite3.connect(db_path)