Add KOSPI 200 Index (KM) Futures#9585
Draft
AlexCatarino wants to merge 1 commit into
Draft
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Market.KRX(Korea Exchange) constant with market id 43Futures.Indices.Kospi200 = "KM"constantkrx,[*]index wildcardData/future/krx/margins/KM.csv(placeholder from current KRX rates: initial 8.1%, maintenance 5.4%)Future-krx-KMandFuture-krx-[*]market-hours entries (Asia/Seoul, 09:00–15:45 with 08:00–09:00 pre-open auction)FuturesExpiryFunctionsTestData.xml[TestCase(Indices.Kospi200, ThreeTwentyPMKoreaTime)]toIndicesExpiryDateFunction_WithDifferentDates_ShouldFollowContractDescription
Adds LEAN support for the KOSPI 200 Index Futures (KM) traded on the Korea Exchange (KRX). KOSPI 200 futures are cash-settled, quoted in KRW with a KRW 250,000 point multiplier and 0.05 tick, listed on the quarterly March/June/September/December cycle.
This PR is intentionally a draft. Two values are placeholders and should be confirmed against authoritative KRX sources before it is marked ready for review:
Data/future/krx/margins/KM.csv) — the initial/maintenance amounts are not real historical KRX margins. They were derived from the current KRX margin rates (initial 8.1%, maintenance 5.4%) applied to a representative notional (index ≈ 350 × KRW 250,000 ≈ KRW 87.5M), giving initial 7,087,500 / maintenance 4,725,000 under the19900101placeholder date. This should be replaced with the exchange's published performance-bond schedule (ideally with historical change dates).TimeSpan(15, 20, 0)in the expiry function and mirrored by theThreeTwentyPMKoreaTime = "15:20:00"test constant. Sources vary on the exact termination time of the expiring contract (15:15 / 15:20 / 15:45 KST). If a different time is authoritative, it is a one-line change in bothFuturesExpiryFunctions.csandFuturesExpiryFunctionsTests.cs.The contract multiplier (KRW 250,000/point), tick (0.05), currency (KRW), quarterly cycle, and second-Thursday last-trading-day rule are confirmed and not placeholders.
Related Issue
No linked issue.
Motivation and Context
The KOSPI 200 future is one of the most actively traded index futures in Asia. Without this entry, users cannot trade or backtest KOSPI 200 futures in LEAN.
Requires Documentation Change
N/A
How Has This Been Tested?
Added test cases to
Tests/Common/Securities/Futures/FuturesExpiryFunctionsTests.cs. All futures expiry tests pass locally (Failed: 0, Passed: 192), and Market / SymbolPropertiesDatabase / MarketHoursDatabase test suites pass (Failed: 0, Passed: 152).Types of changes
Checklist:
feature-[description]🤖 Generated with Claude Code