All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdm.product.common.schedule.functions.CdmToStrataMapper Maven / Gradle / Ivy

There is a newer version: 6.0.0-dev.92
Show newest version
package cdm.product.common.schedule.functions;

import cdm.product.common.schedule.CalculationPeriodDates;
import com.opengamma.strata.basics.schedule.Frequency;
import com.opengamma.strata.basics.schedule.RollConvention;

class CdmToStrataMapper {

    static Frequency getFrequency(CalculationPeriodDates calculationPeriodDates) {
        return Frequency.parse(calculationPeriodDates.getCalculationPeriodFrequency().getPeriodMultiplier().toString() + calculationPeriodDates.getCalculationPeriodFrequency().getPeriod().toString());
    }

    //
    static RollConvention getRollConvention(CalculationPeriodDates calculationPeriodDates) {
            String rollConventionName = calculationPeriodDates.getCalculationPeriodFrequency().getRollConvention().toString();
            // The display name of the match RollConvention using FpML
            return RollConvention.extendedEnum().externalNames("FpML").lookup(rollConventionName);


    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy