楼主: 2023D
230 1

[其他] Modern C++ for Finance: Foundations for Quantitative Programming [推广有奖]

  • 0关注
  • 4粉丝

已卖:667份资源

院士

12%

还不是VIP/贵宾

-

威望
0
论坛币
88 个
通用积分
168.1502
学术水平
17 点
热心指数
31 点
信用等级
14 点
经验
44673 点
帖子
1769
精华
0
在线时间
1143 小时
注册时间
2022-12-1
最后登录
2025-12-30

楼主
2023D 发表于 2025-1-22 12:15:16 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Modern C++ for Finance: Foundations for Quantitative Programming

新加坡大学金融研究生学习资料
Modern C++ for MBAs and Masters of Finance Singapore Management University
(英文,可编辑的pdf电子文档)


Textbook:Learning Modern C++ for Finance: Foundations for Quantitative Programming
Author(s): Daniel Hanson

Description:
This practical coursebook demonstrates why C++ is still one of the dominant production-quality languages for financial applications and systems. Many programmers believe that C++ is too difficult to learn. Author Daniel Hanson demonstrates that this is no longer the case, thanks to modern features added to the C++ Standard beginning in 2011.
Financial programmers will discover how to leverage C++ abstractions that enable safe implementation of financial models. You'll also explore how popular open source libraries provide additional weapons for attacking mathematical problems. C++ programmers unfamiliar with financial applications also benefit from this handy guide.
• Learn C++ basics from a modern perspective: syntax, inheritance, polymorphism, composition, STL containers, and algorithms
• Dive into newer features and abstractions including functional programming using lambdas, task-based concurrency, and smart pointers
• Implement basic numerical routines in modern C++
• Understand best practices for writing clean and efficient code


•• Chapter 1, “An Overview of C++” provides an overview of C++, beginning with
a brief history of C++ in finance, and the shift toward modern C++, beginning with C++11. It also covers the separation of the core language and the C++ Standard Library, followed by key modern updates to the language that will be used throughout the remainder of the book, such as automatic type deduction, range-based for loops, scoped enumerations, and lambda expressions. It also includes coverage of basic mathematical features within the core language and the Standard Library. It concludes with a discussion about coding style and standards, and those that will be followed in this book.
•• Chapter 2, “Writing User-Defined Classes with Modern C++ Features” and Chapter 3, “Inheritance, Polymorphism, and Smart Pointers” are focused on object-oriented features in C++, and modern additions that have changed (and have helped improve) the methods once commonly employed in C++ for imple‐ menting composition and inheritance. Chapter 2 is primarily concerned with composition, namely the storage of a private data member that is itself an object, and how move semantics introduced in C++11 can make this more efficient by avoiding object copy at construction of the enclosing object. It also covers the new C++20 three-way operator (also called the spaceship operator), which greatly streamlines implementation of equality and inequality operators. Chapter 3 begins with modern features that better facilitate inheritance and

dynamic polymorphism. It then shifts back to composition, where the subobject member is now a pointer resource, and how smart pointers help eliminate the problems associated with raw pointers. Composition and inheritance are then tied together in a modern context where the resource is a smart pointer to a polymorphic object. Financial examples in both chapters are related to option pricing.
•• Chapter 4, “The Standard Template Library Part I: Containers and Iterators” and Chapter 5, “The Standard Template Library Part II: Algorithms and Ranges” cover what has traditionally been called the Standard Template Library (STL). This is a set of standard containers—including the vector container and oth‐ ers—plus iterators that allow you to traverse these containers, and algorithms that perform operations on elements in a container. STL containers and iterators are covered in Chapter 4, while the algorithms are covered in Chapter 5. Chap‐ ter 5 also contains a discussion of C++20 and C++23 extensions of algorithms in the more expressive form of ranges, and furthermore how ranges relate to range views and range adaptors. As you will see, these can be used in a functional programming context for composing a sequence of algorithms such that the performance overhead from copying data and generating temporary container objects can be avoided.
•• Chapter 6, “Random Number Generation and Concurrency” begins with a dis‐ cussion of random number generation from known probability distributions, another new Standard Library feature released in C++11. Standard normal ran‐ dom variates in particular are key to continuous-time financial models, while the random values from a Poisson distribution are often used in modeling tick data for testing live trading strategies. Two examples are presented. The first is the shuffle algorithm combined with a C++11 random engine to generated Monte Carlo scenarios of equity lines to measure the risk associated with the volatility of maximum drawdown in a trading strategy. The second is a Monte Carlo model for valuing European options with barriers, where random variates from a standard normal distribution are used in a discretized Brownian motion process. The chapter then changes focus to concurrency and parallelism, first with examples of parallel STL algorithms, introduced with C++17. These are mostly overloads of existing algorithms, but with an additional execution policy parameter, which means significant performance increases can be had by simply including an extra argument. The chapter concludes with a return to the Monte Carlo option pricing example, but using the Standard Library async(.) function and future class, which help facilitate generating each Monte Carlo scenario as a parallel task, again resulting in significant increases in the magnitude of speed for larger numbers of scenarios and time steps.

• Chapter 7, “Dates and Fixed Income Securities” introduces the new C++20 date functionality in the Standard Library, and how date functions and validations typically required for fixed income trading can be incorporated into code. Dis‐ cussion then proceeds to wrapping this functionality in a user-defined date class that can be used in the design of a yield curve class and a bond class, and how these can all be used together to price a coupon-paying bond. This includes coverage of potentially tedious but important details that are crucial for fixed income trading but are often left out of related textbooks and course syllabi.
•• Chapter 8, “Linear Algebra” is devoted to linear algebra in C++. A common technique used in C++ linear algebra library development is expression template programming, so a gentle introduction to this topic is provided before moving on to the open source, third-party C++ linear algebra library called Eigen. This will include applications to fund tracking (regression), valuing basket options (Cholesky decomposition), and yield curve dynamics (principle component decomposition). The chapter concludes with a look ahead to linear algebra capa‐ bilities in the C++ Standard Library, particularly the mdspan multidimensional array reference from C++23, and the standard interface based on the Basic Linear Algebra Subprograms (BLAS) slated for C++26.
•• Chapter 9, “The Boost Libraries” covers some of the peer-reviewed, open source Boost libraries. A fair amount of content from Boost has found its way into the C++ Standard over the years (in similar but not necessarily identical form), while other Boost libraries remain orthogonal to the Standard but can be applied to problems that arise in finance. In particular, the set of statistical distributions from the Boost Math Toolkit library provides the probability density function (PDF), cumulative distribution function (CDF), and percentile function for each of 34 “textbook” distributions. The Boost MultiArray library provides a generic multidimensional array that can be adapted for binomial (and trinomial) lattice option pricing models, and the Boost Accumulators library contains efficient incremental descriptive statistical computations on dynamic sets of data that are well suited for keeping track of performance metrics in trading backtests. Each of these is covered in the chapter.




Modern C++ for Finance_ Foundations for Quantitative Programming.pdf (3.81 MB, 需要: RMB 19 元)


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Quantitative QUANTITATIV Programming Foundations foundation

沙发
Kaka-2030(未真实交易用户) 发表于 2025-2-12 08:39:13
风好在找,

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2026-1-6 05:43