File: SwapRateHelper.cs

package info (click to toggle)
quantlib-swig 1.15-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 103,484 kB
  • sloc: cpp: 2,029,354; cs: 61,237; java: 45,425; perl: 27,362; python: 22,024; ruby: 989; sh: 741; makefile: 319
file content (160 lines) | stat: -rw-r--r-- 16,652 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 3.0.12
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------

namespace QuantLib {

public class SwapRateHelper : RateHelper {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;

  internal SwapRateHelper(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NQuantLibcPINVOKE.SwapRateHelper_SWIGUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SwapRateHelper obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  ~SwapRateHelper() {
    Dispose();
  }

  public override void Dispose() {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          NQuantLibcPINVOKE.delete_SwapRateHelper(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
      global::System.GC.SuppressFinalize(this);
      base.Dispose();
    }
  }

  public SwapRateHelper(QuoteHandle rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, uint settlementDays, Pillar.Choice pillar, Date customPillarDate) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_0(QuoteHandle.getCPtr(rate), Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), settlementDays, (int)pillar, Date.getCPtr(customPillarDate)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, uint settlementDays, Pillar.Choice pillar) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_1(QuoteHandle.getCPtr(rate), Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), settlementDays, (int)pillar), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, uint settlementDays) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_2(QuoteHandle.getCPtr(rate), Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), settlementDays), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_3(QuoteHandle.getCPtr(rate), Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_4(QuoteHandle.getCPtr(rate), Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_5(QuoteHandle.getCPtr(rate), Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_6(QuoteHandle.getCPtr(rate), Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, uint settlementDays, Pillar.Choice pillar, Date customPillarDate) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_7(rate, Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), settlementDays, (int)pillar, Date.getCPtr(customPillarDate)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, uint settlementDays, Pillar.Choice pillar) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_8(rate, Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), settlementDays, (int)pillar), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, uint settlementDays) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_9(rate, Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), settlementDays), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_10(rate, Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread, Period fwdStart) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_11(rate, Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index, QuoteHandle spread) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_12(rate, Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index), QuoteHandle.getCPtr(spread)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, Period tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, IborIndex index) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_13(rate, Period.getCPtr(tenor), Calendar.getCPtr(calendar), (int)fixedFrequency, (int)fixedConvention, DayCounter.getCPtr(fixedDayCount), IborIndex.getCPtr(index)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, SwapIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, Pillar.Choice pillar, Date customPillarDate) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_14(QuoteHandle.getCPtr(rate), SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), (int)pillar, Date.getCPtr(customPillarDate)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, SwapIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, Pillar.Choice pillar) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_15(QuoteHandle.getCPtr(rate), SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), (int)pillar), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, SwapIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_16(QuoteHandle.getCPtr(rate), SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, SwapIndex index, QuoteHandle spread, Period fwdStart) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_17(QuoteHandle.getCPtr(rate), SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, SwapIndex index, QuoteHandle spread) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_18(QuoteHandle.getCPtr(rate), SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(QuoteHandle rate, SwapIndex index) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_19(QuoteHandle.getCPtr(rate), SwapIndex.getCPtr(index)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, SwapIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, Pillar.Choice pillar, Date customPillarDate) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_20(rate, SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), (int)pillar, Date.getCPtr(customPillarDate)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, SwapIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve, Pillar.Choice pillar) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_21(rate, SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve), (int)pillar), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, SwapIndex index, QuoteHandle spread, Period fwdStart, YieldTermStructureHandle discountingCurve) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_22(rate, SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart), YieldTermStructureHandle.getCPtr(discountingCurve)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, SwapIndex index, QuoteHandle spread, Period fwdStart) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_23(rate, SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread), Period.getCPtr(fwdStart)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, SwapIndex index, QuoteHandle spread) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_24(rate, SwapIndex.getCPtr(index), QuoteHandle.getCPtr(spread)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public SwapRateHelper(double rate, SwapIndex index) : this(NQuantLibcPINVOKE.new_SwapRateHelper__SWIG_25(rate, SwapIndex.getCPtr(index)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public double spread() {
    double ret = NQuantLibcPINVOKE.SwapRateHelper_spread(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public VanillaSwap swap() {
    VanillaSwap ret = new VanillaSwap(NQuantLibcPINVOKE.SwapRateHelper_swap(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}