package com.smppw.core.reta;


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

import java.util.List;

/**
 * @author zhengsongliang
 * @datetime 2017年7月26日 下午3:21:51
 */
public abstract class Rate {
	public Double calc(List<CompoundRet> list, Frequency frequency, boolean ifAnnualized) {
		return null;
	}

	public Double calc(List<DateValue> dateValues) {
		return null;
	}

	public Double calc(List<DateValue> navList, List<DateValue> benchMark, Frequency frequency, boolean ifAnnualized) {
		return null;
	}

	public static Double AnnualizedBySqrt(double value, Frequency frequency) {
		return value * Math.sqrt(frequency.getNum());
	}
}
