namespace YLErp.Modules.TradeModule.ExoticOptionModule
{
///
/// 预付金雪球赔付
///
public abstract class PrepaymentSnowballPayoff
{
///
/// 利息金额(买方角度)
///
public double InterestAmount { get; set; }
///
/// 预付金金额(买方角度)
///
public double PrepaymentAmount { get; set; }
///
/// 倒置符号(将正值倒置为负值,负值倒置为正值)
///
public virtual void InvertSign()
{
InterestAmount = -InterestAmount;
PrepaymentAmount = -PrepaymentAmount;
}
}
///
/// 雪球敲出赔付
///
public class PrepaymentSnowballKoPayoff : PrepaymentSnowballPayoff
{
///
/// 票息金额(买方金额)
///
public double CouponPaymentAmount { get; set; }
///
/// 增强收益金额(买方金额)
///
public double EnhancedPaymentAmount { get; set; }
///
/// 敲出票息开始日
///
public DateTime CouponStartDate { get; set; }
///
/// 敲出票息结束日
///
public DateTime CouponEndDate { get; set; }
///
/// 票息率
///
public double CouponRate { get; set; }
public double TotalAmount()
{
return CouponPaymentAmount + EnhancedPaymentAmount + InterestAmount;
}
public override void InvertSign()
{
base.InvertSign();
CouponPaymentAmount = -CouponPaymentAmount;
EnhancedPaymentAmount = -EnhancedPaymentAmount;
}
}
///
/// 雪球到期日敲入赔付
///
public class PrepaymentSnowballKiPayoff : PrepaymentSnowballPayoff
{
///
/// 期权赔付金额(买方角度)
///
public double OptionPaymentAmount { get; set; }
public double TotalAmount()
{
return OptionPaymentAmount + InterestAmount;
}
public override void InvertSign()
{
base.InvertSign();
OptionPaymentAmount = -OptionPaymentAmount;
}
}
///
/// 雪球到期日未敲入赔付
///
public class PrepaymentSnowballNkiPayoff : PrepaymentSnowballPayoff
{
///
/// 红利票息赔付金额(买方角度)
///
public double CouponPaymentAmount { get; set; }
public double TotalAmount()
{
return CouponPaymentAmount + InterestAmount;
}
public override void InvertSign()
{
base.InvertSign();
CouponPaymentAmount = -CouponPaymentAmount;
}
}
///
/// 雪球观察结果类型
///
public enum SnowballObservationResultType
{
///
/// 非观察日
///
NonObservationDay,
///
/// 观察中
///
Monitoring,
///
/// 敲入状态
///
KnockedIn,
///
/// 敲出赔付
///
KoPayoff,
///
/// 到期日敲入赔付
///
KiPayoffAtEndDate,
///
/// 到期日非敲入赔付
///
NkiPayoffAtEndDate
}
///
/// 雪球观察结果
///
public class SnowballObservationResult
{
///
/// 观察结果类型
///
public SnowballObservationResultType ResultType { get; set; }
///
/// 支付日期
///
public DateTime PaymentDate { get; set; }
///
/// 支付总金额(买方角度)
///
public double PaymentAmount { get; set; }
///
/// 敲出障碍价格
///
public double KoBarrier { get; set; }
///
/// 赔付明细
///
public PrepaymentSnowballPayoff Payoff { get; set; }
}
}