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算法交易
12
1
金融行业采用
Python
的一个主要障碍是,默认的
Python
版本
CPython
是一种解释
性的高级语言。通常,数字算法和金融算法是基于(嵌套的)循环结构来实现的,
尤其是财务算法。在编译时,像
C
C++
这样的低级语言在执行此类循环方面非
常快,
Python
基于解释而非编译,在这些任务上通常非常慢。最终,事实也证明,
对于许多现实世界中的金融应用场景,例如期权定价或风险管理,纯
Python
确实太
慢了。
1.1.1 Python
与伪代码
尽管
Python
从未专门针对科学界和金融界,但这些领域的许多人仍然喜欢它语法的
优美和简洁。近年来,在解释(金融)算法的同时提出一些伪代码作为实现其适当
技术实施的中间步骤通常被认为是一个好的传统。许多人觉得,有了
Python
,就不
再需要伪代码步骤。事实证明,大部分情况下确实如此。
例如,考虑几何布朗运动的欧拉离散化,如式(
1-1
)所示。
1-1:几何布朗运动的欧拉离散化
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

Python算法交易实战

Python算法交易实战

Posts & Telecom Press, Sebastien Donadio
数字化转型:企业破局的34 个锦囊

数字化转型:企业破局的34 个锦囊

Gary O’Brien, Xiao Guo, Mike Mason

Publisher Resources

ISBN: 9787519869694