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:59
 */
public class ExcessReturnAnnualStdDevExtra 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;
//        }
        return new AnnualStdDev().calc(list, frequency, ifAnnualized);
    }
}
