本文整理汇总了C#中Leg.CurrentNominal方法的典型用法代码示例。如果您正苦于以下问题:C# Leg.CurrentNominal方法的具体用法?C# Leg.CurrentNominal怎么用?C# Leg.CurrentNominal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Leg
的用法示例。
在下文中一共展示了Leg.CurrentNominal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CompareLegs
bool CompareLegs(Leg leg1, Leg leg2, MurexProduct murex, bool isFloatFloat,
bool fullMatch, bool sameRef, ref string unmatchReason, DateTime dt)
{
var date = new SimpleDate(dt);
var time = dt;
if (leg1.NotionalCurrency != murex.Currency1)
{
if (!sameRef) return false;
else unmatchReason += "Currency1 ";
}
if (leg2.NotionalCurrency != murex.Currency2)
{
if (!sameRef) return false;
else unmatchReason += "Currency2 ";
}
if (leg1.StartDate != murex.EffectiveDate &&
leg1.FirstCalculationPeriodStart != murex.EffectiveDate)
{
if (!sameRef) return false;
else unmatchReason += "SwapStartDate ";
}
if (leg1.EndDate != murex.EndDate)
{
if (!sameRef) return false;
else unmatchReason += "SwapEndDate ";
}
if (Math.Abs(leg1.CurrentNominal(date, time, false) - murex.Nominal1) > _qtyTolerance)
{
if (fullMatch) return false;
else unmatchReason += "Nominal1 ";
}
if (Math.Abs(leg2.CurrentNominal(date, time, false) - murex.Nominal2) > _qtyTolerance)
{
if (fullMatch) return false;
else unmatchReason += "Nominal2 ";
}
if (!isFloatFloat && Math.Abs(leg1.FixedRate - murex.FixedRate) > _rateTolerance)
{
if (fullMatch) return false;
else unmatchReason += "FixedRate ";
}
if (Math.Abs(leg2.Spread - murex.Spread2) > _rateTolerance)
{
if (fullMatch) return false;
else unmatchReason += "Spread2 ";
}
if (leg2.FirstFixing != 0 && Math.Abs(leg2.FirstFixing - murex.FirstFixingRate2) > _rateTolerance)
{
if (fullMatch) return false;
else unmatchReason += "FirstFixing2 ";
}
if (isFloatFloat)
{
if (Math.Abs(leg1.Spread - murex.Spread1) > _rateTolerance)
{
if (fullMatch) return false;
else unmatchReason += "Spread1 ";
}
if (leg1.FirstFixing != 0 && Math.Abs(leg1.FirstFixing - murex.FirstFixingRate1) > _rateTolerance)
{
if (fullMatch) return false;
else unmatchReason += "FirstFixing1 ";
}
}
return true;
}