package com.smppw.core.reta.calc;

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

import java.util.List;

/**
 * 超额索提诺
 */
public class ExcessReturnSortinoRatio extends Rate {
    @Override
    public Double calc(List<CompoundRet> list, Frequency frequency, boolean ifAnnualized) {
        if (list == null || list.isEmpty()) {
            return null;
        }
//        ExcessReturnRealTimeCalc excessReturnRealTimeCalc = new ExcessReturnRealTimeCalc();
//        List<CompoundRet> compoundRets = excessReturnRealTimeCalc.transValue(list);
//        if (compoundRets == null || compoundRets.isEmpty()) {
//            return null;
//        }
        SortinoRatio sr = new SortinoRatio();
        return sr.calc(list, frequency, ifAnnualized);
    }
}
