ranaroussi / quantstats

Consider removing the commented out code block PY-W0069
Anti-pattern
Major
5 occurrences in this check
Consider removing the commented out code block
 957
 958    metrics["Gain/Pain Ratio"] = _stats.gain_to_pain_ratio(df, rf)
 959    metrics["Gain/Pain (1M)"] = _stats.gain_to_pain_ratio(df, rf, "M")
 960    # if mode.lower() == 'full': 961    #     metrics['GPR (3M)'] = _stats.gain_to_pain_ratio(df, rf, "Q")
 962    #     metrics['GPR (6M)'] = _stats.gain_to_pain_ratio(df, rf, "2Q")
 963    #     metrics['GPR (1Y)'] = _stats.gain_to_pain_ratio(df, rf, "A")
Consider removing the commented out code block
 841    if mode.lower() == "full":
 842        # metrics['Prob. Sortino Ratio %'] = _stats.probabilistic_sortino_ratio(df, rf, win_year, False) * pct
 843        metrics["Smart Sortino"] = _stats.smart_sortino(df, rf, win_year, True)
 844        # metrics['Prob. Smart Sortino Ratio %'] = _stats.probabilistic_sortino_ratio(df, rf, win_year, False, True) * pct 845
 846    metrics["Sortino/√2"] = metrics["Sortino"] / _sqrt(2)
 847    if mode.lower() == "full":
Consider removing the commented out code block
 839
 840    metrics["Sortino"] = _stats.sortino(df, rf, win_year, True)
 841    if mode.lower() == "full":
 842        # metrics['Prob. Sortino Ratio %'] = _stats.probabilistic_sortino_ratio(df, rf, win_year, False) * pct 843        metrics["Smart Sortino"] = _stats.smart_sortino(df, rf, win_year, True)
 844        # metrics['Prob. Smart Sortino Ratio %'] = _stats.probabilistic_sortino_ratio(df, rf, win_year, False, True) * pct
 845
Consider removing the commented out code block
 835    )
 836    if mode.lower() == "full":
 837        metrics["Smart Sharpe"] = _stats.smart_sharpe(df, rf, win_year, True)
 838        # metrics['Prob. Smart Sharpe Ratio %'] = _stats.probabilistic_sharpe_ratio(df, rf, win_year, False, True) * pct 839
 840    metrics["Sortino"] = _stats.sortino(df, rf, win_year, True)
 841    if mode.lower() == "full":
Consider removing the commented out code block
 753    else:
 754        blank = [""]
 755
 756    # if isinstance(returns, _pd.DataFrame): 757    #     if len(returns.columns) > 1:
 758    #         raise ValueError("`returns` needs to be a Pandas Series or one column DataFrame. multi colums DataFrame was passed")
 759    #     returns = returns[returns.columns[0]]