package com.smppw.core.reta.calc;

import com.smppw.common.pojo.dto.CompoundRet;
import com.smppw.common.pojo.dto.DateValue;
import com.smppw.common.pojo.enums.Frequency;
import com.smppw.core.reta.Rate;

import java.util.List;

/**
 * 年化超额收益
 */
public class ExcessReturnAnnualized extends Rate {
    // 超额收益，用收益推算的方法
    public Double calc(List<CompoundRet> list, Frequency frequency, boolean ifAnnualized) {
        ExcessReturnRealTimeCalc erc = new ExcessReturnRealTimeCalc();
        return erc.calc(list, frequency, true);
    }

    @Override
    public Double calc(List<DateValue> dateValues) {
        return new AnnualReturn().calc(dateValues);
    }
}
