def _modify(v, cutoff):

    """
        Modify volatility if negative volatility occurs during simulation

        Parameters
        ----------
        v: float
            volatility

        cutoff: str
            method to adjust volatility

            truncate: assume vol=0 if vol < 0
                cause volatility to be less

            reflect: assume vol=-vol if vol < 0
                cause volatility to be more

        Return
        ------
        _v: non-negative float
            modified volatility
    """

    if v >= 0:
        return v
    elif cutoff == 'truncate':
        return 0
    elif cutoff == 'reflect':
        return -v
    else:
        raise ValueError('Method does not exist.')