Skip to content

Commit

Permalink
Issue #5 Add NOK and SEK
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitx committed Oct 13, 2014
1 parent 1069f42 commit c10cd43
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* <li>United States dollar (USD)</li>
* <li>Canadian dollar (CAD)</li>
* <li>Swiss franc (CHF)</li>
* <li>Norvegian Krone (NOK)</li>
* <li>Swedish Krone (SEK)</li>
* <li>Japanese yen (JPY)</li>
* </ol>
* @see net.objectlab.kit.fxcalc.StandardMajorCurrencyRanking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* <li>United States dollar (USD)</li>
* <li>Canadian dollar (CAD)</li>
* <li>Swiss franc (CHF)</li>
* <li>Norvegian Krone (NOK)</li>
* <li>Swedish Krone (SEK)</li>
* <li>Japanese yen (JPY)</li>
* </ol>
*/
Expand All @@ -25,6 +27,6 @@ public static MajorCurrencyRanking getDefault() {
}

private StandardMajorCurrencyRanking() {
super(Arrays.asList("EUR", "GBP", "AUD", "NZD", "USD", "CAD", "CHF", "JPY"));
super(Arrays.asList("EUR", "GBP", "AUD", "NZD", "USD", "CAD", "CHF", "NOK", "SEK", "JPY"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ public void testSelectMajorCurrency() throws Exception {
assertThat(majorCurrencyRanking.selectMajorCurrency("JPY", "GBP")).isEqualTo("GBP");
assertThat(majorCurrencyRanking.selectMajorCurrency("AED", "JOD")).isEqualTo("AED");
assertThat(majorCurrencyRanking.selectMajorCurrency("JOD", "AED")).isEqualTo("JOD");
assertThat(majorCurrencyRanking.selectMajorCurrency("NOK", "SEK")).isEqualTo("NOK");
assertThat(majorCurrencyRanking.selectMajorCurrency("SEK", "NOK")).isEqualTo("NOK");
assertThat(majorCurrencyRanking.selectMajorCurrency("NOK", "JPY")).isEqualTo("NOK");
assertThat(majorCurrencyRanking.selectMajorCurrency("JPY", "SEK")).isEqualTo("SEK");
}
}
133 changes: 77 additions & 56 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
@@ -1,60 +1,81 @@
<?xml version="1.0"?>

<document>
<properties>
<title>Changes</title>
<author email="kit@objectlab.co.uk">Benoit Xhenseval</author>
</properties>
<body>
<release version="1.4.0" date="2014-10-01" description="new Currrency Calculator and FX Rate">
<action dev="benoitx" type="fix">The JODA YearMonthDay has been deprecated for a while, I removed the calculators, use LocalDate instead.</action>
<action dev="benoitx" type="add" issue="2" due-to="celerite">Added new Currency calculator following issue raised by Ben CuthBert and Scott Sue (thanks guys). Thanks to London FX Ltd, Julian and Stephen for guidelines as well.</action>
<action dev="benoitx" type="add">Added way to combine WorkingWeeks by intersection of working Days, eg. WesternWeek.intersection(ArabicWeek) => 3 day weekend (Fri to Sun).</action>
<action dev="benoitx" type="add" issue="3" due-to="ConradMellinNAB">Added new method getNextIMMDates(start, numberOfDays) on IMMDateCalculator.</action>
<action dev="benoitx" type="add">Added new module for FX Calculations, requires JDK8.</action>
<action dev="benoitx" type="add">Utils now requires JDK8.</action>
<action dev="benoitx" type="add">Average to keep min and max values too.</action>
</release>
<release version="1.3.0" date="2014-05-26" description="new JDK8 Module">
<action dev="benoitx" type="add">Added new JDK8 module, very similar to Joda. Only this module needs JDK8.</action>
<action dev="benoitx" type="add">Releasing objectlab-utils module, BigDecimalUtil, Pair, Triplet, BooleanUtil etc.</action>
<action dev="benoitx" type="add">Releasing OSGi-friendly modules for DateCalculators.</action>
<action dev="benoitx" type="add">Change interfaces to be more fluent.</action>
<action dev="benoitx" type="fix">Fix bug for convention CONV_360E_ISDA.</action>
</release>
<release version="1.2.0" date="2010-05-10" description="Maintenance">
<action dev="marchy" type="add" issue="atid=872036&amp;aid=2853974" due-to="insumo">Changed the visibility on JodaWorkingWeek(final byte workingDays) constructor from private to protected.</action>
<action dev="marchy" type="fix" issue="atid=872033&amp;aid=2963607" due-to="Aldo Tamburini">Fixed DefaultHolidayCalendar when used with java.util.Date / java.util.Calendar holidays.</action>
<action dev="benoitx" type="fix">Removed the deprecated constructors that used to take Set of "Date", use the HolidayCalendar.</action>
<action dev="benoitx" type="fix">Removed the deprecated method DateCalculator.setNonWorkingDays and getNonWorkingDays.</action>
<action dev="benoitx" type="add" due-to="Neil Bartlett">The ObjectLab Kit is now an OSGi Bundle!</action>
<action dev="benoitx" type="fix" issue="atid=872033&amp;aid=1929838" due-to="Anthony Whitford">Spelling for "PRECEEDING" corrected to PRECEDING, deprecated the mispelt name.</action>
<action dev="benoitx" type="add">Enhanced the KitCalculatorsFactory to be able to get the holidayCalendar names and unregister calendars.</action>
<action dev="benoitx" type="fix">Removed the deprecated method KitCalculatorsFactory.registerHolidays(Set holidays).</action>
<action dev="marchy" type="fix" issue="atid=872033&amp;aid=2389053" due-to="Didier L.">Fixed negative moves with Forward Unless Moving Back Handler.</action>
<action dev="marchy" type="fix">Removed the deprecated constant MODIFIED_PRECEEDING, and related classes.</action>
</release>
<release version="1.1.0" date="2008-03-25" description="Maintenance">
<action dev="benoitx" type="add">Changed JODA dependency to 1.5</action>
<action dev="benoitx" type="fix">fix NPE issue if the calendar name is null.</action>
<action dev="benoitx" type="add" issue="atid=872036&amp;aid=1832345" due-to="Kieron Wilkinson">Feature Requests item #1832345, make the Tenor Serializable</action>
<action dev="benoitx" type="add">Added 2 methods on factory to check if a calendar is registered.</action>
<action dev="marchy" type="fix">Deprecated ACT/UST and END/365 Day Count Conventions, which weren't very common. Also added a link to some documentation.</action>
<action dev="benoitx" type="add">Added method calculateTenorDates with/without a spot lag to enable calculation of a series of Tenor dates without changing the current business date in the calculator.</action>
<action dev="benoitx" type="add">Added method moveByTenor without a spot lag to allow tenor calculation based on the CURRENT date and not the spot lag.</action>
<action dev="benoitx" type="add" issue="atid=872036&amp;aid=1575498" due-to="Paul Hill">Valid Range via HolidayCalendar. HolidayCalendar should replace the simple Set&lt;E&gt; of dates
for holidays. A HolidayCalendar MAY contain an eraly and late boundary, if the calculation break a boundary, an exception is thrown, if there are no
boundaries no exception would be thrown. This would ensure that calculations are not going outside the valid set of holidays.</action>
<action dev="benoitx" type="fix" due-to="David Owen">The calculation of Spot date should take into account holidays BETWEEN now and spot (aka moveByBusinessDay).</action>
<action dev="benoitx" type="add" issue="atid=872036&amp;aid=1601540" due-to="Anthony Whitford">Added a standard Tenor 2D.</action>
<action dev="benoitx" type="fix" issue="atid=872033&amp;aid=1601542" due-to="Anthony Whitford">Spelling mistake in the code,
sorry for breaking your code with this release.</action>
<action dev="benoitx" type="add">Added new handler type ForwardUnlessNegative: a handler that acts like a Forward handler
if the increment is positive otherwise acts like a Backward handler.</action>
</release>
<release version="1.0.1" date="2006-09-25" description="First release">
<action dev="benoitx" type="add">First official release.</action>
<action dev="marchy" type="add">First official release.</action>
</release>
</body>
<properties>
<title>Changes</title>
<author email="kit@objectlab.co.uk">Benoit Xhenseval</author>
</properties>
<body>
<release version="1.4.0" date="TBD" description="Maintenance">
<action dev="benoitx" type="add">
Following a thorough review by ST, add rounding for Bid and Offer on the calculator.
</action>
<action dev="benoitx" type="fix" issue="6" due-to="stephen">NOK and SEK to be added to the Currency order list.</action>
</release>
<release version="1.4.0" date="2014-10-01" description="new Currrency Calculator and FX Rate">
<action dev="benoitx" type="fix">The JODA YearMonthDay has been deprecated for a while, I removed the calculators, use LocalDate instead.</action>
<action dev="benoitx" type="add" issue="2" due-to="celerite">Added new Currency calculator following issue raised by Ben CuthBert and Scott Sue (thanks
guys). Thanks to London FX Ltd, Julian and Stephen for guidelines as well.</action>
<action dev="benoitx" type="add">Added way to combine WorkingWeeks by intersection of working Days, eg. WesternWeek.intersection(ArabicWeek) => 3
day weekend (Fri to Sun).</action>
<action dev="benoitx" type="add" issue="3" due-to="ConradMellinNAB">Added new method getNextIMMDates(start, numberOfDays) on IMMDateCalculator.</action>
<action dev="benoitx" type="add">Added new module for FX Calculations, requires JDK8.</action>
<action dev="benoitx" type="add">Utils now requires JDK8.</action>
<action dev="benoitx" type="add">Average to keep min and max values too.</action>
</release>
<release version="1.3.0" date="2014-05-26" description="new JDK8 Module">
<action dev="benoitx" type="add">Added new JDK8 module, very similar to Joda. Only this module needs JDK8.</action>
<action dev="benoitx" type="add">Releasing objectlab-utils module, BigDecimalUtil, Pair, Triplet, BooleanUtil etc.</action>
<action dev="benoitx" type="add">Releasing OSGi-friendly modules for DateCalculators.</action>
<action dev="benoitx" type="add">Change interfaces to be more fluent.</action>
<action dev="benoitx" type="fix">Fix bug for convention CONV_360E_ISDA.</action>
</release>
<release version="1.2.0" date="2010-05-10" description="Maintenance">
<action dev="marchy" type="add" issue="atid=872036&amp;aid=2853974" due-to="insumo">Changed the visibility on JodaWorkingWeek(final byte workingDays)
constructor from private to protected.</action>
<action dev="marchy" type="fix" issue="atid=872033&amp;aid=2963607" due-to="Aldo Tamburini">Fixed DefaultHolidayCalendar when used with java.util.Date /
java.util.Calendar holidays.</action>
<action dev="benoitx" type="fix">Removed the deprecated constructors that used to take Set of "Date", use the HolidayCalendar.</action>
<action dev="benoitx" type="fix">Removed the deprecated method DateCalculator.setNonWorkingDays and getNonWorkingDays.</action>
<action dev="benoitx" type="add" due-to="Neil Bartlett">The ObjectLab Kit is now an OSGi Bundle!</action>
<action dev="benoitx" type="fix" issue="atid=872033&amp;aid=1929838" due-to="Anthony Whitford">Spelling for "PRECEEDING" corrected to PRECEDING, deprecated the
mispelt name.</action>
<action dev="benoitx" type="add">Enhanced the KitCalculatorsFactory to be able to get the holidayCalendar names and unregister calendars.</action>
<action dev="benoitx" type="fix">Removed the deprecated method KitCalculatorsFactory.registerHolidays(Set holidays).</action>
<action dev="marchy" type="fix" issue="atid=872033&amp;aid=2389053" due-to="Didier L.">Fixed negative moves with Forward Unless Moving Back Handler.
</action>
<action dev="marchy" type="fix">Removed the deprecated constant MODIFIED_PRECEEDING, and related classes.</action>
</release>
<release version="1.1.0" date="2008-03-25" description="Maintenance">
<action dev="benoitx" type="add">Changed JODA dependency to 1.5</action>
<action dev="benoitx" type="fix">fix NPE issue if the calendar name is null.</action>
<action dev="benoitx" type="add" issue="atid=872036&amp;aid=1832345" due-to="Kieron Wilkinson">Feature Requests item #1832345, make the Tenor Serializable
</action>
<action dev="benoitx" type="add">Added 2 methods on factory to check if a calendar is registered.</action>
<action dev="marchy" type="fix">Deprecated ACT/UST and END/365 Day Count Conventions, which weren't very common. Also added a link to some
documentation.</action>
<action dev="benoitx" type="add">Added method calculateTenorDates with/without a spot lag to enable calculation of a series of Tenor dates without
changing the current business date in the calculator.</action>
<action dev="benoitx" type="add">Added method moveByTenor without a spot lag to allow tenor calculation based on the CURRENT date and not the spot
lag.</action>
<action dev="benoitx" type="add" issue="atid=872036&amp;aid=1575498" due-to="Paul Hill">Valid Range via HolidayCalendar. HolidayCalendar should replace
the simple Set&lt;E&gt; of dates
for holidays. A HolidayCalendar MAY contain an eraly and late boundary, if the calculation break a boundary, an exception is thrown, if there are no
boundaries no exception would be thrown. This would ensure that calculations are not going outside the valid set of holidays.
</action>
<action dev="benoitx" type="fix" due-to="David Owen">The calculation of Spot date should take into account holidays BETWEEN now and spot (aka
moveByBusinessDay).</action>
<action dev="benoitx" type="add" issue="atid=872036&amp;aid=1601540" due-to="Anthony Whitford">Added a standard Tenor 2D.</action>
<action dev="benoitx" type="fix" issue="atid=872033&amp;aid=1601542" due-to="Anthony Whitford">Spelling mistake in the code,
sorry for breaking your code with this release.
</action>
<action dev="benoitx" type="add">Added new handler type ForwardUnlessNegative: a handler that acts like a Forward handler
if the increment is positive otherwise acts like a Backward handler.
</action>
</release>
<release version="1.0.1" date="2006-09-25" description="First release">
<action dev="benoitx" type="add">First official release.</action>
<action dev="marchy" type="add">First official release.</action>
</release>
</body>
</document>

0 comments on commit c10cd43

Please sign in to comment.