File: CashFlows.java

package info (click to toggle)
quantlib-swig 0.9.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 58,200 kB
  • ctags: 105,353
  • sloc: cpp: 1,047,001; ansic: 133,430; ml: 54,990; cs: 34,216; java: 23,659; perl: 17,882; python: 8,891; lisp: 2,337; ruby: 1,140; sh: 458; makefile: 355
file content (156 lines) | stat: -rw-r--r-- 9,243 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
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.33
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.quantlib;

public class CashFlows {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected CashFlows(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(CashFlows obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      QuantLibJNI.delete_CashFlows(swigCPtr);
    }
    swigCPtr = 0;
  }

  public static Date startDate(Leg arg0) {
    return new Date(QuantLibJNI.CashFlows_startDate(Leg.getCPtr(arg0), arg0), true);
  }

  public static Date maturityDate(Leg arg0) {
    return new Date(QuantLibJNI.CashFlows_maturityDate(Leg.getCPtr(arg0), arg0), true);
  }

  public static double npv(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate, Date npvDate, int exDividendDays) {
    return QuantLibJNI.CashFlows_npv__SWIG_0(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate, exDividendDays);
  }

  public static double npv(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate, Date npvDate) {
    return QuantLibJNI.CashFlows_npv__SWIG_1(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate);
  }

  public static double npv(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate) {
    return QuantLibJNI.CashFlows_npv__SWIG_2(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double npv(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve) {
    return QuantLibJNI.CashFlows_npv__SWIG_3(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve));
  }

  public static double npv(Leg arg0, InterestRate arg1, Date settlementDate) {
    return QuantLibJNI.CashFlows_npv__SWIG_4(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, Date.getCPtr(settlementDate), settlementDate);
  }

  public static double npv(Leg arg0, InterestRate arg1) {
    return QuantLibJNI.CashFlows_npv__SWIG_5(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1);
  }

  public static double bps(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate, Date npvDate, int exDividendDays) {
    return QuantLibJNI.CashFlows_bps__SWIG_0(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate, exDividendDays);
  }

  public static double bps(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate, Date npvDate) {
    return QuantLibJNI.CashFlows_bps__SWIG_1(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate);
  }

  public static double bps(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate) {
    return QuantLibJNI.CashFlows_bps__SWIG_2(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double bps(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve) {
    return QuantLibJNI.CashFlows_bps__SWIG_3(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve));
  }

  public static double bps(Leg arg0, InterestRate arg1, Date settlementDate) {
    return QuantLibJNI.CashFlows_bps__SWIG_4(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, Date.getCPtr(settlementDate), settlementDate);
  }

  public static double bps(Leg arg0, InterestRate arg1) {
    return QuantLibJNI.CashFlows_bps__SWIG_5(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1, Date settlementDate, Date npvDate, int exDividendDays, double npv) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_0(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate, exDividendDays, npv);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1, Date settlementDate, Date npvDate, int exDividendDays) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_1(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate, exDividendDays);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1, Date settlementDate, Date npvDate) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_2(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1, Date settlementDate) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_3(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_4(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1));
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate, double tolerance, long maxIterations, double guess) {
    return QuantLibJNI.CashFlows_irr__SWIG_0(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue(), Date.getCPtr(settlementDate), settlementDate, tolerance, maxIterations, guess);
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate, double tolerance, long maxIterations) {
    return QuantLibJNI.CashFlows_irr__SWIG_1(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue(), Date.getCPtr(settlementDate), settlementDate, tolerance, maxIterations);
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate, double tolerance) {
    return QuantLibJNI.CashFlows_irr__SWIG_2(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue(), Date.getCPtr(settlementDate), settlementDate, tolerance);
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate) {
    return QuantLibJNI.CashFlows_irr__SWIG_3(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue(), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency) {
    return QuantLibJNI.CashFlows_irr__SWIG_4(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue());
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding) {
    return QuantLibJNI.CashFlows_irr__SWIG_5(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue());
  }

  public static double duration(Leg arg0, InterestRate arg1, Duration.Type type, Date settlementDate) {
    return QuantLibJNI.CashFlows_duration__SWIG_0(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, type.swigValue(), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double duration(Leg arg0, InterestRate arg1, Duration.Type type) {
    return QuantLibJNI.CashFlows_duration__SWIG_1(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, type.swigValue());
  }

  public static double duration(Leg arg0, InterestRate arg1) {
    return QuantLibJNI.CashFlows_duration__SWIG_2(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1);
  }

  public static double convexity(Leg arg0, InterestRate arg1, Date settlementDate) {
    return QuantLibJNI.CashFlows_convexity__SWIG_0(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, Date.getCPtr(settlementDate), settlementDate);
  }

  public static double convexity(Leg arg0, InterestRate arg1) {
    return QuantLibJNI.CashFlows_convexity__SWIG_1(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1);
  }

}