mirror of
https://github.com/wassname/options_backtester.git
synced 2026-09-10 12:22:57 +08:00
reindex symbol_df
This commit is contained in:
@@ -125,7 +125,12 @@ def _merge(symbol, symbol_df):
|
||||
parse_dates=["date"],
|
||||
index_col="date")
|
||||
symbol_df.index = symbol_df["date"]
|
||||
|
||||
sequence = [
|
||||
"symbol", "date", "adjClose", "adjHigh", "adjLow", "adjOpen",
|
||||
"adjVolume", "close", "divCash", "high", "low", "open", "splitFactor",
|
||||
"volume"
|
||||
]
|
||||
symbol_df = symbol_df.reindex(columns=sequence)
|
||||
diffs = old_df.index.difference(symbol_df.index)
|
||||
|
||||
if diffs.empty:
|
||||
|
||||
Reference in New Issue
Block a user