GithubHelp home page GithubHelp logo

jlroo / fpga-volatility Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 3.0 844 KB

The goal of this project is to implement a binomial model to calculate options on futures implied volatility using Cox–Ross–Rubinstein (CRR) procedure.

Visual Basic 68.78% C++ 31.22%

fpga-volatility's Introduction

Introduction

A joint collaboration between the Finance Department, The Financial Service and Business Analytics Lab at Loyola University Chicago and The CME Group. The goal of this project is to compare the time taken to compute the price of a binomial option by using The Cox–Ross–Rubinstein (CRR) procedure, followed by backward induction calculated on a regular machine against one that uses Maxeler computing. In Computer Science, a similar way of approach is by the triangular wavefront programming.

Features of Maxeler Computing

  • Field-Programmable Gate Array (FPGA)

    Maxeler typically packs the Field-Programmable Gate Array (FPGA), made by Xilinx, in circuit boards that work with Intel Xeon microprocessors, whose unique chip allows for single and multiple data streams. Unlike traditional Read-Only Memory (ROM), the circuitry of these FPGAs gives the programmers flexibility to reconfigure data after it has been programmed into the chip. It also supplies special software, called compilers, to exploit the hardware – which can be continuously reprogrammed for customization to fit new sets of jobs.

  • Multiscale Dataflow Computing

In addition to the FPGA, Maxeler’s Multiscale DataflowComputing, a combination of traditional synchronous data flow, vector and array processor, allows for the manipulation of loop level parallelism in a spatial, pipelined way. Large streams of data flowing through a sea of arithmetic units can be connected to match the structure of the computer task. Small on-chip memories form a distributed register file with as many access ports as needed to support a smooth flow of data through the chip.

Multiscale Dataflow Computing employs dataflow on multiple levels of abstraction: the system level,the architecture level, the arithmetic level and the bit level. On the system level, multiple dataflowengines are connected to form a supercomputer. On the architecture level, memory access can be decoupled from arithmetic operations, while the arithmetic and bit levels provide opportunities to optimize the representation of the data and balance computation with communication.

Figure 1: An example of Dataflow Computing in Maxeler
As illustrated in Figure 1, CPU codes (C language) are the main front to navigate data streaming into Engine Codes (MyKernel in Figure 1), which are written in Java for its data design expressions. The communication and translation between CPU codes and Engine codes are performed continuously.

Our approach

The Cox–Ross–Rubinstein (CRR) procedure, part of the Binomal Options Pricing Model, was provided in Excel VBA format by the Finance Department. The Computer Science Department converted these codes in Java for readability which would serve as a central point of reference between the original Excel VBA and the translated C language, which Maxeler computing exclusively uses for its CPU codes. The Financial Service and Business Analytics Lab covered the Java and C code to Maxeler Code.

Initially we built a controlled environment based on static data provided by the Finance Department (VBA model). The static data comprises of spot prices, dividend yields and other constants of a standard call option. Using the CRR formula, these data were used to calculate Implied Volatility (IV).

Figure 2: Program Flowchart

An Alternative to Black-Scholes

There exists a discrete-time analog to the continuous time Black-Scholes model, the binomial model.

Binomial Price Model Calculation
Figure 3: This model can handle early exercise (American Options).

Practical Implication

  • Implied volatility outperforms time-series models based on historical data for the purposes of forecasting volatility.
  • Volatility is an important input into VAR and other models. Relevant to all money managers.
  • Using CME’s S&P500 futures options (minis) we have the highest quality data thereby maximizing efficacy.

Next Steps

  • Program the Newton-Raphson algorithm to run in the DFE.
  • Bring in a time dimension to the problem (estimating a vol surface instead of a smile).
  • Migrate all calculations to fixed point.
  • Consider other approaches that might better exploit the DFE (e.g., Monte Carlo).
  • Create something akin to the VIX using CME contracts?

Resources

CRR Model Paper: Implied Volatility for Options on Futures Using the Cox-Ross-Rubinstein (CRR) Model

fpga-volatility's People

Contributors

jlroo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.