Book Image

F# for Quantitative Finance

By : Johan Astborg
Book Image

F# for Quantitative Finance

By: Johan Astborg

Overview of this book

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 (17 chapters)
F# for Quantitative Finance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing type providers


Type providers are powerful ways of dealing with structured data from XML documents, SQL databases, and CSV files. They combine the type system of F# with structured data, which can be a tedious task in statically typed languages in many cases. Using type providers, the type of the data source is automatically converted to native types; this means the data is parsed and stored using the same field names as used in the data source. This enables Visual Studio and IntelliSense to support you in your coding without looking in the data source for the field names all the time.

Using LINQ and F#

LINQ is a feature in the .NET framework and has been supported in F# since Version 3.0. It's used to provide powerful query syntax and can be used together with databases, XML documents, .NET collections, and so on. In this section we'll briefly introduce LINQ and see how we can use it together with a SQL database. But first we'll look at LINQ together with collections:

  1. First we...