way2explore2
V2EX  ›  投资

做了个 yfinance 替代品, 30 年历史数据, beta

  •  
  •   way2explore2 · Jun 1 · 1006 views
    This topic created in 44 days ago, the information mentioned may be changed or developed.

    做量化回测的时候被 yfinance 限速搞烦了,干脆自己写了一个。

    tidata ,一个 OHLC 历史数据 API ,30 年数据,部署在 Edge Cloud ,不会突然被限速。

    from tidata.tifinance import Ticker
    
    aapl = Ticker("AAPL", api_key="your_key")
    df = aapl.history(period="1y")
    # 返回的 DataFrame 格式和 yfinance 一样
    

    也可以直接调 REST API:

    curl -H "Authorization: Bearer your_key" \
      "https://api.tradeinsight.info/trading-data/v1/ohlc?ticker=AAPL&start=2020-01-01&end=2024-12-31"
    

    Beta 期间免费。https://beta.tradeinsight.info

    你们平时用什么数据源做回测?有没有遇到过 yfinance 突然断掉的情况?

    Supplement 1  ·  Jun 1
    MCP 功能也加了,欢迎试用啊
    6 replies    2026-06-08 17:58:20 +08:00
    GlobalNPC
        1
    GlobalNPC  
       Jun 1 via Android
    只有美股数据吗
    chenghonour
        2
    chenghonour  
       Jun 1 via Android
    种子用户免费吗?
    way2explore2
        3
    way2explore2  
    OP
       Jun 1 via Android
    @GlobalNPC 嗯,看用户需求,后续会加其他地区的
    way2explore2
        4
    way2explore2  
    OP
       Jun 1
    @chenghonour Beta 期间免费
    wwang7
        5
    wwang7  
       Jun 5
    数据来源是哪里?和 yfinance 一样吗
    way2explore2
        6
    way2explore2  
    OP
       Jun 8
    @wwang7 数据源不是 yfinance ,输出结果杯整合成 yfiancne 一样
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   986 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 21:13 · PVG 05:13 · LAX 14:13 · JFK 17:13
    ♥ Do have faith in what you're doing.