def to_monthly(metric: float, holding_periods: int = 1):
    """
    Transform metric of arbitrary periodicity to monthly

    :param metric: Metric to transform
    :param holding_periods: Number of holding periods
    :return: Monthly metric
    """

    trans_ratio = 30 / holding_periods

    return (1 + metric) ** trans_ratio - 1