ArrayFire Examples (Part 3 of 8) - Financial

ArrayFire ArrayFire, CUDA Leave a Comment

This is the third in a series of posts looking at our current ArrayFire examples. The code can be compiled and run from arrayfire/examples/ when you download and install the ArrayFire library. Today we will discuss the examples found in the financial/ directory.

In these examples, my machine has the following configuration:

Black-Scholes

There are a number of applications of ArrayFire and GPU programming in the world of finance and markets. Here we have an example of Black-Scholes, which is a model for computing options prices in the stock market. Understanding how this model works isn't necessary to understand this example. In fact, ArrayFire improves the relationship between the scientist/mathematician/analyst who needs to use a particular model, and the programmer who has to write it. Rather than having a whole bunch of nasty GPU code getting in the way and obscuring the algorithm, ArrayFire allows the algorithm to take precedence in your code, and express itself naturally. Take a look at the following snippet of algorithm code:

In this snippet, it is really easy to see what the mathematics are doing. We don't even have to deal with for-loops because of the way ArrayFire naturally works with the array data type.

Using ArrayFire can simplify many mathematical algorithms and bring the speed of the GPU to the analyst without forcing him or her to waste valuable time with the details of GPU kernel coding.  So go ahead, see which algorithms you can run on the GPU by downloading the ArrayFire library today!

---

Posts in this series:

  1. ArrayFire Examples (Part 1 of 8) – Getting Started
  2. ArrayFire Examples (Part 2 of 8) – Benchmarks
  3. ArrayFire Examples (Part 3 of 8) – Financial
  4. ArrayFire Examples (Part 4 of 8) - Image Processing
  5. ArrayFire Examples (Part 5 of 8) - Machine Learning
  6. ArrayFire Examples (Part 6 of 8) - Multiple GPU
  7. ArrayFire Examples (Part 7 of 8) - PDE

 

Facebooktwitterredditlinkedinmail