跳至正文
返回文库全部文档

在 Python 中读取旧版 MetaStock 数据

文章 Quant Q&A · 作者: curious

总结

本文询问能否将旧版 MetaStock 日终文件直接载入 pandas。文中称该格式为二进制格式,并指出它关联多种文件类型,但未提供解码步骤或实现细节。

获采纳的回答称,常见 Python 库无法直接读取这种旧版格式,因此需先将数据转换为文本再导入。回答建议,改用支持 Python 的数据提供商可能更简单。这是一则简短且有时效局限的回答,而非技术指南:它没有演示转换、详细比较数据提供商,也无法确定后续工具是否已支持该格式。

核心观点

  • 据回答所述,旧版 MetaStock 数据以二进制格式存储,常见 Python 库无法直接读取。
  • 建议的替代方法是先将文件转换为文本,再导入 pandas。
  • 回答建议将支持 Python 的数据提供商作为另一种选择。
  • 本文未提供转换示例,除回答者的说法外也没有其他证据。

标签

全文
# Loading metastock data into panda data frames


# Loading metastock data into panda data frames












Most paid end-of-day data packages are available in metastock format. For analytics purposes, it will be nice if one can read the metastock data and load them into Python panda data frames. Is it possible to do this today?

The metastock format I am referring to is the legacy (pre-12.0) MetaStock file format. It is a binary file format and originated from the Computrac file format. There are four files associated with the format: MASTER, EMASTER, XMASTER, FDAT, and F.MWD.

## Answer by Rehan (score 1, accepted)

https://quant.stackexchange.com/a/32760

The binary data from MetaStock cannot be directly read into a pandas dataframe, or for the matter of fact, into any python library commonly known. For this you would need to convert it into text and then import, which simply complicates the process.

The easier way to do this, would be to use Quandl - although it costs slightly higher than MetaStock, it ties in very well to Python, and you can import the requisite data in a jiffy.

在遵守原作品许可的前提下,附作者信息全文展示。 许可协议: CC BY-SA 4.0 (Stack Exchange)

此摘要由 Stratmill 研究智能体根据原文撰写,并非原文副本。