Sunday, May 31, 2009

Cupcake update

I must be the last user I know of to get the Cupcake update, and as some users have pointed out, Cupcake breaks some applications, so I'm working on fixes.

Monday, May 25, 2009


Here is a program to help calculate probabilities, densities, and quantiles for some of the more common distributions. The interesting part is calculating quantiles for the normal and the gamma families, where there are no closed form solutions.

Bug reports/comments/suggestions/criticisms/force close reports are welcome.

Download here:

Monday, April 13, 2009

Binary Option Calculator Published

Binary Option Calculator is for advanced options traders. Calculate option prices and Greeks for discontinuous payoff functions.

Can price any combination of:
  • Calls or Puts
  • European or American style
  • Cash-or-nothing or Asset-or-nothing
  • Option value or Implied vol.
European options are priced analytically, but American options are priced on a Crank-Nicholson SOR finite difference model. Computations on the G1 is generally fast, typically less than 10 seconds, but in some cases where the solution is near boundaries or the amplification error is large, it may take up to 30 seconds to converge.

Implied vol is calculated using the standard Newton-Raphson iteration.

You can enter your own volatility estimates or calibrate the underlying to market data using two methods, a simple sample variance or the Garman-Klass Open/Hi/Lo/Close estimate.

Comments/suggestions/criticisms/force close reports are welcome.

Download here:

Download from Softpedia

Saturday, April 11, 2009

Binary Option Model

The binary option model is nearly finished. Adapting the FD engines to the G1 was challenging and slow because the emulator is very slow and I can't debug directly on my phone. As it turns out, the G1 can handle the calculations if we choose the mesh points very carefully. Fortunately these models are smooth so the algorithms can converge in a reasonable amount of time.

Sunday, March 29, 2009

Finite Difference Models

Another useful tool is a finite difference model. There are many applications in physics but of course we only care about the financial applications. Spent the last few days implementing solvers for the heat equation: explicit and implicit differences, SOR, and Crank-Nicolson. Probably apply this to some kind of binary option depending on what the G1 can handle.

Saturday, March 21, 2009

Equity Option Calculator Published

The app is on the Android Market. Please send questions, comments or force close errors.

You can also download it here:

Download from Softpedia

Download from

Monday, March 16, 2009

Option Calculator

Began working on an option calculator. It'll be the Android Java implementation of the Black-Scholes calculation. I've already translated the normal distribution into Java from the Cephes Math Library functions erf and erfc. Implied volatility can be solved for using the Newton-Raphson method. Volatility can be estimated using market data from google finance.