fix(CA-ON): update price parser to use DAHourlyOntarioZonalPrice#8731
fix(CA-ON): update price parser to use DAHourlyOntarioZonalPrice#8731wil-liammacleod wants to merge 4 commits into
Conversation
IESO discontinued the DispUnconsHOEP report in August 2025 when they launched their new two-settlement market structure. Switch fetch_price to the replacement DAHourlyOntarioZonalPrice endpoint which provides the same hourly CAD prices for Ontario. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
VIKTORVAV99
left a comment
There was a problem hiding this comment.
Hi and thanks for the PR!
Sorry for the delay in reviewing!
I see this is generated with Claude Code which is perfrectly fine but could you maybe point me to some documentation about this new market structure? Particular around the two market settelement in the body of this PR and the forecasts and DA price the comment is mentioning.
Would it also be possible to create some new tests covering your change?
Other than that it looks good!
Add test_fetch_price covering the new DAHourlyOntarioZonalPrice endpoint, using a mocked report fixture and snapshot in the same style as the existing forecast tests. Also correct the parser comment: IESO's Market Renewal Program launched its two-settlement market structure on 2025-05-01 (the legacy HOEP report's final publication was 2025-04-30), not August 2025. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@VIKTORVAV99 thanks for the review, and no rush at all! Market structure / docs: This is IESO's Market Renewal Program, which went live on May 1, 2025 and moved Ontario to a two-settlement market (a binding day-ahead market settled against real-time). The specific report change is documented in IESO's Quick Take: Changes to Reports Site:
The doc also notes a 90-day retention window (p.11), which is why only ~3 months of history is available. The two-namespace comment in the parser just reflects that the older reports use the legacy For context, it's my understanding that day-ahead-as-price is the standard convention here — France and the other Nord Pool zones use Tests: Added Also caught a mistake in my original description — the cutover was May 1, 2025, not August 2025. Fixed in both the description and the code comment. I've also merged the latest |
Day ahead is the correct to use for this. The live price might also be useful but we should build another parser endpoint for that if we want to use it so we don't mix data. I'll take a look at the documentation and a second pass at the code on Monday and merge if it looks good! Thanks again! |
Summary
DispUnconsHOEP(HOEP) report when its Market Renewal Program went live on May 1, 2025, moving Ontario to a two-settlement market structure (a financially binding day-ahead market settled against real-time). The legacy HOEP report's final publication was April 30, 2025, which caused CA-ON price data to stop appearing on hourly and daily timescales. This is documented in IESO's Quick Take: Changes to Reports Site (decommissioned reports p.10, new reports p.4).fetch_priceto the replacementDAHourlyOntarioZonalPriceendpoint, which provides equivalent hourly CAD zonal prices for Ontario. This keeps CA-ON consistent with the platform's day-ahead-as-price convention (Nord Pool and ENTSOE zones).IESO_NAMESPACEconstant (http://www.ieso.ca/schema) used by IESO's newer reports, with a comment explaining why two namespaces coexist in the parser (legacytheIMO.com/schemafor production/exchange, newieso.ca/schemafor forecasts and the DA price).test_fetch_pricecovering the new endpoint with a mocked report fixture and snapshot.CONTRIBUTING.md— updated the parser README URL to its current path.Test plan
uv run pytest electricitymap/contrib/parsers/tests/test_CA_ON.py— all tests passuv run test_parser CA-ON price— confirm hourly prices are returned for today and yesterday🤖 Generated with Claude Code