codefinance.training

Coding for Finance

An Introduction to Excel VBA Programming: with Applications in Finance and Insurance

Excel Visual Basic for Applications (VBA) can be used to automate operations in Excel and is one of the most frequently used software programs for manipulating data and building models in banks and insurance companies. An Introduction to Excel VBA Programming: with Applications in Finance and Insurance introduces readers to the basic fundamentals of VBA Programming while demonstrating applications of VBA to solve real-world problems in finance and insurance. Assuming no prior programming experience and with reproducible examples using code and data, this text is suitable for advanced undergraduate students, graduate students, actuaries, and financial analysts who wish to learn VBA.

Features:

  • Presents the theory behind the algorithms in detail
  • Includes more than 100 exercises with selected solutions
  • Provides VBA code in Excel files and data to reproduce the results in the book
  • Offers a solutions manual for qualified instructors

Practical C++20 Financial Programming

Apply C++ to programming problems in the financial industry using this hands-on book, updated for C++20. It explains those aspects of the language that are more frequently used in writing financial software, including the Standard Template Library (STL), templates, and various numerical libraries. Practical C++20 Financial Programming also describes many of the important problems in financial engineering that are part of the day-to-day work of financial programmers in large investment banks and hedge funds. The author has extensive experience in the New York City financial industry that is now distilled into this handy guide.

Focus is on providing working solutions for common programming problems. Examples are plentiful and provide value in the form of ready-to-use solutions that you can immediately apply in your day-to-day work. You’ll see examples of matrix manipulations, curve fitting, histogram generation, numerical integration, and differential equation analysis, and you’ll learn how all these techniques can be applied to some of the most common areas of financial software development.

These areas include performance price forecasting, optimizing investment portfolios, and more. The book style is quick and to-the-point, delivering a refreshing view of what one needs to master in order to thrive as a C++ programmer in the financial industry.

What You Will Learn

  • Cover aspects of C++ especially relevant to financial programming
  • Write working solutions to commonly encountered problems in finance
  • Design efficient, numerical classes for use in finance, as well as to use those classes provided by Boost and other libraries

Who This Book Is For

Those who are new to programming for financial applications using C++, but should have some previous experience with C++.

Rust For Rustaceans: Idiomatic Programming for Experienced Developers

For developers who’ve mastered the basics, this book is the next step on your way to professional-level programming in Rust. It covers everything you need to build and maintain larger code bases, write powerful and flexible applications and libraries, and confidently expand the scope and complexity of your projects.

Author Jon Gjengset takes you deep into the Rust programming language, dissecting core topics like ownership, traits, concurrency, and unsafe code. You’ll explore key concepts like type layout and trait coherence, delve into the inner workings of concurrent programming and asynchrony with async/await, and take a tour of the world of no_std programming. Gjengset also provides expert guidance on API design, testing strategies, and error handling, and will help develop your understanding of foreign function interfaces, object safety, procedural macros, and much more.

You’ll Learn:

  • How to design reliable, idiomatic, and ergonomic Rust programs based on best principles
  • Effective use of declarative and procedural macros, and the difference between them
  • How asynchrony works in Rust – all the way from the Pin and Waker types used in manual implementations of Futures, to how async/await saves you from thinking about most of those words
  • What it means for code to be unsafe, and best practices for writing and interacting with unsafe functions and traits
  • How to organize and configure more complex Rust projects so that they integrate nicely with the rest of the ecosystem
  • How to write Rust code that can interoperate with non-Rust libraries and systems, or run in constrained and embedded environments

Brimming with practical, pragmatic insights that you can immediately apply, Rust for Rustaceans helps you do more with Rust, while also teaching you its underlying mechanisms.

Rust in Action

Rust is a new systems programming language that gives you the low-level power of C with the elegance and ease of languages like Ruby and Python. Rust is thread safe, enabling “fearless concurrency”.

Rust in Action introduces the Rust programming language by exploring numerous systems programming concepts and techniques. You’ll be learning Rust by delving into how computers work under the hood.

You’ll find yourself playing with persistent storage, memory, networking and even tinkering with CPU instructions. The book takes you through using Rust to extend other applications and teaches you tricks to write blindingly fast code. You’ll also discover parallel and concurrent programming.

  • Concurrent and parallel programming
  • Sharing resources with locks or atomic operations
  • Avoiding programming with global state
  • Message passing inside your applications
  • Memory management and garbage collection

Readers need intermediate programming skills and familiarity with general computer science concepts, the command line, and networking.

Programming Rust: Fast, Safe Systems Development

Systems programming provides the foundation for the world’s computation. Developing performance-sensitive code requires a programming language that puts programmers in control of how memory, processor time, and other system resources are used. The Rust systems programming language combines that control with a modern type system that catches broad classes of common mistakes, from memory management errors to interthread data races. With this practical guide, experienced systems programmers will learn how to successfully bridge the gap between performance and safety using Rust. Jim Blandy, Jason Orendorff, and Leonora Tindall demonstrate how Rust’s features put programmers in control over memory consumption and processor use by combining predictable performance with memory safety and trustworthy concurrency. You’ll learn: Rust’s fundamental data types and the core concepts of ownership and borrowing Language basics including error handling, crates and modules, structs, and enums How to write flexible, efficient code with traits and generics Rust’s key power tools: closures, iterators, and asynchronous programming Collections, strings and text, input and output, concurrency, macros, unsafe code, and interfacing with foreign functions This updated edition covers Rust 1.50

Quantitative Trading – 2nd Ed.

Master the lucrative discipline of quantitative trading with this insightful handbook from a master in the field

In the newly revised Second Edition of Quantitative Trading: How to Build Your Own Algorithmic Trading Business, quant trading expert Dr. Ernest P. Chan shows you how to apply both time-tested and novel quantitative trading strategies to develop or improve your own trading firm.

You’ll discover new case studies and updated information on the application of cutting-edge machine learning investment techniques, as well as:

  • Updated back tests on a variety of trading strategies, with included Python and R code examples
  • A new technique on optimizing parameters with changing market regimes using machine learning.
  • A guide to selecting the best traders and advisors to manage your money

Perfect for independent retail traders seeking to start their own quantitative trading business, or investors looking to invest in such traders, this new edition of Quantitative Trading will also earn a place in the libraries of individual investors interested in exploring a career at a major financial institution.

Strategic Asset Allocation in Fixed Income Markets

  • Enables readers to implement financial and econometric models in Matlab
  • All central concepts and theories are illustrated by Matlab implementations which are accompanied by detailed descriptions of the programming steps needed
  • All concepts and techniques are introduced from a basic level
  • Chapter 1 introduces Matlab and matrix algebra, it serves to make the reader familiar with the use and basic capabilities if Matlab. The chapter concludes with a walkthrough of a linear regression model, showing how Matlab can be used to solve an example problem analytically and by the use of optimization and simulation techniques
  • Chapter 2 introduces expected return and risk as central concepts in finance theory using fixed income instruments as examples, the chapter illustrates how risk measures such as standard deviation, Modified duration, VaR, and expected shortfall can be calculated empirically and in closed form
  • Chapter 3 introduces the concept of diversification and illustrates how the efficient investment frontier can be derived – a Matlab is developed that can be used to calculate a given number of portfolios that lie on an efficient frontier, the chapter also introduces the CAPM
  • Chapter 4 introduces econometric tools: principle component analysis is presented and used as a prelude to yield-curve factor models. The Nelson-Siegel model is used to introduce the Kalman-Filter as a way to add time-series dynamics to the evolution of yield curves over time, time series models such as Vector Autoregression and regime-switching are also presented
  • Supported by a website with online resources – www.kennyholm.com where all Matlab programs referred to in the text can be downloaded. The site also contains lecture slides and answers to end of chapter exercises

“An extremely useful book for anyone interested in actually applying MATLAB based computational techniques to fixed-income problems. Theoretically sound and practically useful: a rare combination. I decided to buy MATLAB after reading it.”
—Dr Riccardo Rebonato, Global Head of Market Risk and Quant Analytics, RBS

“This book is a wonderfully practical ‘how to’ guide for bond market empirics implemented in MATLAB, with particular strength in dynamic yield curve models. It will interest students and practitioners alike.”
—Francis X. Diebold,Joseph M.Cohen Professor of Economics, Finance and Statistics, and Co-Director of the Wharton Financial Institutions Center, University of Pennsylvania

Java Methods for Financial Engineering

This book describes the principles of model building in financial engineering. It explains those models as designs and working implementations for Java-based applications. The book provides software professionals with an accessible source of numerical methods or ready-to-use code for use in business applications. It is the first book to cover the topic of Java implementations for finance/investment applications and is written specifically to be accessible to software practitioners without prior accountancy/finance training. The book develops a series of packaged classes explained and designed to allow the financial engineer complete flexibility.

The book is structured around the main theories and models used by practitioners to engineer finance and investment tools. The methods developed and implemented in the text are organized as chapters which cover the core areas. Each chapter is largely self-contained, thus the practitioner or student can conveniently focus on a defined tool and have immediate access to an implemented solution. Those engaged in the design and evaluation of new products will find the quick access to a wide range of robust core methods invaluable in constructing bespoke implementations.

With the pervasiveness and rapid pace of advancement in Web based technologies, it is now a given that any commercially useful computational tool is able to make an effective and efficient use of Web based platforms. Java is the language of choice for developing highly efficient Web based applications. All of the methods in this book are written in Java and use is made of the fully optimised Java Collections for data manipulation. For practitioners and students alike who are still working with legacy C++ or Visual Basic implementations, this book will serve as an excellent reference for translating or porting their applications into a Web centric environment

Hands-On Reactive Programming with Clojure

Key Features

  • Leverage the features of Functional Reactive Programming using Clojure
  • Create dataflow-based systems that are the building blocks of Reactive Programming
  • Use different Functional Reactive Programming frameworks, techniques, and patterns to solve real-world problems

Book Description

Reactive Programming is central to many concurrent systems, and can help make the process of developing highly concurrent, event-driven, and asynchronous applications simpler and less error-prone.

This book will allow you to explore Reactive Programming in Clojure 1.9 and help you get to grips with some of its new features such as transducers, reader conditionals, additional string functions, direct linking, and socket servers. Hands-On Reactive Programming with Clojure starts by introducing you to Functional Reactive Programming (FRP) and its formulations, as well as showing you how it inspired Compositional Event Systems (CES). It then guides you in understanding Reactive Programming as well as learning how to develop your ability to work with time-varying values thanks to examples of reactive applications implemented in different frameworks. You’ll also gain insight into some interesting Reactive design patterns such as the simple component, circuit breaker, request-response, and multiple-master replication. Finally, the book introduces microservices-based architecture in Clojure and closes with examples of unit testing frameworks.

By the end of the book, you will have gained all the knowledge you need to create applications using different Reactive Programming approaches.

What you will learn

  • Understand how to think in terms of time-varying values and event streams
  • Create, compose, and transform observable sequences using Reactive extensions
  • Build a CES framework from scratch using core.async as its foundation
  • Develop a simple ClojureScript game using Reagi
  • Integrate Om and RxJS in a web application
  • Implement a reactive API in Amazon Web Services (AWS)
  • Discover helpful approaches to backpressure and error handling
  • Get to grips with futures and their applications

Who this book is for

If you’re interested in using Reactive Programming to build asynchronous and concurrent applications, this is the book for you. Basic knowledge of Clojure programming is necessary to understand the concepts covered in this book.

Table of Contents

  1. What is Reactive Programming?
  2. A Look at Reactive Extensions
  3. Asynchronous Programming and Networking
  4. Introduction to core.async
  5. Creating Your Own CES Framework with core.async
  6. Building a simple Clojurescript game with Javelin/Reagi
  7. The UI as a Function
  8. Futures
  9. A Reactive API to Amazon Web Services
  10. Reactive Microservices
  11. Testing Reactive Apps
  12. Concurrency Utilities in Clojure
  13. Appendix: The Algebra of Library Design

Programming Clojure

Drowning in unnecessary complexity, unmanaged state, and tangles of spaghetti code?

In the best tradition of Lisp, Clojure gets out of your way so you can focus on expressing simple solutions to hard problems. Clojure cuts through complexity by providing a set of composable tools–immutable data, functions, macros, and the interactive REPL.

Written by members of the Clojure core team, this book is the essential, definitive guide to Clojure and this new edition includes information on all the newest features of Clojure, such as transducers and specs. Clojure joins the flexibility and agility of Lisp with the reach, stability, and performance of Java.

Combine Clojure’s tools for maximum effectiveness as you work with immutable data, functional programming, and safe concurrency to write programs that solve real-world problems. Start by reading and understanding Clojure syntax and see how Clojure is evaluated. From there, find out about the sequence abstraction, which combines immutable collections with functional programming to create truly reusable data transformation code.

Clojure is a functional language; learn how to write programs in a functional style, and when and how to use recursion to your advantage. Discover Clojure’s unique approach to state and identity, techniques for polymorphism and open systems using multimethods and protocols, and how to leverage Clojure’s metaprogramming capabilities via macros. Finally, put all the pieces together in a real program.

New to this edition is coverage of Clojure’s spec library, one of the most interesting new features of Clojure for describing both data and functions. You can use Clojure spec to validate data, destructure data, explain invalid data, and generate large numbers of tests to verify the correctness of your code. With this book, you’ll learn how to think in Clojure, and how to take advantage of its combined strengths to build powerful programs quickly. What You Need: Java 6 or higher Clojure 1.9