ranaroussi / quantstats

Inconsistent return statements PYL-R1710
Style
Minor
11 occurrences in this check
Either all return statements in a function should return an expression, or none of them should.
 887        return fig
 888
 889
 890def rolling_sortino( 891    returns,
 892    benchmark=None,
 893    rf=0.0,
Either all return statements in a function should return an expression, or none of them should.
 837        return fig
 838
 839
 840def rolling_sharpe( 841    returns,
 842    benchmark=None,
 843    rf=0.0,
Either all return statements in a function should return an expression, or none of them should.
 794        return fig
 795
 796
 797def rolling_volatility( 798    returns,
 799    benchmark=None,
 800    period=126,
Either all return statements in a function should return an expression, or none of them should.
 750        return fig
 751
 752
 753def rolling_beta( 754    returns,
 755    benchmark,
 756    window1=126,
Either all return statements in a function should return an expression, or none of them should.
 712        return fig
 713
 714
 715def drawdowns_periods( 716    returns,
 717    periods=5,
 718    lw=1.5,
Either all return statements in a function should return an expression, or none of them should.
 669    )
 670
 671
 672def drawdown( 673    returns,
 674    grayscale=False,
 675    figsize=(10, 5),
Either all return statements in a function should return an expression, or none of them should.
 590        return fig
 591
 592
 593def distribution( 594    returns,
 595    fontname="Arial",
 596    grayscale=False,
Either all return statements in a function should return an expression, or none of them should.
 528        return fig
 529
 530
 531def yearly_returns( 532    returns,
 533    benchmark=None,
 534    fontname="Arial",
Either all return statements in a function should return an expression, or none of them should.
 483        return fig
 484
 485
 486def daily_returns( 487    returns,
 488    benchmark=None,
 489    grayscale=False,
Either all return statements in a function should return an expression, or none of them should.
 426        return fig
 427
 428
 429def log_returns( 430    returns,
 431    benchmark=None,
 432    grayscale=False,
Either all return statements in a function should return an expression, or none of them should.
 372    return None
 373
 374
 375def returns( 376    returns,
 377    benchmark=None,
 378    grayscale=False,