Skip to Content
Python算法交易
book

Python算法交易

by Yves Hilpisch
November 2022
Intermediate to advanced
392 pages
10h 8m
Chinese
China Electric Power Press Ltd.
Content preview from Python算法交易
62
|
第
3
章
quandl.com
)作为流行的开放数据源平台。“
Eikon Data API
”介绍了
Refinitiv
Eikon Data API
的
Python
封装包。“有效存储金融数据”简要说明了如何使用
pandas
有效地存储基于
HDF5
(
http://hdfgroup.org
)的二进制存储格式的历史结构
化数据。
本章的目标是以一种可以有效实施交易想法和假设的回测的格式提供可用的金融数
据。三个主要主题包括数据的导入,数据的处理以及数据的存储。本章及后续各章
假定安装了
Python 3.8
,并安装了
2
章中详细介绍的那些
Python
软件包。目前而言,
与提供此
Python
环境的确切基础设施仍是无关。有关使用
Python
进行有效的输入
输出操作的更多详细信息,请参见
Hilpisch
(
2018
,第
9
章)。
3.1
从不同数据源读取金融数据
本节充分利用了
pandas
的功能,
pandas
是流行的
Python
数据分析包(请参见
pandas
主 页(
http://pandas.pydata.org
))。
pandas
全面支持本章涉及的三个主要任务:
读取数据,处理数据和存储数据。如本节的其余部分所示,它的优势之一是从不同
类型的源中读取数据。
3.1.1
数据集
在本部分中,我们将使用相对较小的、从
Eikon Data API
获取的
2020
年
4
月苹果公
司股票价格的数据集(金融代码为
AAPL
和路透金融工具代码
RIC
AAPL.O
)。
由于此类历史金融数据已存储在硬盘上的
CSV
文件中,因此可以使用纯
Python ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar
图解大模型 : 生成式AI 原理与实战

图解大模型 : 生成式AI 原理与实战

Jay Alammar, Maarten Grootendorst

Publisher Resources

ISBN: 9787519869694