def macd(df, ewa_short, ewa_long, ewa_signal, price_col="adj_close"):
    """Moving Average Convergence Divergence
    Parameters:
    -----------
    df : DataFrame
        Input dataframe.
    ewa_short : int
        Exponentially weighted average time-window for a short time-span.
        A common choice for the short time-window is 12 intervals.
    ewa_long : int
        Exponentially weighted average time-window for a longer time-span.
        A common choice for the long time-window is 26 intervals.
    ewa_signal : int
        Time-window for the EWA of the difference between long and short
        averages.
    price_col : str
        Column name in `df` used for defining the current indicator (e.g. "open",
        "close", etc.)
    Returns:
    --------
    macd_ts : Series
        Moving average convergence-divergence indicator for the time series.
    """
    ewa_short = int(ewa_short)
    ewa_long = int(ewa_long)
    ewa_signal = int(ewa_signal)
    ewa12 = df[price_col].ewm(span=ewa_short).mean()
    ewa26 = df[price_col].ewm(span=ewa_long).mean()
    macd_ts = ewa12 - ewa26
    signal_line = macd_ts.ewm(span=ewa_signal).mean()
    return macd_ts - signal_line, 'stationary'