A new blog on various actuarial stuffs...

The aim of this blog is sharing information of interest in the actuarial world. We consider informative contents as well as implementation tools in financial, life and pension actuarial matters.

Saturday 29 January 2011

IAS 19 Employee Benefits : From the Board - Remeasurement & Curtailment/Settlement

During its January meeting, the Board continued the discussions with regard to

  • presentation of remeasurementthe Board tentatively decided that, although remeasurements should be presented in other comprehensive income, there were circumstances in which it would be appropriate to allow an entity to elect to present remeasurements in profit or loss (primarily to address accounting mismatches) for a given plan. 
  • curtailment & settlement: the Board tentatively proposed recognition rules for
    • gains and losses resulting from  a curtailment or plan amendment arising as part of a restructuring plan or is linked to termination benefits
    • termination benefits arising as a part of plan amendment arises as part of a restructuring plan
More information available at this link.

Thursday 27 January 2011

Python Web-Hosting with Numpy : virtualising your environment

Many solutions can be found to host a Python-based website. But really few (none?) of them offer a solutions with pre-installed Numpy, Scipy and Matplotlib. A way for circumeventing this seems to rely on the virtualisation of your Python environment with tools such virtualenv. You would have to proceed as follows
  1. Virtualisation of a own Python environment with the website hoster
  2. Installation of the required tools with easy_install
This link points to the referred solution (copied hereunder)...that I have not tested ! 

For your information:
  • I didn't know numpy, scipy and friends could be (easily) installed with easy_install
  • This at least requires the gcc tools or the corresponding compiling and building tools to be installed with the server

You can indeed install third party packages to your hosted space. If it's a pure python package, all that's needed is to unpack it to a directory and then add that directory to your PYTHONPATH environment variable or sys.path.
This can be tiring to do often, and won't work easily for compiled modules. If you have shell access to your python host, the excellent virtualenv package allows you to do set up a private python environment with its own libraries.
To set up your virtualenv, you'll do something like this at the shell:
$ virtualenv $HOME/my_python
$ $HOME/my_python/bin/easy_install numpy
You can keep running easy_install for anything else you want to install in your personal python environment.
Now, when you write your python scripts, you will want to use your private python interpreter, if that is possible:
 #!/home/myuser/my_python/bin/python
import numpy
# script here
If your python env cannot be specified (such as if run by mod_wsgi), you will need to add it to the  import path:
import sys
sys.path.insert(0, '/home/myuser/my_python/lib/python2.5/site-packages')
import numpy

Tuesday 25 January 2011

The difficult choice of a python IDE

The first steps in python often begin with the simple environment that comes with python. After a while you start looking for something more and there's a lot out there: Python wiki on IDE's, some are commercial, some are open source. I've tried out some open source versions and can't say there's a winner.
Here is a nice list of the possibilities: Open source Python IDE's

For the moment I work with Spyder and Eclipse(PyDev) that comes with a package that's interesting  because it gives you a lot of functionality at once (Python x,y (scientific-oriented Python Distribution))

I also tried out Eric and Pyscripter and Eric seems also interesting when you want some more help with GUI development (Qt) and webenabled development (Django).

Friday 21 January 2011

Python, Programming language of 2010

Programming language Python has become programming language of 2010. This award is given to the programming language that gained most market share in 2010. Python grew 1.81% since January 2010. This is a bit more than runner up Objective-C (+1.63%). Objective-C was favorite for the title for a long time thanks to the popularity of Apple's iPhone and iPad platforms. However, it lost too much popularity the last couples of months.

Python has become the "de facto" standard in system scripting (being a successor of Perl in this), but it is used for much more different types of application areas nowadays. Python is for instance very popular among web developers, especially in combination with the Django framework. Since Python is easy to learn, more and more universities are using Python to teach programming languages.

Source: TIOBE

Wednesday 19 January 2011

For .NET users: GSL binaries

GSL (GNU Scientific Library) is the popular open-source scientific library.

This  link points to two .NET libraries 2 libgsl_d.dll and libgslcblas_d.dll that have been been built statically (and posted on www.quantcode.com). Hence they can be used from a C# application of plat invoke, without dependency issues.

Saturday 15 January 2011

For .NET lovers or slaves : SharpDevelop 4.0 has been released

SharpDevelop is an open source IDE alternative for .NET development (under PC environment). Its brand new 4.0 release now allows building against .NET 4.0 framework (and previous releases as well). With respect to the free Microsoft Express tools:

  • It includes tools that are not included in the limited Express versions, such as Class Diagrammes
  • It handles more .NET dialects from the same platform: VisualBasic.NET, C#, Boo, F# and IronPython and IronRuby
  • It includes a translation module between dialects
  • For those who cannot miss their favorite scripting language, it includes (Iron)Python/Ruby console even if you develop under C#.

Friday 7 January 2011

"IAS 19 Employee Benefits : prémices d'une mutation" has been issued by Kluwer

This booklet (64 pages) link published by Kluwer analyses and comments the recent proposals made by the IAS Board with respect to IAS 19  in its Exposure Draft ED/2010/3 Defined Benefit Plans: Proposed amendments to IAS 19. The table of contents is available here.

Thursday 6 January 2011

Prospective mortality tables; R is your friend

A very interesting R package that permits to easily fit the Lee Carter model for prospective mortality tables.

website: http://cran.r-project.org/web/packages/demography/demography.pdf

Description:

Functions for demographic analysis including lifetable
calculations; Lee-Carter modelling; functional data analysis of
mortality rates, fertility rates, net migration numbers; and stochastic population forecasting

Interested people might also find intersting to use the web applciation developped by Mr Lee himself:
http://lcfit.demog.berkeley.edu/

Useless to say that the web application uses Python... ;-)