From 397d6072fcdfdd4d030e9f7482327fb3bba2b65b Mon Sep 17 00:00:00 2001 From: Ulrich Klauer Date: Mon, 23 Dec 2024 07:00:44 +0100 Subject: [PATCH] Fix ASX trade calendar (#4412) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ASX observes Australia Day on the following Monday if January 26 happens to fall on a weekend. This wasn’t represented in the PP trade calendar. See the ASX trading calendar for 2025 and 2020 (Australia Day moved to January 27) and 2019 (Australia Day moved to January 28) on their website and on historic versions of it at the Internet Archive: https://www.asx.com.au/markets/market-resources/trading-hours-calendar/cash-market-trading-hours/trading-calendar --- .../src/name/abuchen/portfolio/util/TradeCalendarManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/name.abuchen.portfolio/src/name/abuchen/portfolio/util/TradeCalendarManager.java b/name.abuchen.portfolio/src/name/abuchen/portfolio/util/TradeCalendarManager.java index 33195aac82..2ff9f06677 100644 --- a/name.abuchen.portfolio/src/name/abuchen/portfolio/util/TradeCalendarManager.java +++ b/name.abuchen.portfolio/src/name/abuchen/portfolio/util/TradeCalendarManager.java @@ -234,7 +234,7 @@ public class TradeCalendarManager // https://www.asx.com.au/markets/market-resources/trading-hours-calendar/cash-market-trading-hours/trading-calendar tc = new TradeCalendar("asx", Messages.LabelTradeCalendarASX, STANDARD_WEEKEND); //$NON-NLS-1$ tc.add(fixed(NEW_YEAR, Month.JANUARY, 1).moveIf(DayOfWeek.SATURDAY, 2).moveIf(DayOfWeek.SUNDAY, 1)); - tc.add(fixed(AUSTRALIA_DAY, Month.JANUARY, 26)); + tc.add(fixed(AUSTRALIA_DAY, Month.JANUARY, 26).moveIf(DayOfWeek.SATURDAY, 2).moveIf(DayOfWeek.SUNDAY, 1)); tc.add(easter(GOOD_FRIDAY, -2)); tc.add(easter(EASTER_MONDAY, 1)); tc.add(fixed(ANZAC_DAY, Month.APRIL, 25));