Functional languages in quantitative finance

In the preceding example code, we saw that parsing data from a file and extracting various information is straightforward, and results in code that is both easy to read and understand. That's one of the highlights of F#, not less important in quantitative finance where code can be complex and hard to follow and comprehend in many languages.

Let's illustrate the preceding statements with another example. The data in the CSV file in the previous sample application was sorted with the most recent date first. If we want the data to be ordered in a more natural way, lowest date first and so on, we can simply reverse the entire list in the following way:

/// Reverses the price data from the CSV-file let reversePrices ...

Get F# for Quantitative Finance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.