Skip to content

feat: add FTSE 100 as an opt-in true index - #9

Open
knightmare2600 wants to merge 4 commits into
PowerShellYoungTeam:mainfrom
knightmare2600:pr/feat-ftse-100
Open

knightmare2600 wants to merge 4 commits into
PowerShellYoungTeam:mainfrom
knightmare2600:pr/feat-ftse-100

Conversation

@knightmare2600

@knightmare2600 knightmare2600 commented Oct 9, 2026 •

Copy link
Copy Markdown

Summary

Adds the FTSE 100 to the Indices tab as an opt-in true index, using the same mechanism as OMXC25.

Depends on #6 (OMXC25), which depends on #5 and #4. Please merge those first; the commit new in this PR is "feat: add FTSE 100 as an opt-in true index".

Why: the exchange versus its index

  • The London Stock Exchange (XLON) is already supported as an exchange: the marketplace and its hours.
  • The FTSE 100 is its headline index, which LSEG / FTSE Russell describes as "the 100 most highly capitalised blue chip companies listed on London Stock Exchange".
  • The Indices tab's existing "FTSE 100 (EWU)" row is not the FTSE 100. EWU tracks MSCI United Kingdom; see fix: label the EWU, EWG and EWJ index proxies by what they track #10.

Details

  • Symbol and plan. Twelve Data symbol FTSE ("FTSE 100", GBP, mic_code XLON) with access level Grow: /indices?symbol=FTSE&show_plan=true.
    • It is off by default and shown greyed out with a note.
    • Enable it with "EnabledIndices": ["FTSE"]; it can be combined with "OMXC25".
  • Pinned to mic_code=XLON. The bare ticker FTSE is also the Amundi MSCI UK IMI SRI Climate Paris Aligned UCITS ETF on Euronext Paris (symbol_search?symbol=FTSE). mic_code is a documented /quote parameter (Twelve Data docs).
  • Index definitions gain MicCode and RequiredPlan. The HTTP 403 message now names the plan each index needs instead of always saying "Pro".
  • Quote status is judged against London hours.

Known limitation

  • holidays.json has no UK dates, so on a bank holiday an old quote shows as Stale rather than Last close.

Checks

  • Pester: 87 passed, 0 failed (7 new). The new tests cover:
    • registration;
    • opt-in independent of OMXC25;
    • mic_code=XLON sent on the request and through the cache layer;
    • status against LSE hours.
  • Not verified against a live Grow key; the request and response shape follow the Twelve Data documentation.
  • Lint: the Lint workflow already fails on main before this change — PSScriptAnalyzer reports 120 Warning-level findings there (e.g. run 36486962685). This PR adds no new findings (compared by rule, file and message against main), so a red Lint check here is the pre-existing state.
  • Not run: the WPF dashboard itself (Windows-only); checks were run on Linux with PowerShell 7.6.3.
  • CHANGELOG: this PR adds its own entry under [Unreleased]. The PRs in this series are independent where possible, so whichever merges second will have a trivial conflict in that section — keep both entries.

This is one of a series of small PRs (fixes and features kept separate so you can pick and choose): #2 countdown hours · #3 Refresh button · #4 map preferences · #5 Nasdaq Copenhagen · #6 OMXC25 · #7 FX DKK/SEK · #8 København clock · #9 FTSE 100 · #10 ETF labels.

🤖 Generated with Claude Code

knightmare2600 and others added 4 commits October 9, 2026 23:12
user-preferences.example.json has shipped MapStyle, MapProjection and
MapOverlays since the map overhaul, but nothing read them: the map
always started on Earth at Night / Flat / Day-Night, and
Save-UserPreferences rewrote the file with a fixed key set, deleting
the three keys on the first save. There is no save on window close
(it minimises to the tray), so map changes were never persisted.

- Save-UserPreferences now writes MapStyle, MapProjection and
  MapOverlays from the current toolbar state.
- The style and projection pickers and the ten overlay toggles save
  when changed, as the exchange toggles already do.
- Saved settings are applied straight after the pickers are populated,
  before change handlers are attached, so start-up does not redraw the
  map once per toggle.
- New Private/Get-MapPreferenceState resolves the saved values. Unknown
  styles/projections fall back to the defaults; overlay names with no
  toggle (e.g. 'TimeLine' from the original example file) are ignored;
  an empty MapOverlays list means all overlays off; a missing key keeps
  the XAML defaults.
- PSExchangeClock.psm1 now dot-sources Private/*.ps1 (not exported).
- Pester tests in Tests/MapPreferences.Tests.ps1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds Nasdaq Copenhagen (Nasdaq København) as the 21st exchange, using
the existing exchange, holiday, map, flyout, world-clock and
preference mechanisms. It is not active by default; existing saved
selections are left unchanged.

Exchange
- Code XCSE, symbol OMXC, Copenhagen, Denmark, DKK, 55.6761 / 12.5683.
- TimeZoneId 'Romance Standard Time' (Windows ID that .NET maps from
  IANA Europe/Copenhagen); CET/CEST comes from the OS timezone rules.
- Main-market equities 09:00-17:00 local. New optional exchange fields
  OpeningAuctionStart (08:45) and ClosingAuctionStart (16:55) make the
  status read "Opening auction - opens in ..." and "Closing auction -
  ends in ..." instead of presenting the call phases as pre-market or
  continuous trading. Status values, colours and notifications are
  unchanged. The flyout lists both auction windows.
- Sources: Nasdaq European Markets Trading Hours and Holiday Schedule
  (https://www.nasdaq.com/european-market-activity/trading-hours) and
  the Nasdaq INET Nordic Auctions factsheet 1015-26.

Holidays
- holidays.json gains the official Nasdaq Copenhagen equity closures
  for 2025-2027 (checked 2026-10-09). Nasdaq lists no Copenhagen half
  days. These differ from Danish public holidays (24 and 31 December
  are exchange closures). Later years are not yet published.

Supporting changes
- Exchange status logic moved from the dashboard into
  Private/Get-ExchangeSessionStatus.ps1 (behaviour preserved) so it can
  be tested without WPF. Countdowns are now measured in UTC, so they
  stay correct on DST transition days. Format-CountdownSpan replaces
  the inline countdown formatting.
- Private/Test-ExchangeActive holds the existing saved-selection logic.
- Get-StockExchangeData appends built-in exchanges missing from a cache
  younger than 30 days, without overwriting cached entries, so
  existing installs see the new exchange without -ForceRefresh.
- README, about help, docs and manifest description updated (20 -> 21
  exchanges); README's ActiveExchanges default corrected to the seeded
  example list.
- Pester tests: sessions, auctions, weekends, holidays, CET/CEST
  transitions, machine-timezone independence, missing holiday data,
  selection persistence and cache handling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds OMXC25 as a true index (not an ETF proxy) on the existing
Indices tab, associated with Nasdaq Copenhagen (XCSE), Denmark, DKK.

Provider and plan
- Twelve Data /quote, symbol OMXC25. Twelve Data's /indices catalogue
  lists it as "OMX Copenhagen 25 Index" (DKK) with access level "Pro",
  so free/Basic keys get HTTP 403. The index is therefore turned off by
  default: the row is shown greyed out with a note explaining why, and
  no request is made. Enable it by adding "EnabledIndices": ["OMXC25"]
  to user-preferences.json (new optional preference, carried through
  Save-UserPreferences; no Settings UI yet).

When enabled
- Fetched in its own request with its own 15-minute cache, so a plan
  restriction or failure never affects the existing ETF batch.
- HTTP 403/404 stop further requests for that key for the session
  (no wasted credits); 429/network errors retry after the TTL and keep
  showing the last good quote.
- Status line: Intraday (may be delayed) / Last close / Stale /
  Unavailable, judged against the dashboard's own Nasdaq Copenhagen
  hours and holidays rather than Twelve Data's is_market_open (which
  files OMXC25 under Stockholm, XSTO). Stale values are greyed out.
  Twelve Data does not state whether quotes are real-time, so nothing
  is labelled "live". Quote time is shown in Copenhagen time.

Code
- Private/IndexQuotes.ps1: index definitions (the eight ETF proxies
  moved here unchanged), Test-IndexEnabled, Twelve Data quote parsing,
  per-index cache with back-off, and quote-status classification.
- README: OMXC25 section with enabling and troubleshooting steps.
- Pester tests: registration, opt-in, parsing, mocked retrieval,
  network failure, cache/TTL/back-off and quote status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The London Stock Exchange (XLON) is already supported as an exchange;
this adds its headline index, the FTSE 100, to the Indices tab using
the same opt-in mechanism as OMXC25.

- Twelve Data symbol 'FTSE' ("FTSE 100", GBP, mic_code XLON in the
  /indices catalogue, access level "Grow"). Off by default and shown
  greyed out with a note; enable with "EnabledIndices": ["FTSE"].
- The request is pinned with mic_code=XLON: symbol_search shows the
  bare ticker FTSE is also the Amundi MSCI UK IMI SRI Climate Paris
  Aligned ETF on Euronext Paris (XPAR).
- Index definitions gain MicCode and RequiredPlan; the HTTP 403 message
  now names the plan the index needs instead of always saying "Pro".
- Quote status is judged against London hours. holidays.json has no
  UK dates, so on a bank holiday an old quote shows as Stale.
- Tests: registration, opt-in independent of OMXC25, mic_code sent on
  the request and through the cache layer, status against LSE hours.

Not verified against a live Grow-plan key; request and response shape
follow the Twelve Data /quote documentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant