package com.smppw.core.trend.calc;


import com.smppw.common.pojo.dto.DateValue;
import com.smppw.common.pojo.enums.TrendType;
import com.smppw.core.trend.Trend;
import com.smppw.core.trend.TrendFactory;

import java.util.List;

public class ExtraDrawdownTrend extends Trend {

    @Override
    public List<DateValue> getDateValueTrend(List<String> dateList, List<DateValue> secNavList, List<DateValue> benchmarkNavList) {
        Trend extraNavTrend = TrendFactory.getInstance().get(TrendType.ExtraNav);
        List<DateValue> secExtraNavList = extraNavTrend.getDateValueTrend(null, secNavList, benchmarkNavList);

        Trend drawdownTrend = TrendFactory.getInstance().get(TrendType.DrawdownTrend);
        List<DateValue> drawDownValueList = drawdownTrend.getDateValueTrend(dateList, secExtraNavList, null);
        return drawDownValueList;
    }
}
