Skip to content

Commit 340b40c

Browse files
authored
Fix: AUD(6A) FOP expiration (#9139)
* fix: AUD(6A) FOP expiration * feat: add 6A to FOP expiry delta refactor: rename variable to project pattern naming * remove: AUD fop expiry delta test:fix: use flexible reference data in FutureAndOptionMapping * test:fix: AUD in GetUnderlyingSymbolFromFutureOption
1 parent 58ce899 commit 340b40c

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

Common/Securities/Future/FuturesListings.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public static class FuturesListings
3636
private static readonly Symbol _zl = Symbol.Create("ZL", SecurityType.Future, Market.CBOT);
3737
private static readonly Symbol _zw = Symbol.Create("ZW", SecurityType.Future, Market.CBOT);
3838
private static readonly Symbol _tn = Symbol.Create("TN", SecurityType.Future, Market.CBOT);
39+
private static readonly Symbol _aud = Symbol.Create("6A", SecurityType.Future, Market.CME);
3940

4041
private static Dictionary<string, Func<DateTime, List<Symbol>>> _futuresListingRules = new Dictionary<string, Func<DateTime, List<Symbol>>>
4142
{
@@ -71,7 +72,8 @@ public static class FuturesListings
7172
_zw,
7273
t,
7374
7,
74-
new FuturesListingCycles(new[] { 3, 5, 7, 9, 12 }, 15)) }
75+
new FuturesListingCycles(new[] { 3, 5, 7, 9, 12 }, 15)) },
76+
{ "6A", t => QuarterlyContracts(_aud, t, 8) }
7577
};
7678

7779
/// <summary>

Common/Securities/FutureOption/FuturesOptionsUnderlyingMapper.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ public static class FuturesOptionsUnderlyingMapper
6060
// COMEX
6161
{ "HG", (d, _) => ContractMonthYearStartThreeMonthsThenEvenOddMonthsSkipRule(d, true) },
6262
{ "SI", (d, _) => ContractMonthYearStartThreeMonthsThenEvenOddMonthsSkipRule(d, true) },
63-
{ "GC", (d, _) => ContractMonthEvenOddMonth(d, false) }
63+
{ "GC", (d, _) => ContractMonthEvenOddMonth(d, false) },
64+
65+
// CME
66+
{ "6A", (d, ld) => ContractMonthSerialLookupRule(Symbol.Create("6A", SecurityType.Future, Market.CME), d, ld.Value) }
6467
};
6568

6669
/// <summary>

Tests/Common/Securities/FutureOption/FuturesOptionsExpiryFunctionsTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,18 @@ public void ExpiryFunctionsReturnExpectedResults(string futureTicker, string mar
107107
[TestCase("6N", Market.CME, "202511", "20251107", "20251215")]
108108
[TestCase("6N", Market.CME, "202512", "20251205", "20251215")]
109109
[TestCase("6N", Market.CME, "202601", "20260109", "20260316")]
110+
[TestCase("6A", Market.CME, "202601", "20260109", "20260316", Description = "Quarterly contract : Mar")]
111+
[TestCase("6A", Market.CME, "202602", "20260206", "20260316", Description = "Quarterly contract : Mar")]
112+
[TestCase("6A", Market.CME, "202603", "20260306", "20260316", Description = "Quarterly contract : Mar")]
113+
[TestCase("6A", Market.CME, "202604", "20260403", "20260615", Description = "Quarterly contract : Jun")]
114+
[TestCase("6A", Market.CME, "202605", "20260508", "20260615", Description = "Quarterly contract : Jun")]
115+
[TestCase("6A", Market.CME, "202606", "20260605", "20260615", Description = "Quarterly contract : Jun")]
110116
public void FutureAndOptionMapping(string futureTicker, string market, string fopContractMonthYear, string expectedFop, string expectedFuture)
111117
{
112118
var contractMonth = DateTime.ParseExact(fopContractMonthYear, DateFormat.YearMonth, CultureInfo.InvariantCulture);
113119

114120
var fopExpiry = Time.ParseDate(expectedFop);
115-
var referenceDate = new DateTime(fopExpiry.Year, 9, 1);
121+
var referenceDate = new DateTime(fopExpiry.Year, fopExpiry.Month, 1);
116122
var canonicalFuture = Symbol.Create(futureTicker, SecurityType.Future, market);
117123
var canonicalFutureOption = Symbol.CreateOption(
118124
canonicalFuture,

Tests/Common/Securities/FutureOption/FuturesOptionsUnderlyingMapperTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ public class FuturesOptionsUnderlyingMapperTests
3535
[TestCase("ZN", Market.CBOT, 2021, 2, 19, 2021, 3, 22, false)]
3636
[TestCase("ZS", Market.CBOT, 2021, 2, 19, 2021, 3, 12, false)]
3737
[TestCase("ZW", Market.CBOT, 2021, 2, 19, 2021, 3, 12, false)]
38-
[TestCase("6A", Market.CME, 2025, 09, 05, 2025, 09, 15, false)]
39-
[TestCase("6A", Market.CME, 2025, 12, 05, 2025, 12, 15, false)]
38+
[TestCase("6A", Market.CME, 2021, 09, 05, 2021, 09, 13, false)]
39+
[TestCase("6A", Market.CME, 2021, 10, 05, 2021, 12, 13, false)]
40+
[TestCase("6A", Market.CME, 2021, 11, 05, 2021, 12, 13, false)]
41+
[TestCase("6A", Market.CME, 2021, 12, 05, 2021, 12, 13, false)]
4042
[TestCase("6B", Market.CME, 2025, 09, 05, 2025, 09, 15, false)]
4143
[TestCase("6B", Market.CME, 2025, 12, 05, 2025, 12, 15, false)]
4244
[TestCase("6C", Market.CME, 2025, 09, 05, 2025, 09, 16, false)]

0 commit comments

Comments
 (0)