quantopy.ReturnDataFrame.mean

ReturnDataFrame.mean()[source]

Compute the arithmetic mean of pasts returns.

Returns
ReturnSeries

The arithmetic mean of past returns.

Examples

>>> rdf = qp.ReturnDataFrame(
            {
                "stock_1": [0.5, 0.333333],
                "stock_2": [-0.333333, 0.75]
            }
    )
>>> rdf.mean()
stock_1    0.416666
stock_2    0.208334
dtype: float64