# 期權標的歷史波動率

get_option_underlying_his_volatility(code, index_option_type=IndexOptionType.NORMAL, begin_time=None, end_time=None, page_req_key=None)

  • 介紹

    獲取期權標的歷史波動率數據,按交易日返回 IV 和 HV 時間序列及標的收盤價,支持分頁。

  • 參數

    參數 類型 說明
    code str 標的股票代碼
    index_option_type IndexOptionType 指數期權類型
    begin_time str 開始日期,格式 'YYYY-MM-DD'
    end_time str 結束日期,格式 'YYYY-MM-DD'
    page_req_key bytes 分頁請求 key

    時間範圍說明

    • begin_timeend_time 跨度最多 364 天
    • 兩者都不填:end_time = 當天,begin_time = 當天往前推 364 天
    • 只填 begin_timeend_time = begin_time 往後推 364 天
    • 只填 end_timebegin_time = end_time 往前推 364 天
  • 返回

    參數 類型 說明
    ret RET_CODE 接口調用結果
    data pandas.DataFrame 當 ret == RET_OK,返回波動率數據
    str 當 ret != RET_OK,返回錯誤描述
    page_req_key bytes 下一頁 key,None 表示無更多數據
    • 返回 DataFrame 字段:

      字段 類型 說明
      code str 股票代碼
      name str 股票名稱
      time str 交易日時間字符串
      timestamp float 交易日時間戳(Unix 秒)
      iv float 隱含波動率(百分比)
      hv float 歷史波動率(百分比)
      underlying_price float 標的收盤價(當日為標記價)
  • Example

from futu import *

quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data, page_req_key = quote_ctx.get_option_underlying_his_volatility(
    'US.AAPL',
    begin_time='2026-06-01',
    end_time='2026-06-15'
)
if ret == RET_OK:
    print(data)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  • Output
      code  name        time     timestamp      iv      hv  underlying_price
0  US.AAPL  Apple  2026-06-12  1.781237e+09  25.126  23.324            291.13
1  US.AAPL  Apple  2026-06-11  1.781150e+09  25.617  23.270            295.63
2  US.AAPL  Apple  2026-06-10  1.781064e+09  27.384  22.892            291.58
3  US.AAPL  Apple  2026-06-09  1.780978e+09  27.237  22.854            290.55
4  US.AAPL  Apple  2026-06-08  1.780891e+09  26.368  19.028            301.54
5  US.AAPL  Apple  2026-06-05  1.780632e+09  26.995  18.024            307.34
6  US.AAPL  Apple  2026-06-04  1.780546e+09  25.249  17.366            311.23
7  US.AAPL  Apple  2026-06-03  1.780459e+09  26.801  18.927            310.26
8  US.AAPL  Apple  2026-06-02  1.780373e+09  26.258  18.415            315.20
9  US.AAPL  Apple  2026-06-01  1.780286e+09  25.864  16.841            306.31
1
2
3
4
5
6
7
8
9
10
11

接口限制

  • 30 秒內最多請求 60 次期權標的歷史波動率接口(支持分頁的接口,僅首次調用納入統計)