Leanpub Header

Skip to main content

构建 QuantLib

深度探索量化金融 C++ 源代码

本书是 QuantLib 项目的核心开发者对 QuantLib 整体架构和设计理念的详尽阐述。

This book is a translation into Chinese (Simplified) of Implementing QuantLib which was originally written in English

Minimum price

$7.99

$29.99

You pay

$29.99

Authors earn

$23.99
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
PDF
EPUB
262
Readers
282
Pages
About

About

About the Book

本书是 Luigi Ballabio 所著《Implementing QuantLib》的中译本。

QuantLib 作为量化金融领域一个具有持久生命力的开源项目,无论是在业界还是学界都有着广泛的应用和影响力。正如项目的核心开发者 Luigi 所言,随着代码和用户数量的增长,缺乏文档说明的弊端开始显现。Luigi 正是为了解决这一问题而撰写了《Implementing QuantLib》一书。

本书详细阐述了 QuantLib 中几大最主要模块的宏观设计思路,以及某些核心功能的具体实现,同时谦逊地指出了当前实现中存在的一些缺陷和问题。通过阅读本书,你可以了解到 QuantLib 如何自上而下地模拟各种金融工具的行为,如何建模特定的金融概念(例如现金流和期限结构),如何为解决各类常见的金融工程计算问题(例如随机模拟、参数校准和有限差分)提供统一的框架,等等。需要注意的是,与《Numerical Recipes in C++》和《Monte Carlo Frameworks》等书不同,本书不会教授你如何使用 C++ 编写数值计算程序,也不涉及 QuantLib 的具体使用案例。

适合阅读本书的读者:

  • 金融科技领域的软件工程师。无论你想要基于 QuantLib 做二次开发,或是单纯为 C++ 代码编写其他语言的接口,对项目中存在的若干主要模块、上千个类,以及当前实现中隐藏的某些缺陷有一个整体的把握显然是很有必要的。如果你要独立开发相似的算法库,QuantLib 的架构理念、具体算法实现,甚至是经验教训都能带来极大的帮助和启发。
  • 想为 QuantLib 贡献代码的专业人士。阅读本书能帮助你深入理解自己感兴趣的模块,更好地把自己的想法融入到 QuantLib 的框架之中,进而编写出有“QuantLib 风味”的代码。
  • 金融工程等相关专业的教师和学生。如果厌倦了讲义里脱离现实的 toy code,想见识一下书本外的广阔天地,恭喜你来对地方了。QuantLib 的源代码是一本立足现实的活教材,强烈建议你在阅读源代码的同时浏览本书的相关章节,否则会只见树木不见树林。
  • 任何想要了解 QuantLib 人。

Share this book

This book is a translation into Chinese (Simplified) of Implementing QuantLib which was originally written in English

Author

About the Authors

Luigi Ballabio

The co-founder and current maintainer of the open-source QuantLib project. Also husband, father of four, ex-physicist, and amateur musician.

Subscribe to Luigi's newsletter at https://implementingquantlib.substack.com for more QuantLib-related content.

Ruilong Xu

来自中国的量化分析师(Quant),主要研究领域包括:时间序列分析、宏观计量、金融工程计算方法等,擅长使用 R 与 Python(更偏爱 R),喜爱阅读、翻译、编码与写作。

  • 我的博客:https://www.cnblogs.com/xuruilong100/
  • 我的微信:xuruilong100

Contents

Table of Contents

声明

译后记

  1. 初心
  2. 收获
  3. 彩蛋
  4. 鸣谢

译序

1导论

2金融工具与定价引擎

  1. 2.1Instrument
  2. 2.1.1接口与需求
  3. 2.1.2实现
  4. 题外话:常量还是非常量?
  5. 2.1.3示例:利率互换
  6. 题外话:句柄还是共享指针。
  7. 2.1.4未来的发展
  8. 2.2定价引擎
  9. 题外话:非纯虚方法。
  10. 2.2.1示例:普通香草期权

3期限结构

  1. 3.1TermStructure
  2. 3.1.1接口与需求
  3. 3.1.2实现
  4. 题外话:估值日期的把戏。
  5. 3.2利率期限结构
  6. 3.2.1接口与实现
  7. 3.2.2贴现因子、远期利率和零息利率曲线
  8. 题外话:打破对称。
  9. 题外话:双生子类。
  10. 3.2.3示例:bootstrap 一个插值曲线
  11. 题外话:友元。
  12. 3.2.4示例:向利率曲线添加 z-spread
  13. 3.3其他期限结构
  14. 3.3.1违约概率期限结构
  15. 题外话:灰姑娘方法。
  16. 3.3.2通胀期限结构
  17. 3.3.3波动率期限结构
  18. 3.3.4股票波动率期限结构
  19. 题外话:插值与外推。
  20. 3.3.5利率波动率期限结构

4现金流与票息

  1. 4.1CashFlow
  2. 题外话:推迟付息。
  3. 4.2票息
  4. 4.2.1固定利率票息
  5. 4.2.2浮动利率票息
  6. 题外话:保持平衡。
  7. 4.2.3示例:LIBOR 票息
  8. 题外话:合约到期。
  9. 4.2.4示例:有 cap/floor 的票息
  10. 4.2.5产生现金流序列
  11. 4.2.6其他票息和将来的开发
  12. 4.3现金流分析
  13. 4.3.1示例:固息债

5参数模型与校准

  1. 5.1CalibrationHelper
  2. 5.1.1示例:Heston 模型
  3. 题外话:打破假设。
  4. 5.2参数
  5. 5.3CalibratedModel
  6. 5.3.1示例:Heston 模型(续)

6蒙特卡罗框架

  1. 6.1路径生成
  2. 6.1.1随机数生成
  3. 题外话:更好走的路。
  4. 6.1.2随机过程
  5. 6.1.3随机路径生成器
  6. 题外话:访问模式。
  7. 题外话:糟心事。
  8. 6.2在路径上定价
  9. 6.3整合
  10. 6.3.1蒙特卡罗特性
  11. 6.3.2蒙特卡罗模型
  12. 6.3.3蒙特卡罗模拟
  13. 题外话:协同。
  14. 6.3.4示例:一篮子期权
  15. 题外话:基础须知。

7树框架

  1. 7.1LatticeDiscretizedAsset
  2. 7.1.1示例:离散债券
  3. 7.1.2示例:离散期权
  4. 7.2树和基于树的网格
  5. 7.2.1Tree 类模板
  6. 题外话:越来越奇异了。112
  7. 7.2.2二叉树和三叉树
  8. 7.2.3TreeLattice 类模板
  9. 7.3基于树的定价引擎
  10. 7.3.1示例:可赎回固息债

8有限差分框架

  1. 8.1旧框架
  2. 8.1.1微分算子
  3. 8.1.2演化格式
  4. 8.1.3边界条件
  5. 8.1.4步骤条件
  6. 题外话:看,老妈,大撒把!130
  7. 8.1.5FiniteDifferenceModel
  8. 8.1.6示例:美式期权
  9. 8.1.7时间依赖算子
  10. 8.2新框架
  11. 8.2.1网格器
  12. 8.2.2算子
  13. 8.2.3示例:Black-Scholes 算子
  14. 8.2.4初始、边界和步骤条件
  15. 题外话:消除魔法。
  16. 8.2.5格式和求解器

9完结

附录 A:零碎的知识

  1. 基本类型
  2. 日期计算
  3. 日期与周期
  4. 日历
  5. 天数计算规则
  6. 时间表
  7. 金融相关类
  8. 市场报价
  9. 利率
  10. 指数
  11. 题外话:多大程度的泛化?
  12. 行权与支付
  13. 数学相关类
  14. 插值
  15. 题外话:戈尔迪之结。173
  16. 一维求解器
  17. 优化器
  18. 统计
  19. 题外话:极端期望。
  20. 线性代数
  21. 全局配置
  22. 题外话:比 B 级片更多的变化。181
  23. 实用工具
  24. 智能指针与句柄
  25. 题外话:指针语义学。
  26. 错误报告
  27. Disposable 对象
  28. 设计模式
  29. 观察者模式
  30. 单体模式
  31. 访问者模式

附录 B:编码约定

QuantLib license

参考文献

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub