F# for Quantitative Finance

An introductory guide to utilizing F# for quantitative finance leveraging the .NET platform

F# for Quantitative Finance

Johan Astborg

An introductory guide to utilizing F# for quantitative finance leveraging the .NET platform
Mapt Subscription
FREE
$29.99/m after trial
eBook
$18.90
RRP $26.99
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$18.90
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781782164623
Paperback286 pages

Book Description

F# is a functional programming language that allows you to write simple code for complex problems. Currently, it is most commonly used in the financial sector. Quantitative finance makes heavy use of mathematics to model various parts of finance in the real world. If you are interested in using F# for your day-to-day work or research in quantitative finance, this book is a must-have.

This book will cover everything you need to know about using functional programming for quantitative finance. Using a functional programming language will enable you to concentrate more on the problem itself rather than implementation details. Tutorials and snippets are summarized into an automated trading system throughout the book.

This book will introduce you to F#, using Visual Studio, and provide examples with functional programming and finance combined. The book also covers topics such as downloading, visualizing and calculating statistics from data.

F# is a first class programming language for the financial domain.

Table of Contents

Chapter 1: Introducing F# Using Visual Studio
Introduction
Getting started with Visual Studio
Understanding F# Interactive
Language overview
Explaining mutability and immutability
Primitive types
Explaining type inference
Explaining functions
Documenting your code
Your first application
The whole program
The power of prototyping
Functional languages in quantitative finance
Understanding the imperative code and interoperability
Summary
Chapter 2: Learning More About F#
Structuring your F# program
Looking deeper inside data structures
Choosing data structures
More on functional programming
Asynchronous and parallel programming
A brief look at imperative programming
Using XML documentation
Summary
Chapter 3: Financial Mathematics and Numerical Analysis
Understanding the number representation
Learning about numerical types in F#
Arithmetic operators
Learning about arithmetic comparisons
Math operators
Conversion functions
Introducing statistics
Using the Math.NET library
Learning about root-finding algorithms
Summary
Chapter 4: Getting Started with Data Visualization
Making your first GUI in F#
Composing interfaces
Displaying data
Extending the application to use Bollinger bands
Using FSharp.Charting
Creating a bar chart
Summary
Chapter 5: Learning Option Pricing
Introduction to options
Learning the Black-Scholes formula
The Monte Carlo method
Summary
Chapter 6: Exploring Volatility
Introduction to volatility
Learning about implied volatility
Solving for implied volatility
Delta hedging using Black-Scholes
Exploring the volatility smile
Summary
Chapter 7: Getting Started with Order Types and Market Data
Introducing orders
Understanding order execution
Introducing market data
Implementing simple pretrade risk analysis
Introducing FIX and QuickFIX/N
Summary
Chapter 8: Setting Up the Trading System Project
Explaining automated trading
Understanding software testing and test-driven development
Understanding NUnit and FsUnit
Connecting to Microsoft SQL Server
Introducing type providers
Writing test cases
Summary
Chapter 9: Trading Volatility for Profit
Trading the volatility
Plotting payoff diagrams with FSharpCharts
Learning directional trading strategies
Deriving the mathematics
Learning relative value trading strategies
Defining the trading strategy
Summary
Chapter 10: Putting the Pieces Together
Understanding the requirements
Revisiting the structure of the system
Understanding the Model-View-Controller pattern
Executing the trading strategy using a framework
Building the GUI
Presenting information in the GUI
Adding support for downloading the data
Looking at possible additions to the system
Summary

What You Will Learn

  • Use Visual Studio as your main tool for writing F#
  • Utilize F# to aggregate data and calculate statistics
  • Plot and visualize data in F#
  • Learn about volatility, delta hedging, and volatility arbitrage
  • Understand basic numerical analysis and algorithm implementation
  • Model orders and market data together with basic pre-trade risk
  • Structure and write object-oriented code
  • Develop larger programs using F#
  • Explore automated trading systems and quantitative trading models

Authors

Table of Contents

Chapter 1: Introducing F# Using Visual Studio
Introduction
Getting started with Visual Studio
Understanding F# Interactive
Language overview
Explaining mutability and immutability
Primitive types
Explaining type inference
Explaining functions
Documenting your code
Your first application
The whole program
The power of prototyping
Functional languages in quantitative finance
Understanding the imperative code and interoperability
Summary
Chapter 2: Learning More About F#
Structuring your F# program
Looking deeper inside data structures
Choosing data structures
More on functional programming
Asynchronous and parallel programming
A brief look at imperative programming
Using XML documentation
Summary
Chapter 3: Financial Mathematics and Numerical Analysis
Understanding the number representation
Learning about numerical types in F#
Arithmetic operators
Learning about arithmetic comparisons
Math operators
Conversion functions
Introducing statistics
Using the Math.NET library
Learning about root-finding algorithms
Summary
Chapter 4: Getting Started with Data Visualization
Making your first GUI in F#
Composing interfaces
Displaying data
Extending the application to use Bollinger bands
Using FSharp.Charting
Creating a bar chart
Summary
Chapter 5: Learning Option Pricing
Introduction to options
Learning the Black-Scholes formula
The Monte Carlo method
Summary
Chapter 6: Exploring Volatility
Introduction to volatility
Learning about implied volatility
Solving for implied volatility
Delta hedging using Black-Scholes
Exploring the volatility smile
Summary
Chapter 7: Getting Started with Order Types and Market Data
Introducing orders
Understanding order execution
Introducing market data
Implementing simple pretrade risk analysis
Introducing FIX and QuickFIX/N
Summary
Chapter 8: Setting Up the Trading System Project
Explaining automated trading
Understanding software testing and test-driven development
Understanding NUnit and FsUnit
Connecting to Microsoft SQL Server
Introducing type providers
Writing test cases
Summary
Chapter 9: Trading Volatility for Profit
Trading the volatility
Plotting payoff diagrams with FSharpCharts
Learning directional trading strategies
Deriving the mathematics
Learning relative value trading strategies
Defining the trading strategy
Summary
Chapter 10: Putting the Pieces Together
Understanding the requirements
Revisiting the structure of the system
Understanding the Model-View-Controller pattern
Executing the trading strategy using a framework
Building the GUI
Presenting information in the GUI
Adding support for downloading the data
Looking at possible additions to the system
Summary

Book Details

ISBN 139781782164623
Paperback286 pages
Read More

Read More Reviews