Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Financial details
Login with GitLab


Module is about risk measure and management, asset allocation, and pricing
(3306 downloads for this version - 11477 downloads for all versions)
A more recent valid version exists: 1.0.1
Francesco Menoncin
Owner Organization
Brescia University - Economics Department
Francesco Menoncin
Michael BAUDIN
Creation Date
September 25, 2010
Source created on
Scilab 5.2.x
Binaries available on
Scilab 5.2.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("Financial")
            The module is dedicated to finance. There are three main areas that are covered:
(i) risk measure and management, (ii) asset allocation, and (iii) pricing.

For what concerns the risk measure, some functions are dedicated to the
computation of Value at Risk (VaR) and Expected Shortfall (ES). Backtest is also
implemented in order to check the goodness of such risk measures. Both VaR and
ES are also computed in an Extreme Value Theory framework (EVT). Furthermore, it
is possible to estimate the parameters of the EVT density function (through
maximum likelihood). The Mean Excess Function for graphical study of an EVT
distribution is also implemented.
The interest rate risk is faced by functions aimed at computing duration,
convexity, and yield to maturity. Furthermore, Merton, Vasicek and Cox,
Ingersoll and Ross interest rate models are implemented together with the
estimation of their parameters. Parametric interpolation of the interest rate
curve is possible through both Svennson’s and Nelson-Siegel’s models.
Finally, some technical analysis indicators are implemented: Bollinger bands,
moving averages, Hurst index.

The asset allocation problem is faced by two functions which compute: (i) the
optimal portfolio minimizing the variance of its return and (ii) the optimal
portfolio minimizing the expected shortfall of its return. In both cases, the
portfolios with and without a riskless asset and with and without short selling
are computed.

Pricing problem is approached through functions aimed at: (i) computing the
spread on Interest Rate Swaps, (ii) computing the value of options in the Black
and Scholes framework (with Greeks and implied volatility), (iii) simulating
stochastic processes (through Euler discretization).


 * backtest : Apply the backtest to Expected Shortfall, Value at Risk and a
Linear Spectral risk measure.
 * bollinger : Plots the historical prices, the Bollinger bands, and the
 * bsgreeks : Compute the Greeks for Black and Scholes put and call options.
 * bsimpvol : Compute the implied volatility in a Black and Scholes framework.
 * bsoption : Compute the value of both a call and a put option in a Black and
Scholes framework.
 * cfr : Compare and merge two or more time series according to dates.
 * duration : Compute both duration and convexity of cash flows by using the
 * esvarevt : Compute both Expected Shortfall and Value at Risk.
 * esvarlin : Compute Expected Shortfall, Value at Risk and a Linear Spectral
risk measure on a set of assets.
 * esvaroptim : Compute the optimal portfolio minimizing the Expected
 * euler : Simulate the solution of a system of stochastic differential
 * evt : Estimate the parameters of the Generalized Pareto Distribution.
 * gbm : Estimate the parameters of a Geometric Brownian Motion.
 * hedge : Compute the hedge ratio between an asset and a derivative on that
 * hurst : Compute the Hurst index on historical prices.
 * interest : Estimate the parameters of three spot interest rate models (Merton
- Vasicek - CIR).
 * irs : Compute both the spread and the value of the legs of a fix-for-floating
Interest Rate Swap.
 * markowitz : Compute the optimal portfolio minimizing the variance.
 * mef : Compute and draw the Mean Excess Function.
 * movav : Compute and draw the moving average of a given time series.
 * nelson_siegel : Estimate the parameters for the Nelson Siegel model of spot
interest rates.
 * svennson : Estimate the parameters for the Svennson model of spot interest

Files (2)
[53.56 kB]
Source code archive
Financial sources
[134.21 kB]
OS-independent binary for Scilab 5.2.x
Binary version
Automatically generated by the ATOMS compilation chain

News (0)
Comments (5)     Leave a comment 
Comment from Pascal Buehler -- September 30, 2010, 08:05:37 AM    
This Toolbox is just what I needed. I'm getting data from the net and examen them with this

toolbox. Now, id would be nice to have the correlation, covariance and beta function also
this toolbox. This is helpfull from knowing, how the market infects from one price to the 
other and if there is a correlation between swissfrancs and SMI or dollar.

PS(An FFT for cycling market would be also nice.)

Pascal Bühler
Comment -- November 8, 2010, 09:33:50 AM    
What is the supported version of Scilab for this module ?


Michaël Baudin
Comment from Francesco Menoncin -- November 9, 2010, 07:21:54 PM    
Dear Michaël,
when I wrote the Financial module, Scilab was at its 5.0 version. Nevertheless, I have
checked it for 5.2, and the only problem can arise with the function "linpro" (for linear
optimization) which is no longer available in Scilab but is put in a separate module.


Comment -- December 16, 2010, 09:24:20 AM    
Dear Francesco,

I fixed this issue.


Michaël Baudin
Comment -- December 16, 2010, 09:24:27 AM    
Dear Francesco,

I fixed this issue.


Michaël Baudin
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.