def plot_factor_rank_auto_correlation(factor_autocorrelation,
                                      period=1,
                                      ax=None):
    """
    Plots factor rank autocorrelation over time.
    See factor_rank_autocorrelation for more details.

    Parameters
    ----------
    factor_autocorrelation : pd.Series
        Rolling 1 period (defined by time_rule) autocorrelation
        of factor values.
    period: int, optional
        Period over which the autocorrelation is calculated
    ax : matplotlib.Axes, optional
        Axes upon which to plot.

    Returns
    -------
    ax : matplotlib.Axes
        The axes that were plotted on.
    """
    if ax is None:
        f, ax = plt.subplots(1, 1, figsize=(18, 6))

    factor_autocorrelation.plot(title='{} Period Factor Rank Autocorrelation'
                                .format(period), ax=ax)
    ax.set(ylabel='Autocorrelation Coefficient', xlabel='')
    ax.axhline(0.0, linestyle='-', color='black', lw=1)
    ax.text(.05, .95, "Mean %.3f" % factor_autocorrelation.mean(),
            fontsize=16,
            bbox={'facecolor': 'white', 'alpha': 1, 'pad': 5},
            transform=ax.transAxes,
            verticalalignment='top')

    return ax
def plot_factor_rank_auto_correlation ( factor_autocorrelation , period = 1 , ax = None ) : if ax is None : f , ax = plt . subplots ( 1 , 1 , figsize = ( 18 , 6 ) ) factor_autocorrelation . plot ( title = '{} Period Factor Rank Autocorrelation' . format ( period ) , ax = ax ) ax . set ( ylabel = 'Autocorrelation Coefficient' , xlabel = '' ) ax . axhline ( 0.0 , linestyle = '-' , color = 'black' , lw = 1 ) ax . text ( .05 , .95 , "Mean %.3f" % factor_autocorrelation . mean ( ) , fontsize = 16 , bbox = { 'facecolor' : 'white' , 'alpha' : 1 , 'pad' : 5 } , transform = ax . transAxes , verticalalignment = 'top' ) return ax
Plots factor rank autocorrelation over time.
    See factor_rank_autocorrelation for more details.

    Parameters
    ----------
    factor_autocorrelation : pd.Series
        Rolling 1 period (defined by time_rule) autocorrelation
        of factor values.
    period: int, optional
        Period over which the autocorrelation is calculated
    ax : matplotlib.Axes, optional
        Axes upon which to plot.

    Returns
    -------
    ax : matplotlib.Axes
        The axes that were plotted on.