ITQuants blog

Author: Created: 2/17/2012 1:03 PM RssIcon
My personal blog on ITQuants
By Philippe Bonneau on 5/29/2014 10:31 PM

In some circumtances, it is interesting to get the list of columns which are currently used in the different portfolio configurations. Getting such a list permits to see which toolkit columns are really used. Missing columns can be removed from the toolkit dlls.

The configuration of portfolio columns are stored in a BLOB field of the Oracle table USER_SETTINGS. We just need to use an XPATH query to get the list.
By Philippe Bonneau on 5/21/2014 11:06 PM

For remember, on SQL databases, triggers permit to change the behaviour of insertions, modifications or deletions made by a program, by adding SQL notification callbacks. This permits to make complex check on field values, or to copy some record in audit tables for example.

On Oracle, a trigger can be implemented after or before the action. On before triggers, values can be changed by the notification callback. On after, we are sure that any modification done by the program or on before triggers is taken into account in the :new record.

 Sometimes, complex check should be made on several tables, during a transactional modification for example. In such a case, a BEFORE COMMIT trigger is mainly required. Even if it is more recommanded to do such a check in the client program, on third party databases, there is no choice, additional checks can be done only on the database server. Unfortunately, Oracle does not permit such a trigger implementation directly, a workaround has to be developped. This is the purpose of this post.

By Philippe Bonneau on 5/15/2014 4:39 PM

Using Sophis Risque 5.3.7 and equivalent Value version or less, negotiation date of the deals done by the trader are stored into database using the local time zone of the machine on which Sophis Risque is launched. Unfortunately, on multisites/multi countries architecture, the timezone is not stored into the database, raising an issue on the last requirements for compliance and regulatory checks. The goal of this post is to explain how to add the required timezone.

By Philippe Bonneau on 5/2/2014 2:05 PM

There could be several ways to do it. For example, I've already seen some which were very slow, creating temporary tables and indexes, and making join between the records by comparing the max value... Of course, the goal of this post is to show the fatest way to do it.

By Philippe Bonneau on 4/3/2014 2:29 PM

More than one year ago, I wrote an article on what to do when a process is frozen, and how to dump the memory and registers into a .dmp file in order to use it after with Visual Studio (whatever the version).

But, unfortunately, sometimes the process crashes and disappears from the task of processes provided by taskmgr.

By chance, there is a way in Windows to declare an executable, known as JIT Debugger, that will be called when an unhandled exception is detected. The executable procdump mentioned in the previous post can be used. This post will describe how to install it and will show how to use the resulting .dmp file.

By Philippe Bonneau on 3/27/2014 5:29 PM

On Sophis Risque 5.3.7 and Value equivalent version, some data needed for the pricing or that could be needed for traceability for regulatory convenience are not audited. Triggers and supplementary tables need to be defined in order to duplicate them, and to offer to the internal audit service the possibillity to know which user has modified the data.

By Philippe Bonneau on 3/24/2014 3:29 PM

Auditing some performance at one client, I needed to make some search on the database in order to see how the database is growing. This is a part of the results of this study and could be considered as a beginning to reference some other useful queries. It is using in most cases the audit tables and not the logs. Of course, the use of the Sophis logs could enhance the results made by these queries too.

By Philippe Bonneau on 3/14/2014 6:10 PM

On Sophis Risque and Value, it is possible to add specific user rights, by adding tabs on user/group configuration. Tabs and fields are added using the Oracle table USER_RIGHT_TABLE. On previous versions of Sophis, such rights were defined using C++ toolkit and the obsolete class CSRUserRights.

By Philippe Bonneau on 2/20/2014 6:39 PM

The Sophis API provides a method, CSRSqlQuery::MultipleWrite, which enables the developer to insert several records in one command, using arrays. Unfortunately, the method doesn't work fine if an error occurs during an insertion. In this case, next calls to this method will return unpredictable results, like not data found:

 This error occurs in fact only when the optional parameter that corresponds to the Oracle cursor is not filled. In this case, the global one which is used remains in uncertain state after the error. This error occurs at least on 5.3.4, 5.3.7 versions of Sophis Risque.

By Philippe Bonneau on 2/6/2014 6:59 PM

Even on x64 OS environment, it is not interesting to let the process using all the available memory. In some cases, like on CITRIX servers, the fact that one user consumes a lot of quantity will impact all users too. The goal of this post is to analyze all the possibilities that gives the MS SDK, in order to capture either bad memory allocation or to limit the process to a certain quantity of RAM.

Search blog