Search Results

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

Working on a migration to the last version of Fusion Invest (7.1.x), and even if most Sophis developers warn me that this class will be deprecated in future versions of Sophis Risque/Value, I've discovered how deep changes were done on it.

Trying to migrate my performance tool ITQLogger in order to test the new grid cache server, I've got a lot of modifications to do and most cases are now obsolete..

For remember, for those who don't know this class, it was previously mostly used by developers in this case: 

 - changes are done on database, without using the API,

 -  other programs connected to this database have to be notified, to refresh the data.

For example, the last development I've made using a Sophis native 'AJTI' event was done when I had to insert directly in the TRS_BASKET and TRS_BASKET_ADJUSTMENT Oracle tables records, and notify other GUI clients that the instrument was modified. Such development was done due to the well-known poor performance on Sophis basket swaps, making it impossible to use the native CSRInstrument::Save method when a lot of adjustments are done (like on portfolio swaps).

The goal of this post will discuss which workarounds have to be done.
By Philippe Bonneau on 10/10/2014 8:07 AM

Using the Sophis toolkit, it is possible to display a list when typing in a edit control. For example, in the default native transaction dialog, some references of instruments appear once the first characters are filled. The class that permits to reproduce this behaviour is CSRInstrumentCode which inherits from CSRGenericAutoCompletion. According to the comments provided in the sphcode.h header, there should be a sample in a SphSrc/AutoCompletion folder... Unfortunately, I haven't found such a sample, and looking for questions/answers on the Sophis support forum, I only have found one question without answer. This post will show how to implement some code in order to get the expected result, it means giving a list of results when typing some characters as follow:

By Philippe Bonneau on 9/30/2014 2:15 PM

I've got a question today on how to get the values displayed in the Inflation Curve Numerical Results dialog, as described below. This dialog can be displayed by clicking on the menu Data\Inflation and then by double-clicking on one index, and then on the toolbar button which appears on the right of the RIC one.

The goal of this post is to describe how to get the values and the ones retrieved from the quotes too.

By Philippe Bonneau on 9/29/2014 2:05 PM

Using the Sophis toolkit, it is easy to save user data by filling the parameter columnName in the CSRElement constructor and the ones of its derivated classes. When overriding the CSRInstrumentDialog class, the data will be then stored in a field of the Sophis native Oracle table TITRES, on which you have to add the expected field. Prefixing the field to remember that the field was created by the client is the common rule used. For other user data on which an entire Oracle table needs to be created, it is safe to override the CSRFitDialog::Save method too. Now, if you have to store other data even when having no GUI open, when using batches for example, the best is to add an implementation of the CSRInstrumentAction class, and to save data on the callback NotifyCreated and NotifyModified. All these things are basic concepts explained in the Sophis documentation. There are some cases on which we need to save data after the Oracle commit. This post will explain how to implement it.

By Philippe Bonneau on 9/26/2014 4:58 PM

In my precedent articles that I've published concerning the memory leaks (C++ memory leak check on x64 platform and test of different tools and How to filter Intel XE Inspector results), I was talking about the fact that for huge programs like Sophis Risque, the debugging using such tools is quite difficult to do. In fact, in some cases, I've found no tool that can do the job as I wanted. Using a tool like Intel Inspector gives sometimes so many errors that it is quite difficult to detect the real problem. That's why I've developped one tool that permits to detect easy bugs without impacting the whole performance during all the test but just for a piece of code that could interest me. The goal of this post is to present this tool.

By Philippe Bonneau on 9/15/2014 5:07 PM

I was asked recently if I knew how to change the color of the titlebar on Sophis Risque in order to catch the user attention. At first, I've made a wrong answer: "Easy, you just need to paint on the WM_NCPAINT as Sophis Risque does it when the simulation mode is selected (and as I've developed it on the v4)" !! ...

Unfortunately, this mode does not work anymore as it was developed for Window 95/2000.... A lot of articles can be found on the Net (like codeproject or codeguru), but no one gives the code to run it with the themes that were developed on XP, or on Vista/7 when the Desktop Window Manager service is started. For example, when the Windows Desktop Manager is disabled, as best effort, and using the MS SDK functions ::DrawCaption and ::DrawFrameControl, the dialog will look like this one:

Note that the minimize, maximize and close buttons do not have the new style as expected.

The goal of this post is to describe how to do it.

By Philippe Bonneau on 7/29/2014 5:04 PM

One client, a fund asset manager, asked me recently if I didn't have any tool that permits to make non-regression tests or performance tests when migrating from a version of Risque or Value to another one.

The goal of this post is to provide such a tool, when doing non-regression performance tests. This is based on the fact that the SEC server linked to the Oracle server is the bottleneck of the Sophis architecture.

When each Sophis Risque/Value client receives a notification, in most cases on versions <5.2 and in some cases after on Sophis internal messages, it does a query on the Oracle server. On user events, it depends how it was developed.

By Philippe Bonneau on 7/16/2014 11:28 PM

I've decided to restore some posts that were published on the previous it-quants.com website. These posts are old and published between 2007 and 2008, but are still interesting. One of the most interesting post described how to build a IIS webservice in order to export some functions that can be used by Talend, which is now a well-known French ETL tool.

By Philippe Bonneau on 7/10/2014 8:47 AM

Some functions of the Sophis toolkit API are exported and stored in this dll. It contains at least the classes that permit to add contextual menus to the portfolio view, overloading the CFD deal input dialog, the portfolio headers (which correspond to the dialog in which the main sensitivities of the folio are displayed) and payment methods.

By the way, this dll implements some functionalities for the .Net toolkit, it means that it is linked to the MS C# .Net framework, loading other assemblies when it is loaded by dlls or executables linked to SphPortfolioGUI.lib.

I have the case where most of the dialog overloadings and Sophis toolkit calls are stored in one toolkit dll. Unfortunately, this dll exports a lot of functionalities that were used by night batches. It means that the night batches load the dll twice:

  • one using the static link, when MS starts the process
  • the second one, by the Sophis API, since it is declared as a toolkit/plugin dll and loaded dynamically when the CSRApi::Initialise method is called.

I wanted to add contextual menus to the porfolioview. It causes no problem when the toolkit dll is loaded by Sophis Risque, but does not work when night batches are launched, since it tries to load assemblies without initialilzing the .Net security as SphRisque does it (creating specific AppDomain for example). I got an access violation as below:

I will explain in this post how to resolve this problem.

By Philippe Bonneau on 7/8/2014 11:07 AM

In one of my previous posts that can be found there: http://www.it-quants.com/Blogs/tabid/83/EntryId/39/Sophis-Risque-how-to-manage-limit-memory-allocation.aspx, I've detailed a method that works fine on the following OS: Windows XP and Windows 8, with or without Citrix, using the MS CreateJobObject method. 

Unfortunately, Microsoft has changed the behaviour of the jobs on Windows 7, and limit the creation to one job on this OS. Citrix is using already one job to control the limitations that can be driven through their configuration manager. For example, we will consider the case where the memory consumption is configured per Sophis user. The goal of this post is to explain the solution that could be retained, without exporting the rights to the Citrix configuration and let keeping Risque/Value manage the memory consumption as before.

Search blog