Java library to do monte-carlo simulations and other simulations.
This started initially as a playground for trying/understanding various option pricing models. The goal is one day to make it more like a real library.
Monte-Carlo featurescan choose random number generator/plug one in. Sobol, MersenneTwister by default. can do Monte-Carlo and Quasi-Monte-Carlo can simulate continuous path Vanilla, Asian Payoffs. Others can be easily implemented Basket (N correlated assets simulation) American using Longstaff-Schwartz regression approach. Vanilla, Asian and Basket best of payoffs are supported and tested against the Longstaff Schwartz paper prices. American using Glassermann Non Recombining Tree approach. This is very slow and will gives results only when there are a few steps (<=5) or a few branches. Choice between Incremental, Brownian Bridge or Principal Component Analysis Path Construction. Discrete dividends support for 1D Monte-Carlo Finite Differences featuresThe idea here is to provide different algorithms one can then easily adapt to his own need
Explicit, Implicit methods in linear asset scale for Vanilla, Barrier. Explicit, Implicit, Crank-Nicolson (parametrized with "theta method" to switch between explicit/implicit) methods in log scale. Vanilla, Compound, Barrier (knock-out and knock-in) implementations. Implicit and Crank-Nicolson are implemented with fast tridiagonal solver in log scale, and with matrix inversion in linear scale and log scale. Boundary conditions are GAMMA -> 0 when S -> infinite and rate drift when S->0. Delta, Gamma, Theta greeks are computed. Wilmott method for finite difference (computes ALL delta/gamma/theta). Implementations are unit tested against analytic results. Analytic featuresGeneral Black-Scholes-Merton (with delayed settlement) Standard Barrier (KO,KI, with rebate). Other featuresEuropean/American Binomial pricers (several algorithms) for vanilla, digital and compound options, with greeks.
TODOmore payoffs in montecarlo (better asian, barrier) greeks in monte-carlo multithreading unit tests (in progress) simple GUI more payoffs in finite difference (forward start, bermudan, chooser) analytic pricers (Geometric Asian, American) to validate results/have more choice. fix greeks for barriers.
These details are provided for information only. No information here is legal advice and should not be used as such.