.
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 |
23 | package org.jquantlib.cashflow;
24 |
25 | import org.jquantlib.time.Date;
26 |
27 | /**
28 | * Predetermined cash flow
29 | *
30 | * This cash flow pays a predetermined amount at a given date.
31 | *
32 | * @author Daniel Kong
33 | */
34 |
35 | public class FixedDividend extends Dividend {
36 |
37 | protected double amount;
38 |
39 | public FixedDividend(final double amount, final Date date) {
40 | super(date);
41 | this.amount = amount;
42 | }
43 |
44 |
45 | //
46 | // Overrides Dividend
47 | //
48 |
49 | @Override
50 | public double amount(final double underlying) {
51 | return amount;
52 | }
53 |
54 |
55 | //
56 | // Overrides Cashflow
57 | //
58 |
59 | @Override
60 | public double amount() {
61 | return amount;
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/AustraliaRegion.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | /**
25 | *
26 | * Australia as geographical/economic region
27 | * used for inflation applicability
28 | *
29 | * @author Tim Blackler
30 | */
31 | public class AustraliaRegion extends Region {
32 |
33 | public AustraliaRegion() {
34 | this.data = new Region.Data("Australia","AU");
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/DailyTenorEURLiborON.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 |
25 | import org.jquantlib.quotes.Handle;
26 | import org.jquantlib.termstructures.YieldTermStructure;
27 |
28 | /**
29 | * Overnight EUR Libor index
30 | *
31 | * @note This is the London fixing by BBA . Use Euribor if you're interested in the rate fixed by the ECB.
32 | *
33 | * @author Tim Blackler
34 | **/
35 | public class DailyTenorEURLiborON extends DailyTenorEURLibor {
36 |
37 | public DailyTenorEURLiborON() {
38 | this(new Handle());
39 | }
40 |
41 | public DailyTenorEURLiborON(final Handle h) {
42 | super(0, h);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor10M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 10-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor10M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor10M() {
42 | this(new Handle());
43 | }
44 | public EURLibor10M(final Handle h) {
45 | super(new Period(10, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor11M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 11-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor11M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor11M() {
42 | this(new Handle());
43 | }
44 | public EURLibor11M(final Handle h) {
45 | super(new Period(11, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor1M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor1M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor1M() {
42 | this(new Handle());
43 | }
44 | public EURLibor1M(final Handle h) {
45 | super(new Period(1, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor1Y.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-Year EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor1Y extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor1Y() {
42 | this(new Handle());
43 | }
44 | public EURLibor1Y(final Handle h) {
45 | super(new Period(1, TimeUnit.Years), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor2M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 2-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor2M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor2M() {
42 | this(new Handle());
43 | }
44 | public EURLibor2M(final Handle h) {
45 | super(new Period(2, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor2W.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 2-week EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor2W extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor2W() {
42 | this(new Handle());
43 | }
44 | public EURLibor2W(final Handle h) {
45 | super(new Period(2, TimeUnit.Weeks), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor3M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 3-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor3M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor3M() {
42 | this(new Handle());
43 | }
44 | public EURLibor3M(final Handle h) {
45 | super(new Period(3, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor4M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 4-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor4M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor4M() {
42 | this(new Handle());
43 | }
44 | public EURLibor4M(final Handle h) {
45 | super(new Period(4, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor5M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 5-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor5M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor5M() {
42 | this(new Handle());
43 | }
44 | public EURLibor5M(final Handle h) {
45 | super(new Period(5, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor6M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 6-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor6M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor6M() {
42 | this(new Handle());
43 | }
44 | public EURLibor6M(final Handle h) {
45 | super(new Period(6, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor7M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 7-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor7M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor7M() {
42 | this(new Handle());
43 | }
44 | public EURLibor7M(final Handle h) {
45 | super(new Period(7, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor8M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 8-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor8M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor8M() {
42 | this(new Handle());
43 | }
44 | public EURLibor8M(final Handle h) {
45 | super(new Period(8, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLibor9M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 9-months EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLibor9M extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLibor9M() {
42 | this(new Handle());
43 | }
44 | public EURLibor9M(final Handle h) {
45 | super(new Period(9, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURLiborSW.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-week EUR Libor index
31 | *
32 | * @author Tim Blackler
33 | */
34 | public class EURLiborSW extends EURLibor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EURLiborSW() {
42 | this(new Handle());
43 | }
44 | public EURLiborSW(final Handle h) {
45 | super(new Period(1, TimeUnit.Weeks), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EURegion.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | /**
25 | *
26 | * European Union as geographical/economic region
27 | * used for inflation applicability
28 | *
29 | * @author Tim Blackler
30 | */
31 | public class EURegion extends Region {
32 |
33 | public EURegion() {
34 | this.data = new Region.Data("EU","EU");
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor10M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 10-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor10M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor10M() {
42 | this(new Handle());
43 | }
44 | public Euribor10M(final Handle h) {
45 | super(new Period(10, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor11M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 11-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor11M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor11M() {
42 | this(new Handle());
43 | }
44 | public Euribor11M(final Handle h) {
45 | super(new Period(11, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor1M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-month Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor1M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor1M() {
42 | this(new Handle());
43 | }
44 | public Euribor1M(final Handle h) {
45 | super(new Period(1, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor1Y.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-year Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor1Y extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor1Y() {
42 | this(new Handle());
43 | }
44 | public Euribor1Y(final Handle h) {
45 | super(new Period(1, TimeUnit.Years), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor2M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 2-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor2M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor2M() {
42 | this(new Handle());
43 | }
44 | public Euribor2M(final Handle h) {
45 | super(new Period(2, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor2W.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 2-weeks Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor2W extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor2W() {
42 | this(new Handle());
43 | }
44 | public Euribor2W(final Handle h) {
45 | super(new Period(2, TimeUnit.Weeks), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_10M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 10-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_10M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_10M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_10M(final Handle h) {
45 | super(new Period(10, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_11M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 11-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_11M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_11M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_11M(final Handle h) {
45 | super(new Period(11, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_1M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-month Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_1M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_1M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_1M(final Handle h) {
45 | super(new Period(1, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_1Y.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-year Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_1Y extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_1Y() {
42 | this(new Handle());
43 | }
44 | public Euribor365_1Y(final Handle h) {
45 | super(new Period(1, TimeUnit.Years), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_2M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 2-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_2M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_2M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_2M(final Handle h) {
45 | super(new Period(2, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_2W.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 2-weeks Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_2W extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_2W() {
42 | this(new Handle());
43 | }
44 | public Euribor365_2W(final Handle h) {
45 | super(new Period(2, TimeUnit.Weeks), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_3M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 3-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_3M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_3M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_3M(final Handle h) {
45 | super(new Period(3, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_3W.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 3-weeks Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_3W extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_3W() {
42 | this(new Handle());
43 | }
44 | public Euribor365_3W(final Handle h) {
45 | super(new Period(3, TimeUnit.Weeks), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_4M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 4-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_4M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_4M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_4M(final Handle h) {
45 | super(new Period(4, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_5M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 5-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_5M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_5M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_5M(final Handle h) {
45 | super(new Period(5, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_6M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 6-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_6M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_6M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_6M(final Handle h) {
45 | super(new Period(6, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_7M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 7-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_7M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_7M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_7M(final Handle h) {
45 | super(new Period(7, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_8M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 8-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_8M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_8M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_8M(final Handle h) {
45 | super(new Period(8, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_9M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 9-months Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_9M extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_9M() {
42 | this(new Handle());
43 | }
44 | public Euribor365_9M(final Handle h) {
45 | super(new Period(9, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor365_SW.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-week Euribor365 index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor365_SW extends Euribor365 {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor365_SW() {
42 | this(new Handle());
43 | }
44 | public Euribor365_SW(final Handle h) {
45 | super(new Period(1, TimeUnit.Weeks), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor3M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 3-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor3M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor3M() {
42 | this(new Handle());
43 | }
44 | public Euribor3M(final Handle h) {
45 | super(new Period(3, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor3W.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 3-weeks Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor3W extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor3W() {
42 | this(new Handle());
43 | }
44 | public Euribor3W(final Handle h) {
45 | super(new Period(3, TimeUnit.Weeks), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor4M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 4-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor4M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor4M() {
42 | this(new Handle());
43 | }
44 | public Euribor4M(final Handle h) {
45 | super(new Period(4, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor5M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 5-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor5M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor5M() {
42 | this(new Handle());
43 | }
44 | public Euribor5M(final Handle h) {
45 | super(new Period(5, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor6M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 6-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor6M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor6M() {
42 | this(new Handle());
43 | }
44 | public Euribor6M(final Handle h) {
45 | super(new Period(6, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor7M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 7-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor7M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor7M() {
42 | this(new Handle());
43 | }
44 | public Euribor7M(final Handle h) {
45 | super(new Period(7, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor8M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 8-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor8M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor8M() {
42 | this(new Handle());
43 | }
44 | public Euribor8M(final Handle h) {
45 | super(new Period(8, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/Euribor9M.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 9-months Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class Euribor9M extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public Euribor9M() {
42 | this(new Handle());
43 | }
44 | public Euribor9M(final Handle h) {
45 | super(new Period(9, TimeUnit.Months), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/EuriborSW.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | import org.jquantlib.quotes.Handle;
25 | import org.jquantlib.termstructures.YieldTermStructure;
26 | import org.jquantlib.time.Period;
27 | import org.jquantlib.time.TimeUnit;
28 |
29 | /**
30 | * 1-week Euribor index
31 | *
32 | * @author Srinivas Hasti
33 | */
34 | public class EuriborSW extends Euribor {
35 |
36 |
37 | //
38 | // public constructors
39 | //
40 |
41 | public EuriborSW() {
42 | this(new Handle());
43 | }
44 | public EuriborSW(final Handle h) {
45 | super(new Period(1, TimeUnit.Weeks), h);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/FranceRegion.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | /**
25 | *
26 | * France as geographical/economic region
27 | * used for inflation applicability
28 | *
29 | * @author Tim Blackler
30 | */
31 | public class FranceRegion extends Region {
32 |
33 | public FranceRegion() {
34 | this.data = new Region.Data("France","FR");
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/indexes/UKRegion.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Tim Blackler
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.indexes;
23 |
24 | /**
25 | *
26 | * France as geographical/economic region
27 | * used for inflation applicability
28 | *
29 | * @author Tim Blackler
30 | */
31 | public class UKRegion extends Region {
32 |
33 | public UKRegion() {
34 | this.data = new Region.Data("UK","UK");
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/instruments/EarlierThanCashFlowComparator.java:
--------------------------------------------------------------------------------
1 | package org.jquantlib.instruments;
2 |
3 | import java.io.Serializable;
4 | import java.util.Comparator;
5 |
6 | import org.jquantlib.cashflow.CashFlow;
7 |
8 | /**
9 | * @author Ueli Hofstetter
10 | */
11 | public class EarlierThanCashFlowComparator implements Comparator, Serializable {
12 |
13 | /**
14 | * Compares its two arguments for order.
15 | * Returns a negative integer, zero, or a positive integer as the
16 | * first argument is less than, equal to, or greater than the second.
17 | */
18 | @Override
19 | public int compare(final CashFlow o1, final CashFlow o2) {
20 | if(o1.date().le(o2.date()))
21 | return -1;
22 | if(o2.date().le(o1.date()))
23 | return 1;
24 | return 0;
25 | }
26 |
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/instruments/Settlement.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Praneet Tiwari
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.instruments;
23 |
24 | /**
25 | *
26 | * @author Praneet Tiwari
27 | */
28 | public class Settlement {
29 |
30 | public static enum Type {
31 | Physical, Cash
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/instruments/bonds/SoftCallability.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Daniel Kong
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.instruments.bonds;
23 |
24 | import org.jquantlib.cashflow.Callability;
25 | import org.jquantlib.time.Date;
26 |
27 | /**
28 | * %callability leaving to the holder the possibility to convert
29 | *
30 | * @author Daniel Kong
31 | */
32 |
33 | public class SoftCallability extends Callability {
34 |
35 | private final double trigger;
36 |
37 | public SoftCallability(final Price price, final Date date, final double trigger){
38 | super(price, Callability.Type.Call, date);
39 | this.trigger = trigger;
40 | }
41 |
42 | public double trigger(){
43 | return trigger;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/lang/annotation/Natural.java:
--------------------------------------------------------------------------------
1 | package org.jquantlib.lang.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 |
6 | /**
7 | * This annotation is intended to mark a type as a natural number
8 | *
9 | * @note An annotation processor is responsible for instrumenting the bytecode as needed for
10 | * guarantee that a field, local variable or parameter only assumes valid values.
11 | *
12 | * @see Natural number
13 | * @see JSR 308: Annotations on Java Types
14 | * @see Strong Type Checking
15 | *
16 | * @author Richard Gomes
17 | */
18 | @Target({ ElementType.TYPE_USE, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.PARAMETER })
19 | public @interface Natural {
20 | // tagging annotation
21 | }
22 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/lang/annotation/NonNegative.java:
--------------------------------------------------------------------------------
1 | package org.jquantlib.lang.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 |
6 | /**
7 | * This annotation is intended to mark a type as non-negative number
8 | *
9 | * @note An annotation processor is responsible for instrumenting the bytecode as needed for
10 | * guarantee that a field, local variable or parameter only assumes valid values.
11 | *
12 | * @see Natural number
13 | * @see JSR 308: Annotations on Java Types
14 | * @see Strong Type Checking
15 | *
16 | * @author Richard Gomes
17 | */
18 | @Target({ ElementType.TYPE_USE, ElementType.FIELD, ElementType.METHOD, ElementType.LOCAL_VARIABLE, ElementType.PARAMETER })
19 | public @interface NonNegative {
20 | // tagging annotation
21 | }
22 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/lang/annotation/PackagePrivate.java:
--------------------------------------------------------------------------------
1 | package org.jquantlib.lang.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Target;
5 |
6 | /**
7 | * This annotation is intended to mark a type as package private
8 | *
9 | * @see JSR 308: Annotations on Java Types
10 | * @see Strong Type Checking
11 | *
12 | * @author Richard Gomes
13 | */
14 | @Target({ ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
15 | public @interface PackagePrivate {
16 | // tagging annotation
17 | }
18 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/lang/annotation/Unsigned.java:
--------------------------------------------------------------------------------
1 | package org.jquantlib.lang.annotation;
2 |
3 | /**
4 | * This annotation serves for documentation purposes only.
5 | *
6 | * JVM does not support unsigned integral types.
7 | * So, in Java and any other JVM backed language, it may become difficult to express these concepts:
8 | *
9 | * unsigned byte ub;
10 | * unsigned word uw;
11 | * unsigned int ui;
12 | * unsigned long ul;
13 | *
14 | *
15 | * @see Bug 4504839
16 | * @see Java and Unsigned Types
17 | *
18 | * @author Richard Gomes
19 | */
20 | public @interface Unsigned {
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/lang/reflect/DynamicProxyInvocationHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.lang.reflect;
23 |
24 | import java.lang.reflect.Method;
25 |
26 | /**
27 | * @author Srinivas Hasti
28 | *
29 | */
30 | //TODO: add comments and explain what this class is about
31 |
32 | // FIXME: Remove code which employs reflection [ Richard Gomes ]
33 |
34 | public class DynamicProxyInvocationHandler implements java.lang.reflect.InvocationHandler {
35 |
36 | private final T delegate;
37 |
38 | public DynamicProxyInvocationHandler(final T obj) {
39 | this.delegate = obj;
40 | }
41 |
42 | @Override
43 | public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
44 | return delegate.getClass().getMethod(method.getName(), method.getParameterTypes()).invoke(delegate, args);
45 |
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/lang/reflect/ReflectConstants.java:
--------------------------------------------------------------------------------
1 | package org.jquantlib.lang.reflect;
2 |
3 | /**
4 | * @author Richard Gomes
5 | */
6 | //TODO: add comments and explain what this class is about
7 | public class ReflectConstants {
8 |
9 | public static final String SHOULD_NOT_EXTEND_FROM_THIS_CLASS = "Should not extend from this class";
10 | public static final String SHOULD_OVERRIDE_THIS_METHOD = "Should override this method";
11 | public static final String SHOULD_BE_ANONYMOUS_OR_EXTENDED = "Class should be anonymous or extended from a generic class";
12 | public static final String MISSING_GENERIC_PARAMETER_TYPE = "Missing generic parameter type";
13 | public static final String GENERIC_PARAMETER_MUST_BE_CONCRETE_CLASS = "Generic parameter must be a concrete class";
14 | public static final String ILLEGAL_TYPE_PARAMETER = "Illegal type parameter";
15 | public static final String WRONG_ARGUMENT_TYPE = "Unexpected type for type parameter";
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/LogGrid.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 |
23 | package org.jquantlib.math;
24 |
25 | import org.jquantlib.math.functions.Log;
26 | import org.jquantlib.math.matrixutilities.Array;
27 |
28 | /**
29 | * @author Srinivas Hasti
30 | */
31 | // TODO: code review :: license, class comments, comments for access modifiers, comments for @Override
32 | public class LogGrid extends TransformedGrid {
33 |
34 | public LogGrid(Array grid) {
35 | super(grid, new Log());
36 | }
37 |
38 | public Array logGridArray() {
39 | return transformedGridArray();
40 | }
41 |
42 | public double logGrid(int i) {
43 | return transformedGrid(i);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/PdeShortRate.java:
--------------------------------------------------------------------------------
1 | package org.jquantlib.math;
2 |
3 | import org.jquantlib.methods.finitedifferences.PdeSecondOrderParabolic;
4 |
5 | public class PdeShortRate extends PdeSecondOrderParabolic {
6 |
7 | @Override
8 | public double diffusion(double t, double x) {
9 | // TODO Auto-generated method stub
10 | return 0;
11 | }
12 |
13 | @Override
14 | public double discount(double t, double x) {
15 | // TODO Auto-generated method stub
16 | return 0;
17 | }
18 |
19 | @Override
20 | public double drift(double t, double x) {
21 | // TODO Auto-generated method stub
22 | return 0;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/distributions/Derivative.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 |
23 | package org.jquantlib.math.distributions;
24 |
25 | import org.jquantlib.math.Ops;
26 |
27 |
28 | /**
29 | *
30 | * @author Richard Gomes
31 | *
32 | */
33 |
34 | public interface Derivative extends Ops.DoubleOp {
35 |
36 | /**
37 | * Computes the derivation of the function; f(x)
38 | *
39 | * @param x
40 | * @return f(x)
41 | */
42 | public double derivative(final double x) /* ReadOnly */;
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Abs.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A modulo function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Abs implements Ops.DoubleOp {
32 |
33 | //
34 | // implements Ops.DoubleOp
35 | //
36 |
37 | @Override
38 | public double op(final double a) {
39 | return Math.abs(a);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Bind1st.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * This method binds the 1st argument of a binary function to a scalar value, effectively enabling
28 | * a binary function to be called in a context intended for a unary function.
29 | *
30 | * @author Richard Gomes
31 | */
32 | public final class Bind1st implements Ops.DoubleOp {
33 |
34 | private final double scalar; // 1st argument
35 | private final Ops.BinaryDoubleOp f; // 2nd argument
36 |
37 | public Bind1st(final double scalar, final Ops.BinaryDoubleOp f) {
38 | this.scalar = scalar;
39 | this.f = f;
40 | }
41 |
42 |
43 | //
44 | // implements Ops.DoubleOp
45 | //
46 |
47 | @Override
48 | public double op(final double a) {
49 | return f.op(scalar, a);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Bind1stPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 |
27 | /**
28 | * This method binds the 1st argument of a binary predicate to a scalar value, effectively enabling
29 | * a binary predicate to be called in a context intended for a unary predicate.
30 | *
31 | * @author Richard Gomes
32 | */
33 | public final class Bind1stPredicate implements Ops.DoublePredicate {
34 |
35 | private final double scalar; // 1st argument
36 | private final Ops.BinaryDoublePredicate f; // 2nd argument
37 |
38 | public Bind1stPredicate(final double scalar, final Ops.BinaryDoublePredicate f) {
39 | this.scalar = scalar;
40 | this.f = f;
41 | }
42 |
43 |
44 | //
45 | // implements DoublePredicate
46 | //
47 |
48 | @Override
49 | public boolean op(final double a) {
50 | return f.op(scalar, a);
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Bind2nd.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * This method binds the 2nd argument of a binary function to a scalar value, effectively enabling
28 | * a binary function to be called in a context intended for a unary function.
29 | *
30 | * @author Richard Gomes
31 | */
32 | public final class Bind2nd implements Ops.DoubleOp {
33 |
34 | private final Ops.BinaryDoubleOp f; // 1st argument
35 | private final double scalar; // 2nd argument
36 |
37 | public Bind2nd(final Ops.BinaryDoubleOp f, final double scalar) {
38 | this.f = f;
39 | this.scalar = scalar;
40 | }
41 |
42 |
43 | //
44 | // implements Ops.DoubleOp
45 | //
46 |
47 | @Override
48 | public double op(final double a) {
49 | return f.op(a, scalar);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Bind2ndPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 |
27 | /**
28 | * This method binds the 2nd argument of a binary predicate to a scalar value, effectively enabling
29 | * a binary predicate to be called in a context intended for a unary predicate.
30 | *
31 | * @author Richard Gomes
32 | */
33 | public final class Bind2ndPredicate implements Ops.DoublePredicate {
34 |
35 | private final Ops.BinaryDoublePredicate f; // 1st argument
36 | private final double scalar; // 2nd argument
37 |
38 | public Bind2ndPredicate(final Ops.BinaryDoublePredicate f, final double scalar) {
39 | this.f = f;
40 | this.scalar = scalar;
41 | }
42 |
43 |
44 | //
45 | // implements DoublePredicate
46 | //
47 |
48 | @Override
49 | public boolean op(final double a) {
50 | return f.op(a, scalar);
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Clipped.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * This class verifies a condition and if true, returns the evaluation of
28 | * a function, otherwise returns Double.NaN.
29 | *
30 | * @author Richard Gomes
31 | */
32 | public final class Clipped implements Ops.DoubleOp {
33 |
34 | private final Ops.DoublePredicate checker;
35 | private final Ops.DoubleOp function;
36 |
37 | public Clipped(final Ops.DoublePredicate checker, final Ops.DoubleOp function){
38 | this.checker = checker;
39 | this.function = function;
40 | }
41 |
42 |
43 | //
44 | // implements Ops.DoubleOp
45 | //
46 |
47 | @Override
48 | public double op(final double a) {
49 | return checker.op(a) ? function.op(a) : Double.NaN;
50 | }
51 |
52 | }
53 |
54 |
55 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/CloseEnough.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Closeness;
25 | import org.jquantlib.math.Ops;
26 |
27 | /**
28 | * Verifies if 2 double numbers are close enough
29 | *
30 | * @see Closeness#isCloseEnough(double, double)
31 | *
32 | * @author Richard Gomes
33 | */
34 | public final class CloseEnough implements Ops.BinaryDoublePredicate {
35 |
36 | //
37 | // implements BinaryDoublePredicate
38 | //
39 |
40 | @Override
41 | public boolean op(final double a, final double b) {
42 | return Closeness.isCloseEnough(a, b);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/ComposedFunction.java:
--------------------------------------------------------------------------------
1 | package org.jquantlib.math.functions;
2 |
3 | import org.jquantlib.math.Ops;
4 |
5 | public class ComposedFunction implements Ops.DoubleOp {
6 |
7 | private final Ops.DoubleOp f;
8 | private final Ops.DoubleOp g;
9 |
10 | public ComposedFunction(final Ops.DoubleOp f, final Ops.DoubleOp g) {
11 | this.f = f;
12 | this.g = g;
13 | }
14 |
15 |
16 | //
17 | // implements Ops.DoubleOp
18 | //
19 |
20 | /**
21 | * @return {@latex$ f(g(x)) }
22 | */
23 | @Override
24 | public double op(final double x) {
25 | return f.op(g.op(x));
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Constant.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A constant function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Constant implements Ops.DoubleOp {
32 |
33 | private final double value;
34 |
35 | public Constant(final double value) {
36 | this.value = value;
37 | }
38 |
39 |
40 | //
41 | // implements Ops.DoubleOp
42 | //
43 |
44 | /**
45 | * @param a is always discarded
46 | * @return a constant value whatever parameter is received
47 | */
48 | @Override
49 | public double op(final double a) {
50 | // parameter is discarded and a constant value is returned
51 | return value;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Cos.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A cos(x) function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Cos implements Ops.DoubleOp {
32 |
33 | //
34 | // implements Ops.DoubleOp
35 | //
36 |
37 | @Override
38 | public double op(final double a) {
39 | return Math.cos(a);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Cube.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A cubic function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Cube implements Ops.DoubleOp {
32 |
33 | //
34 | // implements Ops.DoubleOp
35 | //
36 |
37 | @Override
38 | public double op(final double a) {
39 | return a*a*a;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Everywhere.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A constant function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Everywhere implements Ops.DoublePredicate {
32 |
33 | //
34 | // implements Ops.DoublePredicate
35 | //
36 |
37 | /**
38 | * @param a is always discarded
39 | * @return true
40 | */
41 | @Override
42 | public boolean op(final double a) {
43 | return true;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Exp.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A exp(n) function
28 | *
29 | * @author Srinivas Hasti
30 | */
31 | public final class Exp implements Ops.DoubleOp {
32 |
33 | //
34 | // implements Ops.DoubleOp
35 | //
36 |
37 | @Override
38 | public double op(final double a) {
39 | return Math.exp(a);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Expression.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import java.util.List;
25 |
26 | import org.jquantlib.math.Ops;
27 | import org.jquantlib.math.Ops.DoubleOp;
28 |
29 | /**
30 | * Processes a sequence of functions
31 | *
32 | * @author Richard Gomes
33 | */
34 | public class Expression implements Ops.DoubleOp {
35 |
36 | private final List list;
37 |
38 | public Expression(final List list) {
39 | this.list = list;
40 | }
41 |
42 |
43 | //
44 | // implements Ops.DoubleOp
45 | //
46 |
47 | @Override
48 | public double op(final double a) {
49 | double result = a;
50 | for (int i = 0; i. The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * Always false
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class FalsePredicate implements Ops.DoublePredicate {
32 |
33 | //
34 | // implements DoublePredicate
35 | //
36 |
37 | @Override
38 | public boolean op(final double a) {
39 | return false;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Fourth.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A x^4 function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Fourth implements Ops.DoubleOp {
32 |
33 | //
34 | // implements Ops.DoubleOp
35 | //
36 |
37 | @Override
38 | public double op(final double a) {
39 | final double sqr = a*a;
40 | return sqr*sqr;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/GreaterEqualPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A greater equal function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class GreaterEqualPredicate implements Ops.BinaryDoublePredicate {
32 |
33 | //
34 | // implements BinaryDoublePredicate
35 | //
36 |
37 | @Override
38 | public boolean op(final double a, final double b) {
39 | return a >= b;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/GreaterThanPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A greater than function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class GreaterThanPredicate implements Ops.BinaryDoublePredicate {
32 |
33 | //
34 | // implements BinaryDoublePredicate
35 | //
36 |
37 | @Override
38 | public boolean op(final double a, final double b) {
39 | return a > b;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Identity.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * The identity function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Identity implements Ops.DoubleOp {
32 |
33 | //
34 | // implements Ops.DoubleOp
35 | //
36 |
37 | @Override
38 | public double op(final double a) {
39 | return a;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/LessEqualPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A less equal function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class LessEqualPredicate implements Ops.BinaryDoublePredicate {
32 |
33 | //
34 | // implements BinaryDoublePredicate
35 | //
36 |
37 | @Override
38 | public boolean op(final double a, final double b) {
39 | return a <= b;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/LessThanPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A less than function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class LessThanPredicate implements Ops.BinaryDoublePredicate {
32 |
33 | //
34 | // implements BinaryDoublePredicate
35 | //
36 |
37 | @Override
38 | public boolean op(final double a, final double b) {
39 | return a < b;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Log.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2008 Srinivas Hasti
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A log(n) function
28 | *
29 | * @author Srinivas Hasti
30 | */
31 | public final class Log implements Ops.DoubleOp {
32 |
33 | //
34 | // implements Ops.DoubleOp
35 | //
36 |
37 | @Override
38 | public double op(final double a) {
39 | return Math.log(a);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Minus.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 |
27 | /**
28 | * A binary subtraction function
29 | *
30 | * @author Richard Gomes
31 | */
32 | public final class Minus implements Ops.BinaryDoubleOp {
33 |
34 | //
35 | // implements Ops.DoubleOp
36 | //
37 |
38 | @Override
39 | public double op(final double a, final double b) {
40 | return a - b;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Nowhere.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A constant function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Nowhere implements Ops.DoublePredicate {
32 |
33 | //
34 | // implements Ops.DoublePredicate
35 | //
36 |
37 | /**
38 | * @param a is always discarded
39 | * @return false
40 | */
41 | @Override
42 | public boolean op(final double a) {
43 | return false;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Sin.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 | .
14 |
15 | This program is distributed in the hope that it will be useful, but WITHOUT
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 | FOR A PARTICULAR PURPOSE. See the license for more details.
18 |
19 | JQuantLib is based on QuantLib. http://quantlib.org/
20 | When applicable, the original copyright notice follows this notice.
21 | */
22 | package org.jquantlib.math.functions;
23 |
24 | import org.jquantlib.math.Ops;
25 |
26 | /**
27 | * A sin(x) function
28 | *
29 | * @author Richard Gomes
30 | */
31 | public final class Sin implements Ops.DoubleOp {
32 |
33 | //
34 | // implements Ops.DoubleOp
35 | //
36 |
37 | @Override
38 | public double op(final double a) {
39 | return Math.sin(a);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/jquantlib/src/main/java/org/jquantlib/math/functions/Sqrt.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2009 Richard Gomes
3 |
4 | This source code is release under the BSD License.
5 |
6 | This file is part of JQuantLib, a free-software/open-source library
7 | for financial quantitative analysts and developers - http://jquantlib.org/
8 |
9 | JQuantLib is free software: you can redistribute it and/or modify it
10 | under the terms of the JQuantLib license. You should have received a
11 | copy of the license along with this program; if not, please email
12 | . The license is also available online at
13 |