finMath.net

The spreadsheets are given in Excel (xls) and OpenOffice (ods) format and require the Java Object Handler for Spreadsheets, "Obba". Please check requirements below.

### Interest Rate Curves (Multi-Curve / OIS Discounting)

Calibration of curves (see package net.finmath.marketdata.model.curves).

The sheet calibrates a set of different curves (including discounting curves (e.g., OIS) and forward curves) from swaps. Swaps may feature different discounting curves (e.g., OIS discounting). Forward curves can be calibrated to standard swaps and tenor basis swaps. Discount curves may be calibrated to standard swaps or cross-currency basis swaps.

Although the specific algorithm used is a calibration and not a classical bootstrap, this is sometimes called "curve bootstrapping".

For details see the curve calibration page.

### Forward Bond and Total Return Swap Valuation (bases on funding curves)

Valuation of Forward Bonds and Total Return Swaps.

The sheet calibrates a set of different curves (including discounting curves (e.g., OIS) and forward curves) from swaps. It also calibrates funding curves. It contains functionality for the valuation of forward bonds and total return swaps.

Valuation part contributed by Mark Lichtner. Based on the Curve Calibration Sheet.

For details see the forward bond valuation page.

### Monte-Carlo Simulation: Brownian Motion and Brownian Bridge

Generate an plot of some sample paths of a Brownian motion and a Brownian bridge.

### Black Scholes Model: Valuation

Calculation of the density of the underlying (under the risk neutral measure) by differentiation of option prices (numerically via finite differences).
Monte Carlo simulation of a Black-Scholes model. Contains several sheets related to valuation of options under the Black-Scholes model, e.g.,
• valuation of European option,
• valuation of Asian option,
• valuation of Bermudan option
Also includes the valuation of a custom product where the payoff (valuation code) is embedded in the spreadsheet. Note that this feature requires that Java runs from a JDK, not JRE (due to the requirement of on-the-fly compilation).
Monte Carlo simulation of a Black-Scholes model and valuation of a given (customizable) payoff. The custom product is given in an external .java-file which has to be compiled to a .class-file manually.

### Black Scholes Model: Hedging

Monte Carlo simulation of a Black-Scholes delta hedged portfolio. Contains the Java source code of the hedge strategy (embedded in the spreadsheet). Note that this feature requires that Java runs from a JDK, not JRE (due to the requirement of on-the-fly compilation).

### Heston Model: Valuation

Monte Carlo simulation of a Heston model and the valuation of a European option. The sheet also plots the integrated variance of the Heston model as a function of the realized asset model, which give an intuitive understanding of the smile generated by the model. The sheet may be used as a starting point to study the Heston model properties.

### Merton Model: Valuation

Monte Carlo simulation of a Merton model and the valuation of a European option. The sheet may be used as a starting point to study the Merton model properties.

### Mean-Variance Hedging

A hedge simulation using a risk minimizing hedge ratio calculated via regression / American Monte-Carlo. The model used to generate the underlying paths is a Heston model, while the model used to calculate the Hedge ratios is a Black-Scholes model. The sheets thus allows to explore hedge errors introduced by model risk.
You may adapt the sheet to use different combinations of simulation and valuation model.

### Interest Rate Swaps

Day Count Fractions (see package net.finmath.time.daycount).

The sheet tests several day count conventions against its native spreadsheet implementation using the YEARFRAC function.

Swap Leg Schedule (see package net.finmath.time).

The generates a swap leg schedule, i.e., a sequence of periods with period start date, period end date, fixing date, payment date and period day count fractions, from given meta date, like spot, frequency, date roll convention, holiday calendars, day count convetions.

### Interest Rate Derivatives

Valuation of swaption using the generalized Black-Scholes formula (Black model).
Valuation of cms option and a cms floor using the generalized Black-Scholes formula with a convexity adjustment.
Valuation of caps from a caplet volatility surface (lognormal or normal volatility).

### Interest Rate Derivatives: LIBOR Market Model

LIBOR Market Model

The sheet allows to create a LIBOR market model calibrated to a given forward curve and given swaptions. The parametrized volatility and correlation can be inspected. Generated interest rate scenarios can ben extracted.

For details see the LIBOR market model page.

### SABR Model

SABR Model

A simple sheet to play with SABR parameters and investigate the shape of the implied volatility smile, price curve and probability density.

SABR Model Calibration

The sheet demonstrate the calibration of a displaced SABR model to a set of implied volatilities for different strikes. The sheet allows to set parameters bounds for CEV, displacement, correlation, etc.

SABR Model Interpolations

The sheets illustrate the interpolations of SABR smiles via a) naive parameter interpolation and b) skew and curvature interpolation. A naive parameter interpolation results in unplausible smile interpolations.

## Requirements

For the Excel files (.xls):

• Microsoft Excel for Windows (Windows 7 or better)
• Java 8 Runtime for Windows
• Obba 6.0 for Excel

For the OpenOffice/LibreOffice files (.odt)

• OpenOffice 3.3 (or LibreOffice, NeoOffice)
• Java 8
• Obba 6.0 for OpenOffice

Note: Some sheets require a JDK instead of a JRE.

## Code

The source code behind these sheets can be found in the finmath lib repository.

## Disclaimer

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.