public static Either <Error, Maturity> GetMaturity(this Tenor tenor) { var multiplier = (tenor.ToString()[0]) switch { 'M' => 1D / 12, _ => 1, }; var right = int.Parse(tenor.ToString().Substring(1)); return(Maturity.TryCreate(right * multiplier)); }
public OutputFrequency(OutputSeries outputSeries, Maturity maximumMaturity) { OutputSeries = outputSeries; MaximumMaturity = maximumMaturity; }