fix(Labeling): use X.loc instead of X.filter, remove Nan from event_start_times

This commit is contained in:
Mark Aron Szulyovszky
2022-03-12 13:27:44 +01:00
parent b656f790f5
commit c1d79ac8c2
4 changed files with 4 additions and 4 deletions
@@ -18,7 +18,7 @@ class FixedTimeHorionThreeClassBalancedEventLabeller(EventLabeller):
forward_returns = create_forward_returns(returns, self.time_horizon)
cutoff_point = returns.index[-self.time_horizon]
event_start_times[event_start_times < cutoff_point]
event_start_times = event_start_times[event_start_times < cutoff_point]
event_candidates = forward_returns[event_start_times]
def get_bins_threeway(x):