bug fixes
This commit is contained in:
@@ -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,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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user