构建 QuantLib
构建 QuantLib
深度探索量化金融 C++ 源代码
关于本书
本书是 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 人。
书籍目录
- 声明
-
译后记
- 初心
- 收获
- 彩蛋
- 鸣谢
- 译序
- 1 导论
-
2 金融工具与定价引擎
-
2.1
Instrument
类- 2.1.1 接口与需求
- 2.1.2 实现
- 2.1.3 示例:利率互换
- 2.1.4 未来的发展
-
2.2 定价引擎
- 2.2.1 示例:普通香草期权
-
2.1
-
3 期限结构
-
3.1
TermStructure
类- 3.1.1 接口与需求
- 3.1.2 实现
-
3.2 利率期限结构
- 3.2.1 接口与实现
- 3.2.2 贴现因子、远期利率和零息利率曲线
- 3.2.3 示例:bootstrap 一个插值曲线
- 3.2.4 示例:向利率曲线添加 z-spread
-
3.3 其他期限结构
- 3.3.1 违约概率期限结构
- 3.3.2 通胀期限结构
- 3.3.3 波动率期限结构
- 3.3.4 股票波动率期限结构
- 3.3.5 利率波动率期限结构
-
3.1
-
4 现金流与票息
-
4.1
CashFlow
类 -
4.2 票息
- 4.2.1 固定利率票息
- 4.2.2 浮动利率票息
- 4.2.3 示例:LIBOR 票息
- 4.2.4 示例:有 cap/floor 的票息
- 4.2.5 产生现金流序列
- 4.2.6 其他票息和将来的开发
-
4.3 现金流分析
- 4.3.1 示例:固息债
-
4.1
-
5 参数模型与校准
-
5.1
CalibrationHelper
类- 5.1.1 示例:Heston 模型
- 5.2 参数
-
5.3
CalibratedModel
类- 5.3.1 示例:Heston 模型(续)
-
5.1
-
6 蒙特卡罗框架
-
6.1 路径生成
- 6.1.1 随机数生成
- 6.1.2 随机过程
- 6.1.3 随机路径生成器
- 6.2 在路径上定价
-
6.3 整合
- 6.3.1 蒙特卡罗特性
- 6.3.2 蒙特卡罗模型
- 6.3.3 蒙特卡罗模拟
- 6.3.4 示例:一篮子期权
-
6.1 路径生成
-
7 树框架
-
7.1
Lattice
和DiscretizedAsset
类- 7.1.1 示例:离散债券
- 7.1.2 示例:离散期权
-
7.2 树和基于树的网格
-
7.2.1
Tree
类模板 - 7.2.2 二叉树和三叉树
-
7.2.3
TreeLattice
类模板
-
7.2.1
-
7.3 基于树的定价引擎
- 7.3.1 示例:可赎回固息债
-
7.1
-
8 有限差分框架
-
8.1 旧框架
- 8.1.1 微分算子
- 8.1.2 演化格式
- 8.1.3 边界条件
- 8.1.4 步骤条件
-
8.1.5
FiniteDifferenceModel
类 - 8.1.6 示例:美式期权
- 8.1.7 时间依赖算子
-
8.2 新框架
- 8.2.1 网格器
- 8.2.2 算子
- 8.2.3 示例:Black-Scholes 算子
- 8.2.4 初始、边界和步骤条件
- 8.2.5 格式和求解器
-
8.1 旧框架
- 9 完结
-
附录 A:零碎的知识
- 基本类型
-
日期计算
- 日期与周期
- 日历
- 天数计算规则
- 时间表
-
金融相关类
- 市场报价
- 利率
- 指数
- 行权与支付
-
数学相关类
- 插值
- 一维求解器
- 优化器
- 统计
- 线性代数
- 全局配置
-
实用工具
- 智能指针与句柄
- 错误报告
-
Disposable
对象
-
设计模式
- 观察者模式
- 单体模式
- 访问者模式
- 附录 B:编码约定
- QuantLib license
- 参考文献
- 備註
Leanpub 无条件、无风险的 100% 保证满意
從付款之後的 60 天內,只要點個兩下,你就可以完成退書並且取回先前支付的全數金額。退書是採用人工作業,因此可能需要花幾天的時間才能完成整個程序。
See full terms.
80% Royalties. Earn $16 on a $20 book.
We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned$12,307,240writing, 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), EPUB (for phones and tablets) and MOBI (for 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
Top Books
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Personal Finance
Jason AndersonThis textbook provides an in-depth analysis on personal finance that is both practical and straightforward in its approach. It has been written in such a way that the readers can gain knowledge without getting overwhelmed by the technical terms. Suitable for both beginners and advanced learners.
Getting to Know IntelliJ IDEA
Trisha Gee and Helen ScottIf we treat our IDE as a text editor, we are doing ourselves a disservice. Using a combination of tutorials and a questions-and-answers approach, Getting to Know IntelliJ IDEA will help you find ways to use IntelliJ IDEA that enable you to work comfortably and productively as a professional developer.
C++20 - The Complete Guide
Nicolai M. JosuttisAll new language and library features of C++20 (for those who know previous C++ versions).
The book presents all new language and library features of C++20. Learn how this impacts day-to-day programming, to benefit in practice, to combine new features, and to avoid all new traps.
Buy early, pay less, free updates.
Other books:
Mastering STM32 - Second Edition
Carmine NovielloWith more than 1200 microcontrollers, STM32 is probably the most complete ARM Cortex-M platform on the market. This book aims to be the most complete guide around introducing the reader to this exciting MCU portfolio from ST Microelectronics and its official CubeHAL and STM32CubeIDE development environment.
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
Machine Learning Q and AI
Sebastian Raschka, PhDHave you recently completed a machine learning or deep learning course and wondered what to learn next? With 30 questions and answers on key concepts in machine learning and AI, this book provides bite-sized bits of knowledge for your journey to becoming a machine learning expert.
Stats One
William FooteThe Rails 7 Way
Obie Fernandez, Lucas Dohmen, and Tom Henrik AadlandThe Rails™ 7 Way is the comprehensive, authoritative reference guide for professionals delivering production-quality code using modern Ruby on Rails. It illuminates the entire Rails 7 API, its most powerful idioms, design approaches, and libraries. Building on the previous editions, this edition has been heavily refactored and updated.
Gradual Modularization for Ruby and Rails
Stephan HagemannGet yourself a new tool to manage your Rails application and your growing engineering organization! Prevent the ball-of-mud (and fix it!). Go for microservices or SOA if it makes sense not just because you don't have any other tool. Do all this through a low-overhead tool: packages. Enable better conversations to make practical changes today.
Top Bundles
- #1
Software Architecture
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #3
1500 QUIZ COMMENTATI (3 libri)
3 Books
Tre libri dei QUIZ MMG Commentati al prezzo di DUE! I QUIZ dei concorsi ufficiali di Medicina Generale relativi agli anni: 2000-2001-2003-2012-2013-2014-2015-2016-2017-2018-2019-2020-2021 +100 inediti Raccolti in unico bundle per aiutarvi nello studio e nella preparazione al concorso. All'interno di ogni libro i quiz sono stati suddivisi per... - #4
Pattern-Oriented Memory Forensics and Malware Detection
2 Books
This training bundle for security engineers and researchers, malware and memory forensics analysts includes two accelerated training courses for Windows memory dump analysis using WinDbg. It is also useful for technical support and escalation engineers who analyze memory dumps from complex software environments and need to check for possible... - #5
Practical FP in Scala + Functional event-driven architecture
2 Books
Practical FP in Scala (A hands-on approach) & Functional event-driven architecture, aka FEDA, (Powered by Scala 3), together as a bundle! The content of PFP in Scala is a requirement to understand FEDA so why not take advantage of this bundle!? - #6
Modern C++ Collection
3 Books
Get All about Modern C++C++ Standard Library, including C++20Concurrency with Modern C++, including C++20C++20Each book has about 200 complete code examples. Updates are included. When I update one of the books, you immediately get the updated bundle. You can expect significant updates to each new C++ standard (C++23, C++26, .. ) and also... - #7
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité... - #9
Development and Deployment of Multiplayer Online Games, Part ARCH. Architecture (Vol. I-III)
3 Books
What's the Big Idea? The idea behind this book is to summarize the body of knowledge that already exists on multiplayer games but is not available in one single place.And quite a fewof the issues discussed within this series (planned as three nine volumes ~300 pages each), while known in the industry, have not been published at all (except for... - #10
Growing Agile: The Complete Coach's Guide
7 Books
Growing Agile: Coach's Guide Series This bundle provides a collection of training and workshop plans for a variety of agile topics. The series is aimed at agile coaches, trainers and ScrumMasters who often find themselves needing to help teams understand agile concepts. Each book in the series provides the plans, slides, handouts and activity...