Consider removing the commented out code block
1021 cmap=cmap,
1022 cbar_kws={"format": "%.0f%%"},
1023 )
1024 # _sns.set(font_scale=1)1025
1026 # align plot to match other
1027 if ylabel:
Consider removing the commented out code block
971 fig.set_facecolor("white")
972 ax.set_facecolor("white")
973
974 # _sns.set(font_scale=.9) 975 if active and benchmark is not None:
976 ax.set_title(
977 f"{returns_label} - Monthly Active Returns (%)\n",
Consider removing the commented out code block
946 show=True,
947 active=False,
948):
949 # colors, ls, alpha = _core._get_colors(grayscale) 950 cmap = "gray" if grayscale else "RdYlGn"
951
952 returns = _stats.monthly_returns(returns, eoy=eoy, compounded=compounded) * 100
Consider removing the commented out code block
217 axes[2].axhline(0, color=colors[-1], linestyle="--", lw=1, zorder=2)
218
219 axes[2].set_yscale("symlog" if log_scale else "linear")
220 # axes[2].legend(fontsize=12) 221
222 retmax = _utils._round_to_closest(returns.max() * 100, 5)
223 retmin = _utils._round_to_closest(returns.min() * 100, 5)
Consider removing the commented out code block
199 )
200
201 axes[1].set_yscale("symlog" if log_scale else "linear")
202 # axes[1].legend(fontsize=12) 203
204 axes[2].set_ylabel(
205 "Daily Return", fontname=fontname, fontweight="bold", fontsize=12
Consider removing the commented out code block
180 ddmin_ticks = ddmin / 3
181 ddmin_ticks = int(_utils._round_to_closest(ddmin_ticks, 5))
182
183 # ddmin_ticks = int(_utils._round_to_closest(ddmin, 5)) 184 axes[1].set_ylabel("Drawdown", fontname=fontname, fontweight="bold", fontsize=12)
185 axes[1].set_yticks(_np.arange(-ddmin, 0, step=ddmin_ticks))
186 if isinstance(dd, _pd.Series):
Consider removing the commented out code block
169 axes[0].axhline(0, color="silver", lw=1, zorder=0)
170
171 axes[0].set_yscale("symlog" if log_scale else "linear")
172 # axes[0].legend(fontsize=12) 173
174 dd = _stats.to_drawdown_series(returns) * 100
175 ddmin = _utils._round_to_closest(abs(dd.min()), 5)
Description
It is recommended to remove any commented code in your codebase.
Bad practice
for item in sequence:
# print(item)
do_something(item)
# def old_function():
# '''Older implementation that has been replaced'''
# data = get_data()
# api.post(data)
Recommended
for item in sequence:
do_something(item)