def test_rsi_confirmation_predict_proba(dollar_bar_dataframe):
    rsi_threshold = 45
    rsi_timeperiod = 25
    rsi_confirmation_period = 2
    rsi_moving_average_window = 2
    bar_arrival_rsi_strategy = RSIConfirmation(rsi_timeperiod, rsi_threshold, rsi_confirmation_period, rsi_moving_average_window)
    preds = bar_arrival_rsi_strategy.predict(dollar_bar_dataframe)
    pred_proba = bar_arrival_rsi_strategy.predict_proba(dollar_bar_dataframe)
    pred_to_idx_map = {0: 0, 1: 1}
    assert all((pred_proba.sum(axis=1) == 1))
    assert all(((pred_proba[(i, pred_to_idx_map[p])] == 1) for (i, p) in enumerate(preds)))
def test_rsi_confirmation_predict_proba(dollar_bar_dataframe):
    rsi_threshold = 45
    rsi_timeperiod = 25
    rsi_confirmation_period = 2
    rsi_moving_average_window = 2
    bar_arrival_rsi_strategy = RSIConfirmation(rsi_timeperiod, rsi_threshold, rsi_confirmation_period, rsi_moving_average_window)
    preds = bar_arrival_rsi_strategy.predict(dollar_bar_dataframe)
    pred_proba = bar_arrival_rsi_strategy.predict_proba(dollar_bar_dataframe)
    pred_to_idx_map = {0: 0, 1: 1}
    assert all((pred_proba.sum(axis=1) == 1))
    assert all(((pred_proba[(i, pred_to_idx_map[p])] == 1) for (i, p) in enumerate(preds)))