Skip to content

Commit

Permalink
Adds HKFE to Index Market Hours
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCatarino committed Jan 10, 2025
1 parent 0ac3708 commit db736cf
Show file tree
Hide file tree
Showing 35 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"og:title": "HSI - Documentation QuantConnect.com",
"og:type": "website",
"og:site_name": "HSI - QuantConnect.com",
"og:image": "https://cdn.quantconnect.com/docs/i/writing-algorithms/securities/asset-classes/futures/market-hours/hsi.png"
"og:image": "https://cdn.quantconnect.com/docs/i/writing-algorithms/securities/asset-classes/index/market-hours/hkfe/hsi.png"
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"type": "metadata",
"values": {
"description": "This page shows the trading hours, holidays, and time zone of the Index market.",
"description": "This page shows the trading hours, holidays, and time zone of the HKFE Indices market.",
"keywords": "regular trading hours, pre-market hours, post-market hours, extended market hours, holidays, time zone",
"og:description": "This page shows the trading hours, holidays, and time zone of the Index market.",
"og:title": "Market Hours - Documentation QuantConnect.com",
"og:description": "This page shows the trading hours, holidays, and time zone of the HKFE Indices market.",
"og:title": "HKFE - Documentation QuantConnect.com",
"og:type": "website",
"og:site_name": "Market Hours - QuantConnect.com",
"og:image": "https://cdn.quantconnect.com/docs/i/writing-algorithms/securities/asset-classes/futures/market-hours.png"
"og:site_name": "HKFE - QuantConnect.com",
"og:image": "https://cdn.quantconnect.com/docs/i/writing-algorithms/securities/asset-classes/index/market-hours/hkfe.png"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Code generated by market-hour-code-generator.py -->
<p>The following table shows the indices that have different trading periods than the overall Index market:</p>
<p>The following table shows the indices that have different trading periods than the overall HKFE Indices market:</p>
<table class="table qc-table table-reflow">
<thead><tr><th>Symbol</th><th>Name</th></tr></thead>
<tbody>
<tr><td><a href="/docs/v2/writing-algorithms/securities/asset-classes/futures/market-hours/hsi">HSI</a></td><td>Hang Seng Index</td></tr>
<tr><td><a href="/docs/v2/writing-algorithms/securities/asset-classes/index/market-hours/hkfe/hsi">HSI</a></td><td>Hang Seng Index</td></tr>
</tbody>
</table>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Code generated by market-hour-code-generator.py -->
<p>The following table shows the early closes for the Index market:</p>
<p>The following table shows the early closes for the HKFE Indices market:</p>
<table class="table qc-table table-reflow">
<thead>
<tr><th style="width: 50%;">Date (<i>yyyy-mm-dd</i>)</th><th style="width: 50%;">Time Of Market Close (Asia/Hong Kong)</th></tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Code generated by market-hour-code-generator.py -->
<p>The following table shows the dates of holidays for the Index market:</p>
<p>The following table shows the dates of holidays for the HKFE Indices market:</p>
<table class="table qc-table table-reflow">
<thead><tr><th colspan="5">Date (<i>yyyy-mm-dd</i>)</th></tr></thead>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>This page shows the trading hours, holidays, and time zone of the Index market.</p>
<p>This page shows the trading hours, holidays, and time zone of the HKFE Indices market.</p>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Code generated by market-hour-code-generator.py -->
<p>The following table shows the regular trading hours for the Index market:</p>
<p>The following table shows the regular trading hours for the HKFE Indices market:</p>
<table class="table qc-table table-reflow">
<thead>
<tr><th style="width: 20%;">Weekday</th><th style="width: 80%;">Time (Asia/Hong Kong)</th></tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!-- Code generated by market-hour-code-generator.py -->
<p>The Index market trades in the <code>Asia/Hong Kong</code> time zone.</p>
<p>The HKFE Indices market trades in the <code>Asia/Hong Kong</code> time zone.</p>
7 changes: 5 additions & 2 deletions code-generators/market-hour-code-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ def __write_content(exchange, entries):
contracts_real = {
'SPX': 'S&P 500 Index',
'NDX': 'Nasdaq 100 Index',
'VIX': 'CBOE Volatility Index'
'VIX': 'CBOE Volatility Index',
'HSI': 'Hang Seng Index'
}
for line in get_text_content(SPDB).split('\n'):
csv = line.split(',')
Expand Down Expand Up @@ -200,6 +201,7 @@ def __write_content(exchange, entries):
'Option-usa-[*]': 'Equity Option',
'Index-usa-[*]': 'US Indices',
'Index-eurex-[*]': 'EUREX Indices',
'Index-hkfe-[*]': 'HKFE Indices',
'IndexOption-usa-[*]': 'US Index Option',
}.get(key, tmp[0])
asset_class = tmp[0].replace("Cfd", "CFD").replace("IndexOption", "US Index Option")
Expand Down Expand Up @@ -230,7 +232,8 @@ def __write_content(exchange, entries):
'option-usa': '02 Equity Options/04 Market Hours',
'forex-oanda': '05 Forex/04 Market Hours',
'index-usa': '08 Index/04 Market Hours',
'index-eurex': '08 Index/04 Market Hours/99 EUREX',
'index-eurex': '08 Index/04 Market Hours/98 EUREX',
'index-hkfe': '08 Index/04 Market Hours/99 HKFE',
'indexoption-usa': '09 Index Options/04 Market Hours',
'cfd-interactivebrokers': '10 CFD/04 Market Hours/01 Interactive Brokers',
'cfd-oanda': '10 CFD/04 Market Hours/02 Oanda',
Expand Down

0 comments on commit db736cf

Please sign in to comment.