@staticmethod
def calculate_exponential_historical_returns(asset_prices, resample_by=None,
    frequency=252, span=500):
    """
        Calculates the exponentially-weighted annualized mean of historical returns, giving
        higher weight to more recent data.

        :param asset_prices: (pd.DataFrame) Asset price data
        :param resample_by: (str) Period to resample data ['D','W','M' etc.] None for no resampling
        :param frequency: (int) Average number of observations per year
        :param span: (int) Window length to use in pandas ewm function
        :return: (pd.Series) Exponentially-weighted mean of historical returns
        """
    if resample_by:
        asset_prices = asset_prices.resample(resample_by).last()
    returns = asset_prices.pct_change().dropna(how='all')
    returns = returns.ewm(span=span).mean().iloc[-1] * frequency
    return returns
