def _get_hpr(M_t, flow_t, M_t1):
    """Get Holding Period Return (HPR)

    Formula variable definitions taken from here:
        https://en.wikipedia.org/wiki/Time-weighted_return#Time-weighted_return_compensating_for_external_flows

    Put in separate function basically just for documentation purposes.
    The calculation is simple, but the interpretation needs clarification.

    Args:
        M_t (scalar or Series): Money at time t, immediately after flow_t
            (includes cash flow at time t)
        flow_t (scalar or Series): Cash flow immediately prior to calculating
            M_T, but at time t
        M_t1 (scalar or Series): Money at time t-1

    Returns:
        [type]: [description]
    """
    return (M_t - flow_t)/M_t1