Now that we have implemented Black-Scholes in Clojure, let’s make a Swing GUI for it. The Swing GUI will have text boxes for all the necessary inputs, and calculate prices and Greeks when the button is pressed. It’s a simple and straightforward way to get started in Swing GUI programming in Clojure. Here’s what it looks like. Screenshot of the Swing GUI for the Black-Scholes option modeler, implemented in Clojure

The GUI is written entirely in Clojure with the Swing toolkit. Calculation state is stored in a series of atoms. Watches are used to update the output table automatically when an atom changes, an idea from Kotka. I used the excellent MiG Layout for general layout functionality, and generic Swing widgets (JTextFields and a JTable) for the input and output.
Continue Reading »

Popularity: 100% [?]

The Black-Scholes option pricing model, implemented in Clojure based on the description at Wikipedia and these code samples.
Continue Reading »

Popularity: 63% [?]