Atjaunināt sīkdatņu piekrišanu

E-grāmata: C++ for Financial Mathematics

(King's College London, Strand, UK)
  • Formāts - PDF+DRM
  • Cena: 57,60 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Šī e-grāmata paredzēta tikai personīgai lietošanai. E-grāmatas nav iespējams atgriezt un nauda par iegādātajām e-grāmatām netiek atmaksāta.

DRM restrictions

  • Kopēšana (kopēt/ievietot):

    nav atļauts

  • Drukāšana:

    nav atļauts

  • Lietošana:

    Digitālo tiesību pārvaldība (Digital Rights Management (DRM))
    Izdevējs ir piegādājis šo grāmatu šifrētā veidā, kas nozīmē, ka jums ir jāinstalē bezmaksas programmatūra, lai to atbloķētu un lasītu. Lai lasītu šo e-grāmatu, jums ir jāizveido Adobe ID. Vairāk informācijas šeit. E-grāmatu var lasīt un lejupielādēt līdz 6 ierīcēm (vienam lietotājam ar vienu un to pašu Adobe ID).

    Nepieciešamā programmatūra
    Lai lasītu šo e-grāmatu mobilajā ierīcē (tālrunī vai planšetdatorā), jums būs jāinstalē šī bezmaksas lietotne: PocketBook Reader (iOS / Android)

    Lai lejupielādētu un lasītu šo e-grāmatu datorā vai Mac datorā, jums ir nepieciešamid Adobe Digital Editions (šī ir bezmaksas lietotne, kas īpaši izstrādāta e-grāmatām. Tā nav tas pats, kas Adobe Reader, kas, iespējams, jau ir jūsu datorā.)

    Jūs nevarat lasīt šo e-grāmatu, izmantojot Amazon Kindle.

If you know a little bit about financial mathematics but dont yet know a lot about programming, then C++ for Financial Mathematics is for you.

C++ is an essential skill for many jobs in quantitative finance, but learning it can be a daunting prospect. This book gathers together everything you need to know to price derivatives in C++ without unnecessary complexities or technicalities. It leads the reader step-by-step from programming novice to writing a sophisticated and flexible financial mathematics library. At every step, each new idea is motivated and illustrated with concrete financial examples.

As employers understand, there is more to programming than knowing a computer language. As well as covering the core language features of C++, this book teaches the skills needed to write truly high quality software. These include topics such as unit tests, debugging, design patterns and data structures.

The book teaches everything you need to know to solve realistic financial problems in C++. It can be used for self-study or as a textbook for an advanced undergraduate or masters level course.

Recenzijas

"OOP in C++ remains a difficult programming language and paradigm to learn and develop. There remains a shortage of high-quality, easy to follow texts in C++ for mathematical finance. Dr Armstrong has successfully produced a self-contained publication that begins with the basics and patiently guides the student to advanced object-oriented C++ programming in a quant finance setting. The writing style is very user-friendly and immediately reassures the reader, while numerous exercises allow solid progression. The authors extensive background in academia and as a practitioner is apparent throughout; the latter being a key accomplishment in setting the book apart from others. As a teacher of mathematical and computational finance, Armstrongs book will feature at the top of my list of recommended textbooks."

Dr. Riaz Ahmad, The Fitch Group and University College London (Departments of Mathematics and Computer Science)

Introduction xvii
1 Getting Started
1(16)
1.1 Installing your development environment
1(1)
1.1.1 For Windows
1(1)
1.1.2 For Unix
1(1)
1.1.3 For MacOS X
1(1)
1.2 Running an example program
2(1)
1.3 Compiling and running the code
3(5)
1.3.1 Compiling on Windows
4(2)
1.3.2 Compiling on Unix
6(2)
1.4 Understanding the example code
8(4)
1.5 Configuring the compiler
12(1)
1.6 Making decisions
13(1)
1.7 Exercises
14(1)
1.8 Summary
15(2)
2 Basic Data Types and Operators
17(20)
2.1 Memory terminology
17(1)
2.2 Basic data types
18(4)
2.2.1 Integers
18(2)
2.2.2 Floating point numbers
20(1)
2.2.3 Booleans
20(1)
2.2.4 Characters
20(2)
2.3 Casting
22(4)
2.4 Memory addresses
26(2)
2.5 Operators
28(7)
2.5.1 The sizeof operator
28(1)
2.5.2 Mathematical operations
28(1)
2.5.3 Comparison operators
29(1)
2.5.4 Logical operators
29(1)
2.5.5 Bitwise operators
29(1)
2.5.6 Combining operators
30(1)
2.5.7 Assignment operators
30(2)
2.5.8 If statements revisited
32(3)
2.6 Summary
35(2)
3 Functions
37(18)
3.1 The C++ function syntax
37(4)
3.2 Recursion
41(1)
3.3 Libraries
42(1)
3.4 Declaring and defining functions
42(2)
3.5 Functions that don't return a value
44(1)
3.6 Specifying default values
45(1)
3.7 Overloading functions
46(1)
3.8 Global and local variables
47(1)
3.9 Namespaces
48(4)
3.10 Summary
52(3)
4 Flow of Control
55(16)
4.1 While Loops
55(2)
4.2 Do-While Loops
57(1)
4.3 For Loops
58(2)
4.4 Break, Continue, Return
60(1)
4.5 Throw Statements
61(2)
4.6 Switch Statements
63(2)
4.7 Scope
65(1)
4.8 Flow of control in operators
65(4)
4.8.1 Short circuit evaluation
66(1)
4.8.2 The ternary operator
66(1)
4.8.3 The comma operator
67(2)
4.9 Summary
69(2)
5 Working with Multiple Files
71(14)
5.1 The project FMLib
71(1)
5.2 Header files
72(1)
5.3 Creating our project
73(4)
5.3.1 Creating the first header file
73(2)
5.3.2 Some code that uses the functions
75(1)
5.3.3 Write the definitions
76(1)
5.4 How header files work
77(4)
5.4.1 The meaning of include
77(1)
5.4.2 Pragma once
77(1)
5.4.3 Information hiding
78(2)
5.4.4 Inline
80(1)
5.5 A complete example
81(1)
5.6 Summary
82(3)
6 Unit Testing
85(12)
6.1 A testing framework for C++
86(1)
6.2 Macros
86(1)
6.3 The macros in testing.h
87(2)
6.3.1 The ASSERT macro
87(1)
6.3.2 The ASSERT_APPRDX_EQUAL macro
87(1)
6.3.3 The INFO macro
88(1)
6.3.4 The DEBUG_PRINT macro
88(1)
6.3.5 The TEST macro
89(1)
6.4 Using testing.h
89(2)
6.5 What have we gained?
91(1)
6.6 Testing normcdf
92(2)
6.7 Summary
94(3)
7 Using C++ Classes
97(26)
7.1 Vectors
97(3)
7.2 Pass by reference and const
100(4)
7.2.1 Pass by reference
101(1)
7.2.2 The const keyword
102(2)
7.2.3 Pass by reference without const
104(1)
7.3 Using of stream
104(2)
7.4 Working with string
106(1)
7.5 Building strings efficiently
107(1)
7.6 Writing a pie chart
108(9)
7.6.1 A web-based chart
109(2)
7.6.2 Create a header file
111(1)
7.6.3 Write a source file
112(1)
7.6.4 Enable testing in your files
112(1)
7.6.5 Write functions to generate the boiler plate
112(1)
7.6.6 Write a simple version of the chart data
113(1)
7.6.7 Write a test of what we've done so far
114(1)
7.6.8 Write the interesting code
114(1)
7.6.9 Testing the interesting code
115(1)
7.6.10 Wrap it all up into a single function
116(1)
7.7 The architecture of the World Wide Web
117(4)
7.8 Summary
121(2)
8 User-Defined Types
123(22)
8.1 Terminology
123(1)
8.2 Writing your own class
124(4)
8.2.1 Writing the declaration
124(2)
8.2.2 Using a class
126(1)
8.2.3 Passing objects between functions
127(1)
8.2.4 How have classes helped?
127(1)
8.3 Adding functions to classes
128(3)
8.3.1 Using const on member functions
130(1)
8.4 A financial example
131(3)
8.4.1 What have we gained?
133(1)
8.5 Recommendations on writing classes
134(1)
8.6 Encapsulation
135(3)
8.6.1 Implementing PieChart
137(1)
8.6.2 Using PieChart
137(1)
8.7 Constructors
138(3)
8.7.1 Writing a default constructor
139(1)
8.7.2 An alternative, and superior syntax
140(1)
8.8 Constructors with parameters
141(3)
8.9 Summary
144(1)
9 Monte Carlo Pricing in C++
145(14)
9.1 A function to simulate stock prices
146(5)
9.2 Writing a Monte Carlo pricer
151(3)
9.3 Generating random numbers for Monte Carlo
154(4)
9.4 Summary
158(1)
10 Interfaces
159(16)
10.1 An interface for pricing options
159(2)
10.2 Describing an interface in C++
161(3)
10.3 Examples of interfaces
164(2)
10.4 Interfaces in object-oriented programming
166(2)
10.5 What's wrong with if statements?
168(1)
10.6 An interface for integration
169(4)
10.7 Summary
173(2)
11 Arrays, Strings, and Pointers
175(30)
11.1 Arrays, the C alternative to vector
176(3)
11.2 Pointers
179(6)
11.2.1 New and Delete
179(1)
11.2.2 Pointer operators
180(2)
11.2.3 Looping with pointers
182(3)
11.2.4 Using pointers in practice
185(1)
11.3 Pointers to text
185(2)
11.4 Pass by pointer
187(2)
11.5 Don't return pointers to local variables
189(2)
11.6 Using pointers to share data
191(6)
11.6.1 Sharing with shared__ptr
194(3)
11.7 Sharing data with references
197(2)
11.8 The C++ memory model
199(5)
11.8.1 The stack
200(2)
11.8.2 The heap
202(2)
11.9 Summary
204(1)
12 More Sophisticated Classes
205(18)
12.1 Inlining member functions
205(1)
12.2 The this keyword
206(1)
12.3 Inheritance
207(3)
12.3.1 What have we gained?
209(1)
12.3.2 Terminology
209(1)
12.4 Overriding methods -- the virtual keyword
210(2)
12.4.1 A note on the keyword virtual
211(1)
12.5 Abstract functions =0
212(1)
12.6 Multiple layers
212(5)
12.6.1 UML
213(2)
12.6.2 Another object hierarchy
215(1)
12.6.3 Multiple inheritance
215(1)
12.6.4 Calling superclass methods
216(1)
12.7 Forward declarations and the structure of cpp files
217(1)
12.8 The static keyword
218(2)
12.9 The protected keyword
220(2)
12.10 Summary
222(1)
13 The Portfolio Class
223(10)
13.1 The Priceable interface
223(1)
13.2 The Portfolio interface and implementation
224(4)
13.2.1 Implementation of PortfolioImpl
227(1)
13.3 Testing
228(2)
13.4 UML
230(1)
13.5 Limitations
231(1)
13.6 Summary
232(1)
14 Delta Hedging
233(12)
14.1 Discrete-time delta hedging
233(2)
14.2 Implementing the delta hedging strategy in C++
235(6)
14.2.1 Class declaration
235(2)
14.2.2 Implementation of runSimulation
237(1)
14.2.3 Implementing the other methods of HedgingSimulator
238(2)
14.2.4 Changes to CallOption
240(1)
14.3 Testing the simulation
241(1)
14.4 Interpreting and extending our simulation
241(3)
14.5 Summary
244(1)
15 Debugging and Development Tools
245(22)
15.1 Debugging strategies
245(3)
15.1.1 Unit tests
245(1)
15.1.2 Reading your code
246(1)
15.1.3 Logging statements
246(1)
15.1.4 Using a debugger
247(1)
15.1.5 Divide and conquer
247(1)
15.2 Debugging with Visual Studio
248(4)
15.2.1 Obtaining a stack trace in Visual Studio
248(2)
15.2.2 Breakpoints and single stepping in Visual Studio
250(2)
15.3 Debugging with GDB
252(6)
15.3.1 Using GDB to obtain a stack trace
253(3)
15.3.2 Breakpoints and single stepping with GDB
256(1)
15.3.3 Other commands and features
257(1)
15.4 Other development tools and practices
258(6)
15.4.1 Version control
258(1)
15.4.2 Bug tracking
259(1)
15.4.3 Testing framework
259(1)
15.4.4 Automated build
260(1)
15.4.5 Continuous integration
261(1)
15.4.6 Logging
261(1)
15.4.7 Static analysis
261(1)
15.4.8 Memory-leak detection
262(1)
15.4.9 Profiling tools
262(1)
15.4.10 Example
263(1)
15.5 Summary
264(3)
16 A Matrix Class
267(28)
16.1 Basic functionality of Matrix
267(2)
16.2 The constructor and destructor of Matrix
269(5)
16.2.1 Virtual destructors
271(1)
16.2.2 When is a destructor needed?
272(1)
16.2.3 Additional constructors
273(1)
16.3 Const pointers
274(1)
16.4 Operator overloading
275(7)
16.4.1 Overloading +
275(2)
16.4.2 Overloading other arithmetic operators
277(1)
16.4.3 Overloading comparison operators
278(1)
16.4.4 Overloading the << operator
279(1)
16.4.4.1 Remarks on return by reference
280(1)
16.4.5 Overloading the () operator
280(1)
16.4.6 Overloading +=
281(1)
16.5 The rule of three
282(3)
16.5.1 Overriding the assignment operator
282(1)
16.5.2 Writing a copy constructor
283(1)
16.5.3 The easy way to abide by the rule of three
284(1)
16.5.4 Move operators
285(1)
16.6 Completing the Matrix class
285(1)
16.7 Array Programming
286(6)
16.7.1 Implementing an efficient matrix class
286(1)
16.7.2 Array programming
287(1)
16.7.3 Array programming in the option classes
288(1)
16.7.4 Array programming for the BlackScholesModel
289(1)
16.7.5 Array programming the Monte Carlo pricer
290(1)
16.7.6 Performance
290(2)
16.8 Summary
292(3)
17 An Overview of Templates
295(8)
17.1 Template functions
295(2)
17.2 Template classes
297(2)
17.3 Templates as an alternative to interfaces
299(3)
17.4 Summary
302(1)
18 The Standard Template Library
303(26)
18.1 Typedef
304(2)
18.2 Auto
306(1)
18.3 Using iterators with vectors
307(2)
18.4 For Loops and Containers
309(1)
18.5 The container set
310(1)
18.6 The container vector
311(1)
18.7 The container list
312(3)
18.8 The container initializer_list
315(1)
18.9 The containers map and unordered_map
315(5)
18.9.1 How a map works
317(1)
18.9.2 How an unordered_map works
318(2)
18.10 Storing complex types in containers
320(1)
18.11 A mathematical model for multiple stocks
320(2)
18.12 Using the Standard Template Library in FMLib
322(5)
18.13 Summary
327(2)
19 Function Objects and Lambda Functions
329(8)
19.1 Function objects
329(1)
19.2 Lambda functions
330(3)
19.3 Function pointers
333(1)
19.4 Sorting with lambda functions
334(2)
19.5 Summary
336(1)
20 Threads
337(22)
20.1 Concurrent programming in C++
338(8)
20.1.1 Creating threads
338(1)
20.1.2 Mutual exclusion
339(3)
20.1.3 Global variables and race conditions
342(1)
20.1.4 Problems with locking
343(3)
20.2 The command design pattern
346(1)
20.3 Monte Carlo pricing
347(5)
20.3.1 Random number generation with multiple threads
348(1)
20.3.2 A multi-threaded pricer
349(1)
20.3.3 Implementing Task
350(1)
20.3.4 Using the Executor
351(1)
20.3.5 Remarks upon the design
351(1)
20.4 Coordinating threads
352(6)
20.4.1 The Pipeline pattern
352(3)
20.4.2 How Pipeline is implemented
355(3)
20.5 Summary
358(1)
21 Next Steps
359(4)
21.1 Programming
359(2)
21.1.1 Libraries
359(1)
21.1.2 Software development
359(1)
21.1.3 C++ language features
360(1)
21.1.4 Other languages
360(1)
21.2 Financial mathematics
361(2)
A Risk-Neutral Pricing
363(20)
A.1 The players in financial markets
363(3)
A.2 Derivatives contracts
366(4)
A.3 Risk-neutral pricing
370(2)
A.4 Modelling stock prices
372(5)
A.5 Monte Carlo pricing
377(2)
A.6 Hedging
379(3)
A.7 Summary
382(1)
Bibliography 383(2)
Index 385
John Armstrong is a Lecturer in financial mathematics, probability and statistics at Kings College London. He has 15 years experience in the financial industry working as a software architect. He co-founded Yolus and designed their innovative risk management system which was adopted by numerous major banks. He has also worked for ION Trading, Dresdner Kleinwort Wasserstein and was an executive director at Goldman Sachs.