Author: Jorrit de Jong

Using Safari To View XML Files

This blog explains how to get nicely-formatted XML in the Safari browser.

Introduction

Recently we have been writing a series of blogs on the Tapestry framework showing how it can be used to create web applications. One of the blogs explains how to get the framework to return XML response for API integration. While creating the example we noticed that on OSX the Safari browser didn't give us back nicely-formatted XML files (see example)

initial in safari default.

 

In other browsers we did get the expected result. Since for most of the series we had been using screenshots from the Safari browser to illustrate the expected results, we wanted to stick with this browser. As it turns out, you can get nicely-formatted XML files in Safari, however this requires an additional one-time setup. Continue reading

Tapestry - Part IV: Extended API using XML

Introduction

In a previous blog in our Tapestry series we showed that Tapestry can be used as an API. While we would advice to do this only for simple cases, it could be a good solution if you wanted to offer Web API for your existing Tapestry application. If you were interested in a fully-fledged Web API with all the bells and whistles it would probably be better to use a separate framework.

In a previous blog we build an API returning JSON. This raises the question: is it also possible to return XML? The answer turns out to be yes!

In this blog we will show how to do so.

Prerequisites

Continue reading

Bankers' Oath is a Compliment

Since beginning of 2015 the bankers' oath is mandatory for all bankers in Netherlands. However, it doesn’t stop there as in some cases external contractors are also required to declare the oath. Of course this means dealing with a little bit of ceremony and paperwork to get the oath official. Traditionally small businesses and independent professionals don’t get too exited about doing "extra" paperwork. In this case there is a little bit more to it.

If you are asked to declare or swear the oath it means your work is considered to be of impact on the risk profile of the bank or that you deal with clients of the bank directly. (Be sure to check the Dutch law for an exact definition.) This can be translated as: the work you do is important for the bank. In this light the oath can be seen as a complement. Continue reading

Tapestry - Part III: Input Validation

Introduction

In previous blogs we showed how to setup a simple “hello world” web application using Tapestry including an API. One of the issues we ran into is that some names are reserved in the application for page names, so they can’t be used as input names for the application. Here we will show how the input can be filtered and meaningful error messages can be created for the user. This approach allows you to create a better user experience and safer applications.

Prerequisites

Continue reading

Ugly Duckling Welcomes Nationale Nederlanden as Client

We are happy to announce that Ugly Duckling will be supporting the Nationale Nederlanden Quant Development team. We will assist the team in writing code, tests and documentation. In addition existing code bases are to be migrated from legacy systems. In short,  we will support the team with the implementation of their quantitive finance requirements in a modern application that will transform raw data into business information for the wider organisation.

Tapestry - Part II: Simple WEB API using Tapestry

Introduction

In this blog we will show you how to extend your Tapestry projects with a simple API. If you have a big project and need complex calls to expose your API functions, then this approach is not for you. Instead, if you have a couple of functions you would like to expose, this is a quick and simple approach to get it done.

Prerequisites

  • This tutorial uses Eclipse with Maven
  • This tutorial builds on previous blog

We consider a setup where a request to \\example.com\api should be replied with a JSON stream, where stream is just fancy way of saying text file. To do this in Java there are a few very good frameworks:

The last one is the easiest complete-integration framework for REST API that will work with Tapestry that we could find. However, if your have very simple requirements even the out-of-the-box frameworks might not be worth configuring. The alternative is to parse arguments during the rendering of a page and respond with XML or JSON. In this example we’ll show how to create an API for our hello-world application, which we build in our previous blog. Continue reading

Credit Value Adjustment

We created a software package to valuate the Credit Value Adjustment (CVA) of a swap portfolio. Our client, active in banking and capital management in the Netherlands, wanted to evaluate its CVA position for the existing portfolio and see impact of new deals for a given counter party. The tool is specifically designed to consider the distribution of the exposure of a given counter party. This functionality allows for comparison between the regulatory value (BASEL III) and the economic value.

The tools was implemented on the Microsoft platform, using C#, Microsoft Visual Basic for Applications (VBA) and Excel.

Tapestry - Part I: Hello Tapestry

Introduction

Tapestry 5 is framework for creating web applications using Java. The framework allows you to generate HTML pages using Java code. This a good thing if you have complex business logic that takes data from the user, database, online resources to present a result as a webpage. We wanted to do something like that for one of our econometric models so we decided to give Tapestry a go for building our web application. Along the way we learned quite a lot about the framework. Some of that we want to share here in a series of blogs. The complete series should be enough to build simple GUI for your Java business logic.

In this blog we will create a hello-world style example using Tapestry 5. The goal of this example is to get you up and running with Tapestry using the skeleton setup that is included with Tapestry. Based on this initial setup we will make changes to get a hello-world page.

Prerequisites

  • This tutorial uses Eclipse with Maven

Continue reading

Bootstrap approach for CDS spreads

In this blog we consider the hazard (or default) rate implied by Credit Default Swaps (CDS). In specific we compare a simplified CDS-spreads-based model against a bootstrap procedure. Surprisingly we find that the simplified approach works well in the current low-interest rate market. Our findings are based on a piecewise linear hazard rate curve. The nodes for these curves are obtained using either the simple model or the bootstrap approach.

Continue reading