固定收益

美國政府的 OHLC 數據。國債收益率?

  • March 13, 2021

每日收益率是否有開盤高低收盤數據?我可以從美聯儲找到的數據只報告一個價格,而且我不確定數據是什麼時候報告的。我知道大多數債券不在交易所交易,所以這些數據很容易獲得是有道理的,但我想知道這些數據是否可以在任何地方獲得。

MarketWatch每日 OHLC 債券收益率條形圖來自Tullett Prebon

這是CSV 格式的美國 10 年期國債收益率的範例輸出。

Date,Open,High,Low,Close
03/11/2021,"1.518%","1.554%","1.479%","1.538%"
03/10/2021,"1.532%","1.571%","1.506%","1.518%"
03/09/2021,"1.599%","1.599%","1.526%","1.596%"
03/08/2021,"1.568%","1.617%","1.568%","1.599%"
03/05/2021,"1.564%","1.614%","1.538%","1.568%"

從 1997 年開始,也可以直接從財政部以 XML 格式獲得收盤內插收益率。

<m:properties>
 <d:Id m:type="Edm.Int32">7802</d:Id>
 <d:NEW_DATE m:type="Edm.DateTime">2021-03-08T00:00:00</d:NEW_DATE>
 <d:BC_1MONTH m:type="Edm.Double">0.04</d:BC_1MONTH>
 <d:BC_2MONTH m:type="Edm.Double">0.04</d:BC_2MONTH>
 <d:BC_3MONTH m:type="Edm.Double">0.05</d:BC_3MONTH>
 <d:BC_6MONTH m:type="Edm.Double">0.06</d:BC_6MONTH>
 <d:BC_1YEAR m:type="Edm.Double">0.09</d:BC_1YEAR>
 <d:BC_2YEAR m:type="Edm.Double">0.17</d:BC_2YEAR>
 <d:BC_3YEAR m:type="Edm.Double">0.34</d:BC_3YEAR>
 <d:BC_5YEAR m:type="Edm.Double">0.86</d:BC_5YEAR>
 <d:BC_7YEAR m:type="Edm.Double">1.28</d:BC_7YEAR>
 <d:BC_10YEAR m:type="Edm.Double">1.59</d:BC_10YEAR>
 <d:BC_20YEAR m:type="Edm.Double">2.2</d:BC_20YEAR>
 <d:BC_30YEAR m:type="Edm.Double">2.31</d:BC_30YEAR>
 <d:BC_30YEARDISPLAY m:type="Edm.Double">2.31</d:BC_30YEARDISPLAY>
</m:properties>

另一個定價來源是財政部證券操作:結果:Excel:Weighted Avg. Accpt. Price/Rate(WAP)和Least Favorable Accpt. Price/Rate(LFP)列。這兩列可以用來衡量債券市場的波動性。例如,WAP 和 LFP 之間的交易量加權價差顯示出 2020 年 3 月美國國債市場存在流動性問題的跡象:

在此處輸入圖像描述

圖表上的峰值日是 3 月 19 日,當天美聯儲 WAP 為 UST 2.875% 2049 年 5 月 15 日當天拍賣,125.808而 LFP 為128.25390625

Excel結果文件可能會延遲數週,但上面的TSY API和派生圖表範例是最新的。交易量加權 LFP/WAP 點差在 SQL 中計算如下:

SELECT datetime, acc.entity AS "entity", acc.tags.operation_id AS "tags.operation_id", acc.tags.Operation_Type AS "tags.Operation_Type", acc.tags."Maturity/Call_Date_Range" AS "tags.Maturity/Call_Date_Range", acc.tags.operation_direction AS "tags.operation_direction",
 MAX(sub.value) AS tsy_submitted, sum(acc.value/1000000) AS tsy_accepted,
ABS(100*(SUM( acc.value*
 CASE 
   -- Rounding per Note 1 https://www.newyorkfed.org/markets/desk-operations/treasury-securities
   WHEN acc.tags.operation_type IN ('Outright Bill Purchase', 'Outright FRN Purchase') THEN
     -- wap=1.516, lfp=1.5125, rlfp=1.513 pwap= 100/(1+wap/100) prlfp = 100/(1+rlfp/100) spread=100*(prlfp/pwap-1)
     (1+ROUND(lfp.value,3)/100)/(1+wap.value/100)
   ELSE
     -- wap=120.717 , lfp=120.7578125, rlfp=120.758 spread=100*(120.758/120.717-1)=0.0339637333598%
     ROUND(lfp.value,3)/wap.value
   END
 ) / SUM(acc.value)-1)) AS tsy_lfp_wap_spread
FROM "total_par_amt_submitted_($millions)" sub
  JOIN "par_amt_accepted_($)" acc
  JOIN "least_favorable_accpt._price/rate" lfp
  JOIN "weighted_avg._accpt._price/rate" wap
WHERE acc.entity = 'us.fed.nyc' 
 AND acc.datetime BETWEEN today-14*day AND next_day
GROUP BY acc.entity, acc.tags.operation_id, acc.tags.Operation_Type, acc.tags."Maturity/Call_Date_Range", acc.tags.operation_direction, datetime
WITH TIMEZONE = 'US/Eastern'  
ORDER BY datetime DESC, acc.tags.operation_id

引用自:https://quant.stackexchange.com/questions/61585