mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
@@ -52,6 +52,7 @@ BT_DATA_COLUMNS = [
|
|||||||
"open_timestamp",
|
"open_timestamp",
|
||||||
"close_timestamp",
|
"close_timestamp",
|
||||||
"orders",
|
"orders",
|
||||||
|
"funding_fees",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -356,6 +357,8 @@ def _load_backtest_data_df_compatibility(df: pd.DataFrame) -> pd.DataFrame:
|
|||||||
df["max_stake_amount"] = df["stake_amount"]
|
df["max_stake_amount"] = df["stake_amount"]
|
||||||
if "orders" not in df.columns:
|
if "orders" not in df.columns:
|
||||||
df["orders"] = None
|
df["orders"] = None
|
||||||
|
if "funding_fees" not in df.columns:
|
||||||
|
df["funding_fees"] = 0.0
|
||||||
return df
|
return df
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -828,6 +828,7 @@ def test_backtest_one(default_conf, mocker, testdatadir) -> None:
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
"funding_fees": [0.0, 0.0],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
pd.testing.assert_frame_equal(results, expected)
|
pd.testing.assert_frame_equal(results, expected)
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ def test_backtest_position_adjustment(default_conf, fee, mocker, testdatadir) ->
|
|||||||
"is_short": [False, False],
|
"is_short": [False, False],
|
||||||
"open_timestamp": [1517251200000, 1517283000000],
|
"open_timestamp": [1517251200000, 1517283000000],
|
||||||
"close_timestamp": [1517263200000, 1517285400000],
|
"close_timestamp": [1517263200000, 1517285400000],
|
||||||
|
"funding_fees": [0.0, 0.0],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
results_no = results.drop(columns=["orders"])
|
results_no = results.drop(columns=["orders"])
|
||||||
|
|||||||
Reference in New Issue
Block a user