Skip to content

Commit

Permalink
Fix Pandas FutureWarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Nov 26, 2024
1 parent aa0ded7 commit 62e671d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tradingstrategy/utils/forward_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def forward_fill(
single_or_multipair_data["volume"] = single_or_multipair_data["volume"].fillna(0.0)
case "close":
# Sparse close is the previous close
single_or_multipair_data["close"] = single_or_multipair_data["close"].fillna(method="ffill")
single_or_multipair_data["close"] = single_or_multipair_data["close"].ffill()
case "open" | "high" | "low":
# Fill open, high, low from the ffill'ed close.
single_or_multipair_data[column] = single_or_multipair_data[column].fillna(single_or_multipair_data["close"])
Expand Down

0 comments on commit 62e671d

Please sign in to comment.