docs: 新增 TaiwanStockMarginMaintenance(個股融資維持率)中英雙語文件 - #174
Open
linsamtw wants to merge 2 commits into
Open
Conversation
新增 sponsor 等級資料集「個股融資維持率 TaiwanStockMarginMaintenance」的 對外文件,涵蓋中文與英文兩個語系,並同步更新資料集清單、更新日誌與 LLM 索引檔。 修改檔案與內容: docs/tutor/TaiwanMarket/Chip.md - 第 1 行資料集總數 25 -> 26 - 頁首 bullet list 於 TaiwanStockIndustryChainMoneyFlow 之後新增 「個股融資維持率 TaiwanStockMarginMaintenance」連結,錨點 #taiwanstockmarginmaintenance-sponsor - 檔尾新增資料集章節,heading 標註 sponsor only(比照 TaiwanStockLoanCollateralBalance / TaiwanStockIndustryChainMoneyFlow 的「(只限 [sponsor](...) 會員使用)」寫法,非 backer、sponsor) - 章節內容:資料區間 2001-01-05 ~ now(上櫃自 2007-01-04 起)、 更新時間、維持率與成本線的計算式、涵蓋範圍、無資料列的情形、 不帶 data_id 取整日全市場的用法 - 以 ??? note 摺疊區塊補充四點必要說明(估算指標無官方真值、 融資成數採法定上限、上櫃起始日不同、成本線為調整後名目值), 置於 bullet list 之後、example 之前 - Package / Python / R 三種呼叫範例與 DataFrame、Schema 輸出範例 docs/tutor/TaiwanMarket/Chip.en.md - 第 1 行資料集總數 25 -> 26 - 頁首 bullet list 新增對應英文連結,錨點為完整標題 slug #individual-stock-margin-maintenance-taiwanstockmarginmaintenance-only-available-for-sponsor-members - 檔尾新增與中文版對應的英文章節(含相同的 ??? note 四點說明與範例) docs/tutor/TaiwanMarket/DataList.md - 第 1 行台灣金融市場資料集總數 90 -> 91 - 籌碼面 Chip 清單新增個股融資維持率連結(錨點與 Chip.md 一致) docs/tutor/TaiwanMarket/DataList.en.md - 第 1 行總數 90 -> 91 - Chip 清單新增對應英文連結(錨點與 Chip.en.md 一致) docs/WhatIsNew.md / docs/WhatIsNew.en.md - 2026-08-03 區塊新增一則:資料區間 2001-01-05 ~ now(上櫃自 2007-01-04 起)、欄位概述,並註明本資料集為估算指標 docs/llms-full.txt - Chip / Institutional 區塊標題資料集數 23 -> 24 - 於 TaiwanStockIndustryChainMoneyFlow 之後、 TaiwanStockDispositionSecuritiesPeriod 之前新增 TaiwanStockMarginMaintenance 區塊,含 Tier / Data range / Update / Params(含整日全市場查法)/ Columns / Formula / Coverage 與三則 Note,維持純文字格式不使用 markdown 摺疊語法 docs/llms.txt - Chip (Institutional) 分類清單加入 TaiwanStockMarginMaintenance
Contributor
Author
|
寫這段時 FinMind API / MCP 持續回 5xx,本機
建議處置(擇一):
另外附帶說明: |
原本只在 bullet 裡放一行摘要,沒有交代融資成本線到底怎麼遞推、邊界情況怎麼
處理。本資料集是估算指標、沒有官方真值可對照,數字必然與其他服務不同,
使用者一定會問「為什麼跟看盤軟體不一樣」,計算方式必須完整攤開。
修改檔案
- docs/tutor/TaiwanMarket/Chip.md
新增「計算方式」??? note 摺疊區塊(放在 bullet list 之後、估算指標警語
之前),內容:
* 主公式 margin_maintenance = 當日收盤價 / (margin_cost * margin_ratio) * 100
* margin_cost 的逐日遞推式(code block):
舊部位 = max(今日融資餘額 - 今日融資買進, 0)
margin_cost = (前一日 margin_cost * 舊部位 + 當日收盤價 * 今日融資買進)
/ (舊部位 + 今日融資買進)
* 說明單位為「張」、當日買進採公告值而非用餘額差推算,因此股數事件造成的
餘額跳變不會被誤計為買進
* 三個邊界情況:舊部位為 0 時成本線即當日收盤價;餘額歸零時重置並從當日
收盤價重新起算;當日無成交時沿用前值且不輸出當日資料
* 股數事件與除權息的調整順序(先調前一日成本線、再套當日買進)
原本 bullet 裡重複的兩行公式摘要已移除,避免同一件事寫兩次且深度不一致。
- docs/tutor/TaiwanMarket/Chip.en.md
同上,英文版對應改寫。
- docs/llms-full.txt
原本單行的 Formula 拆成四行:主公式、margin_cost 遞推式、邊界情況、
事件調整,讓 AI agent 讀得到完整規則。
驗證
- 以 mkdocs.yml 實際啟用的 extension 集合(admonition + pymdownx.details +
pymdownx.superfences 等)渲染中英兩份,確認 ??? note 摺疊區塊為 2 個、
縮排的 code fence 正確渲染成 2 個 code 區塊、summary 標題正確。
未揭露內部細節:沒有寫排程頻率或時間窗(更新時間仍只有名義時鐘)、沒有列
來源機關或法規條號、沒有內部路徑與常數。
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.
摘要
新增 sponsor 等級資料集 個股融資維持率 TaiwanStockMarginMaintenance 的中英雙語文件。
TaiwanStockLoanCollateralBalance/TaiwanStockIndustryChainMoneyFlow的「(只限 sponsor 會員使用)」寫法
date、stock_id、margin_balance、margin_cost、margin_ratio、margin_maintenance修改檔案
docs/tutor/TaiwanMarket/Chip.md??? note四點說明 + 範例docs/tutor/TaiwanMarket/Chip.en.mddocs/tutor/TaiwanMarket/DataList.mddocs/tutor/TaiwanMarket/DataList.en.mddocs/WhatIsNew.md/.en.mddocs/llms-full.txtdocs/llms.txt文件必要註記(以
??? note摺疊區塊呈現)錨點驗證
以
markdown.extensions.toc.slugify實測,並與 repo 內既有同型標題交叉比對:#taiwanstockmarginmaintenance-sponsor(對照
台股產業鏈資金流向 TaiwanStockIndustryChainMoneyFlow (…)→#taiwanstockindustrychainmoneyflow-sponsor,與現行連結一致)#individual-stock-margin-maintenance-taiwanstockmarginmaintenance-only-available-for-sponsor-members(對照
Industry Chain Money Flow …→#industry-chain-money-flow-…-only-available-for-sponsor-members)Chip/DataList中英四份清單的連結皆使用上述同一錨點。備註
docs/llms-full.txt的 Chip 區塊標題原本寫 23 datasets,但區塊內實際有 24 個###條目(既有落差)。本 PR 僅將其 +1 為 24,未一併修正該落差。待其他 repo
本 PR 只動文件;資料集本身的實作、API 註冊與 SDK 方法(
taiwan_stock_margin_maintenance)由其他 repo 的 MR 提供。🤖 Generated with Claude Code