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.
 892        return fig
 893
 894
 895def rolling_sortino( 896    returns,
 897    benchmark=None,
 898    rf=0.0,
Either all return statements in a function should return an expression, or none of them should.
 842        return fig
 843
 844
 845def rolling_sharpe( 846    returns,
 847    benchmark=None,
 848    rf=0.0,
Either all return statements in a function should return an expression, or none of them should.
 799        return fig
 800
 801
 802def rolling_volatility( 803    returns,
 804    benchmark=None,
 805    period=126,
Either all return statements in a function should return an expression, or none of them should.
 755        return fig
 756
 757
 758def rolling_beta( 759    returns,
 760    benchmark,
 761    window1=126,
Either all return statements in a function should return an expression, or none of them should.
 717        return fig
 718
 719
 720def drawdowns_periods( 721    returns,
 722    periods=5,
 723    lw=1.5,
Either all return statements in a function should return an expression, or none of them should.
 674    )
 675
 676
 677def drawdown( 678    returns,
 679    grayscale=False,
 680    figsize=(10, 5),
Either all return statements in a function should return an expression, or none of them should.
 595        return fig
 596
 597
 598def distribution( 599    returns,
 600    fontname="Arial",
 601    grayscale=False,
Either all return statements in a function should return an expression, or none of them should.
 533        return fig
 534
 535
 536def yearly_returns( 537    returns,
 538    benchmark=None,
 539    fontname="Arial",
Either all return statements in a function should return an expression, or none of them should.
 488        return fig
 489
 490
 491def daily_returns( 492    returns,
 493    benchmark,
 494    grayscale=False,
Either all return statements in a function should return an expression, or none of them should.
 433        return fig
 434
 435
 436def log_returns( 437    returns,
 438    benchmark=None,
 439    grayscale=False,
Either all return statements in a function should return an expression, or none of them should.
 381    return None
 382
 383
 384def returns( 385    returns,
 386    benchmark=None,
 387    grayscale=False,