ranaroussi / quantstats

Line too long FLK-E501
Style
Minor
14 occurrences in this check
line too long (98 > 88 characters)
1046            _stats.win_rate(df, compounded=compounded, aggregate="Q", prepare_returns=False) * pct
1047        )
1048        metrics["Win Year %%"] = (
1049            _stats.win_rate(df, compounded=compounded, aggregate="A", prepare_returns=False) * pct1050        )
1051
1052        if "benchmark" in df:
line too long (98 > 88 characters)
1043            _stats.win_rate(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct
1044        )
1045        metrics["Win Quarter %%"] = (
1046            _stats.win_rate(df, compounded=compounded, aggregate="Q", prepare_returns=False) * pct1047        )
1048        metrics["Win Year %%"] = (
1049            _stats.win_rate(df, compounded=compounded, aggregate="A", prepare_returns=False) * pct
line too long (98 > 88 characters)
1040        )
1041        metrics["Win Days %%"] = _stats.win_rate(df, prepare_returns=False) * pct
1042        metrics["Win Month %%"] = (
1043            _stats.win_rate(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct1044        )
1045        metrics["Win Quarter %%"] = (
1046            _stats.win_rate(df, compounded=compounded, aggregate="Q", prepare_returns=False) * pct
line too long (98 > 88 characters)
1036            _stats.avg_win(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct
1037        )
1038        metrics["Avg. Down Month %"] = (
1039            _stats.avg_loss(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct1040        )
1041        metrics["Win Days %%"] = _stats.win_rate(df, prepare_returns=False) * pct
1042        metrics["Win Month %%"] = (
line too long (97 > 88 characters)
1033    if mode.lower() == "full":
1034        metrics["~~~~~"] = blank
1035        metrics["Avg. Up Month %"] = (
1036            _stats.avg_win(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct1037        )
1038        metrics["Avg. Down Month %"] = (
1039            _stats.avg_loss(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct
line too long (95 > 88 characters)
1018            _stats.best(df, compounded=compounded, aggregate="A", prepare_returns=False) * pct
1019        )
1020        metrics["Worst Year %"] = (
1021            _stats.worst(df, compounded=compounded, aggregate="A", prepare_returns=False) * pct1022        )
1023
1024    # dd
line too long (94 > 88 characters)
1015            _stats.worst(df, aggregate="M", prepare_returns=False) * pct
1016        )
1017        metrics["Best Year %"] = (
1018            _stats.best(df, compounded=compounded, aggregate="A", prepare_returns=False) * pct1019        )
1020        metrics["Worst Year %"] = (
1021            _stats.worst(df, compounded=compounded, aggregate="A", prepare_returns=False) * pct
line too long (94 > 88 characters)
1009        metrics["Best Day %"] = _stats.best(df, compounded=compounded, prepare_returns=False) * pct
1010        metrics["Worst Day %"] = _stats.worst(df, prepare_returns=False) * pct
1011        metrics["Best Month %"] = (
1012            _stats.best(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct1013        )
1014        metrics["Worst Month %"] = (
1015            _stats.worst(df, aggregate="M", prepare_returns=False) * pct
line too long (99 > 88 characters)
1006    # best/worst
1007    if mode.lower() == "full":
1008        metrics["~~~"] = blank
1009        metrics["Best Day %"] = _stats.best(df, compounded=compounded, prepare_returns=False) * pct1010        metrics["Worst Day %"] = _stats.worst(df, prepare_returns=False) * pct
1011        metrics["Best Month %"] = (
1012            _stats.best(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct
line too long (105 > 88 characters)
 938            _stats.expected_return(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct
 939        )
 940        metrics["Expected Yearly %%"] = (
 941            _stats.expected_return(df, compounded=compounded, aggregate="A", prepare_returns=False) * pct 942        )
 943        metrics["Kelly Criterion %"] = (
 944            _stats.kelly_criterion(df, prepare_returns=False) * pct
line too long (105 > 88 characters)
 935            _stats.expected_return(df, compounded=compounded, prepare_returns=False) * pct
 936        )
 937        metrics["Expected Monthly %%"] = (
 938            _stats.expected_return(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct 939        )
 940        metrics["Expected Yearly %%"] = (
 941            _stats.expected_return(df, compounded=compounded, aggregate="A", prepare_returns=False) * pct
line too long (90 > 88 characters)
 932        metrics["~~~~~~~~~~"] = blank
 933
 934        metrics["Expected Daily %%"] = (
 935            _stats.expected_return(df, compounded=compounded, prepare_returns=False) * pct 936        )
 937        metrics["Expected Monthly %%"] = (
 938            _stats.expected_return(df, compounded=compounded, aggregate="M", prepare_returns=False) * pct
line too long (130 > 88 characters)
 105            0,
 106            -0.05,
 107            "            * When a multi-column DataFrame is passed, the mean of all columns will be used as returns.\n"
 108            "              To change this behavior, use a pandas Series or pass the column name in the `strategy_col` parameter.", 109            ha="left",
 110            fontsize=11,
 111            color="black",
line too long (119 > 88 characters)
 104        _plt.figtext(
 105            0,
 106            -0.05,
 107            "            * When a multi-column DataFrame is passed, the mean of all columns will be used as returns.\n" 108            "              To change this behavior, use a pandas Series or pass the column name in the `strategy_col` parameter.",
 109            ha="left",
 110            fontsize=11,