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

1 天前
 way2explore2

做量化回测的时候被 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 突然断掉的情况?

608 次点击
所在节点    投资
4 条回复
GlobalNPC
1 天前
只有美股数据吗
chenghonour
1 天前
种子用户免费吗?
way2explore2
1 天前
@GlobalNPC 嗯,看用户需求,后续会加其他地区的
way2explore2
1 天前
@chenghonour Beta 期间免费

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1216867

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX