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;

/**
 * 超额夏普比率 几何算法
 *
 * @author lizhuang
 * @date 2022/4/28 9:35
 */
public class ExcessReturnSharpeRatioExtra 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;
//        }
        SharpeRatio sr = new SharpeRatio();
        return sr.calc(list, frequency, ifAnnualized);
    }
}
