@dshtrading/kit-us 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,6 +30,8 @@ description: 财经观点沉淀与知识库策展指南:基于 Content Insight
|
|
|
30
30
|
- `medium`:核心逻辑有参考价值,但部分数据存在滞后或口误出入;
|
|
31
31
|
- `low`:存在重大关键事实失准或关键数据无法核实。
|
|
32
32
|
|
|
33
|
+
> **分层说明(勿混用)**:卡片 `factCheck` 三桶是**素材级**核查记录(这条声称被核实到什么程度);结论级证据契约的 `supported` / `contradicted` / `mixed` / `insufficient` 四态是**结论级**判定(这条结论能否成立)。卡片字段不因四态改名;引用卡片时按证据契约归入 C/D 级线索,不得单独支撑 `supported` 结论。
|
|
34
|
+
|
|
33
35
|
---
|
|
34
36
|
|
|
35
37
|
## 3. 标准策展 SOP
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: us-risk-checklist
|
|
3
|
+
description: 美股交易风控检查清单:开仓前逐项核对盘前盘后流动性、熔断与个股停牌、做空规则、T+1 与 PDT 日内限制、财报跳空风险。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 美股风控检查清单(us-risk-checklist)
|
|
7
|
+
|
|
8
|
+
开仓前逐项核对,任何一项不过则不建仓:
|
|
9
|
+
|
|
10
|
+
**依据闸门(先过)**:每条开仓理由必须能指回锚点(工具名 + 参数 + 数值 + 数据时间 / 公告或章节 / facts 条目 / 知识卡 id + updatedAt)。只有 C/D/E 级来源、或写不出锚点的理由,按证据不足处理(insufficient),不得作为入场依据。
|
|
11
|
+
|
|
12
|
+
1. **交易时段与流动性**:常规时段 9:30–16:00 ET。盘前 4:00–9:30 / 盘后 16:00–20:00 流动性薄、点差宽、报价不构成可成交承诺,限价单优先、禁用市价单扫单。注意:本插件行情来自 Stooq 日线收盘,**不反映盘前盘后价**,时段外引用价格须明确标注。
|
|
13
|
+
2. **熔断与个股停牌**:大盘熔断以标普 500 较前收盘为准——跌 7%(L1)/13%(L2)暂停 15 分钟,跌 20%(L3)当日休市。个股有 LULD 波动暂停与财报/公告停牌;持仓期间挂单可能在暂停中无法成交,恢复后价格可能跳变。
|
|
14
|
+
3. **做空规则**:开空前确认可融券(locate);难借券(HTB)有融券费与强平召回风险。Reg SHO 严格限制裸卖空;个股当日跌幅 ≥10% 触发 Rule 201 替代 uptick 限制。轧空(squeeze)下亏损无上限,空头仓位必须设强制止损位。
|
|
15
|
+
4. **T+1 交收与 PDT**:美股已实行 T+1 交收。融资账户权益 < $25,000 时,滚动 5 个交易日内日内回转(day trade)不得超过 3 次(FINRA PDT),第 4 次触发 90 天限制;现金账户注意 Good Faith Violation(用未交收资金卖出再买入)。当日回转次数是硬约束,下单前先查计数。
|
|
16
|
+
5. **仓位与跳空风险**:单笔风险 ≤ 账户权益既定百分比;美股存在隔夜跳空,止损单不能保证按止损价成交(gap 直接穿越),重仓隔夜必须缩减仓位。财报、拆分、分红除权、FOMC 等日历事件发生前核对是否持仓过夜。
|
|
17
|
+
6. **基本面估值与新闻**:调用 `us_get_fundamentals` 核对市值、P/E、P/B、EPS 与 52 周区间;调用 `us_get_news` 核查近期财报、管理层动作或分析师调级;避免在估值极端偏离且临近财报发布时盲目追高。
|
|
18
|
+
7. **订单类型与有效期**:限价单默认核对有效期(DAY/GTC);止损用 stop-limit 时评估穿透风险。暗池/场外成交可能使盘口显示深度失真,小市值股降低仓位上限。
|
|
19
|
+
8. **对手侧情景**:价格反向运行到止损位后,是否接受该笔亏损并继续执行原计划(不允许临时加倍摊平);连续两笔止损即当日停手复盘。
|
|
20
|
+
|
|
21
|
+
退出纪律:
|
|
22
|
+
- 达到目标位或止损位按计划执行;移动止损只朝有利方向。
|
|
23
|
+
- 财报前夜重新评估隔夜仓:跳空无法被日内止损保护,不确定就减仓。
|
|
24
|
+
|
|
25
|
+
> 本清单是方法论,不构成投资建议。行情与下单工具均为 dry-run 起步,实盘需显式开关与审批(dsh-trading 铁律 #3);行情数据来自 Stooq,个人/非商业使用边界以 stooq.com 条款为准。
|
package/lib/api/lib/index.d.ts
CHANGED
|
@@ -620,6 +620,8 @@ declare module '@deepseek-ai/cordis' {
|
|
|
620
620
|
tradingNewsRegistry: TradingNewsRegistry;
|
|
621
621
|
/** 跨市场快讯源(@dshtrading/connector-jin10 提供;缺席 = 未安装快讯连接器)。 */
|
|
622
622
|
tradingFlashFeed: FlashFeedService;
|
|
623
|
+
/** 宏观/利率源(@dshtrading/connector-jin10 提供;缺席 = 未安装金十连接器)。 */
|
|
624
|
+
tradingMacroFeed: MacroFeedService;
|
|
623
625
|
}
|
|
624
626
|
}
|
|
625
627
|
/**
|
|
@@ -746,6 +748,50 @@ interface FlashFeedService {
|
|
|
746
748
|
/** 关键词搜快讯(上游一次性返回、不支持翻页)。 */
|
|
747
749
|
searchFlash(keyword: string, limit?: number | undefined): Promise<readonly NewsItem[]>;
|
|
748
750
|
}
|
|
751
|
+
/**
|
|
752
|
+
* 宏观经济日历条目(金十当周经济数据,2026-09-15):数值均为上游快照原样字符串,
|
|
753
|
+
* `actual` 缺省 = 未公布。
|
|
754
|
+
*/
|
|
755
|
+
interface MacroCalendarEntry {
|
|
756
|
+
/** ISO 8601 公布时间(东八区解释,同 NewsItem 口径)。 */
|
|
757
|
+
readonly publishedAt: string;
|
|
758
|
+
/** 重要度(上游 star,0–5)。 */
|
|
759
|
+
readonly star: number;
|
|
760
|
+
/** 地区(标题前缀推断,如 美国/日本/中国;未识别 = 空串)。 */
|
|
761
|
+
readonly region: string;
|
|
762
|
+
readonly title: string;
|
|
763
|
+
readonly previous?: string;
|
|
764
|
+
readonly consensus?: string;
|
|
765
|
+
readonly actual?: string;
|
|
766
|
+
readonly revised?: string;
|
|
767
|
+
/** 上游公布影响词(利多/利空/影响较小…;原样透传)。 */
|
|
768
|
+
readonly affect?: string;
|
|
769
|
+
}
|
|
770
|
+
/** 央行最新利率条目(金十网页版,2026-09-15)。 */
|
|
771
|
+
interface MacroRateEntry {
|
|
772
|
+
/** 地区(flag 名推断,如 美国/日本/中国;未识别 = 空串)。 */
|
|
773
|
+
readonly region: string;
|
|
774
|
+
readonly bankName: string;
|
|
775
|
+
/** 最新利率(上游原样字符串,如 "3.75"/"0")。 */
|
|
776
|
+
readonly rate: string;
|
|
777
|
+
/** 公布日(上游原样 YYYY-MM-DD)。 */
|
|
778
|
+
readonly publishedAt: string;
|
|
779
|
+
/** 所属指标名(如「美联储利率决定(上限)」;部分央行缺省)。 */
|
|
780
|
+
readonly indicatorName?: string;
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* 宏观/利率源契约(2026-09-15 金十接入):host 平面由金十连接器 provide
|
|
784
|
+
* tradingMacroFeed,GUI 宏观面板(桥 /dshtrading/api/macro/*)消费;服务缺席 =
|
|
785
|
+
* 未安装/未启用该数据源 → 消费方报 TRADING_NOT_IMPLEMENTED,绝不把「没有数据源」
|
|
786
|
+
* 伪装成「没有数据」。日历走官方 MCP(list_calendar),利率走网页版公开接口
|
|
787
|
+
* (spikes/impl-jin10-macro-rates/EVIDENCE.md)。
|
|
788
|
+
*/
|
|
789
|
+
interface MacroFeedService {
|
|
790
|
+
/** 当周经济日历(周一~周日,北京时间;limit 截尾,缺省全周)。 */
|
|
791
|
+
listCalendar(limit?: number | undefined): Promise<readonly MacroCalendarEntry[]>;
|
|
792
|
+
/** 央行最新利率(全量,客户端按地区过滤)。 */
|
|
793
|
+
listRates(): Promise<readonly MacroRateEntry[]>;
|
|
794
|
+
}
|
|
749
795
|
/** 新闻聚合器注册表契约(Issue #37,router 插件提供)。 */
|
|
750
796
|
interface TradingNewsRegistry {
|
|
751
797
|
register(market: string, aggregator: NewsAggregator): () => void;
|
|
@@ -753,4 +799,4 @@ interface TradingNewsRegistry {
|
|
|
753
799
|
markets(): string[];
|
|
754
800
|
}
|
|
755
801
|
//#endregion
|
|
756
|
-
export { AccountBalance, AggregateNewsOptions, AggregateNewsResult, AuctionSnapshot, BuybackItem, CompanyProfile, CryptoFundamentals, DerivativesData, DerivativesHistory, DerivativesPoint, Disposable, DividendItem, DragonTigerItem, FinancialCell, FinancialIndicatorRow, FinancialReportGroup, FinancialReportMatrix, FlashFeedService, ForecastSummary, FundamentalsPackage, HolderNumSummary, InsiderTradeItem, InstitutionalHoldingItem, Interval, Kline, LimitUpPoolItem, MainOperationSegment, MarketDataRegistration, MarketDataRegistry, MarketDataService, MarketRouterService, NewsAggregator, NewsItem, OperatingEfficiency, Order, OrderRequest, OrderSide, OrderStatus, OrderType, Orderbook, OrderbookLevel, Position, PositionSide, ResearchReportItem, ShareholderItem, SplitItem, StockFundamentals, Ticker, TradeFill, TradeRegistration, TradeRegistry, TradeService, TradeTick, TradingNewsRegistry };
|
|
802
|
+
export { AccountBalance, AggregateNewsOptions, AggregateNewsResult, AuctionSnapshot, BuybackItem, CompanyProfile, CryptoFundamentals, DerivativesData, DerivativesHistory, DerivativesPoint, Disposable, DividendItem, DragonTigerItem, FinancialCell, FinancialIndicatorRow, FinancialReportGroup, FinancialReportMatrix, FlashFeedService, ForecastSummary, FundamentalsPackage, HolderNumSummary, InsiderTradeItem, InstitutionalHoldingItem, Interval, Kline, LimitUpPoolItem, MacroCalendarEntry, MacroFeedService, MacroRateEntry, MainOperationSegment, MarketDataRegistration, MarketDataRegistry, MarketDataService, MarketRouterService, NewsAggregator, NewsItem, OperatingEfficiency, Order, OrderRequest, OrderSide, OrderStatus, OrderType, Orderbook, OrderbookLevel, Position, PositionSide, ResearchReportItem, ShareholderItem, SplitItem, StockFundamentals, Ticker, TradeFill, TradeRegistration, TradeRegistry, TradeService, TradeTick, TradingNewsRegistry };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dshtrading/kit-us",
|
|
3
3
|
"description": "US market toolkit plugin for dsh-trading: US risk checklist skill provider and US news / fundamentals tools; runs as a us-trader preset row (session-scoped)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dshtrading/indicators": "0.
|
|
22
|
-
"@dshtrading/knowledge": "0.
|
|
21
|
+
"@dshtrading/indicators": "0.4.0",
|
|
22
|
+
"@dshtrading/knowledge": "0.4.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@deepseek-ai/cordis": ">=4.0.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"tsdown": "^0.22.0",
|
|
32
32
|
"vitest": "^3.0.0",
|
|
33
|
-
"@dshtrading/api": "0.
|
|
33
|
+
"@dshtrading/api": "0.4.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsdown",
|