[R-SIG-Finance] Use of sorting in Financial Domain

Brian G. Peterson brian at braverock.com
Wed Sep 24 12:08:08 CEST 2008


On Wed, 2008-09-24 at 11:37 +0530, subramanian R wrote:
> Hi All,
> The *sort() *command in R has two methods (method specification is an
> optional parameter)
> 1.shell sort(default)
> 2.quick sort
> and order() has 1 extra method
> 3.radix sort.
> 
> In our multicore architecture we have some optimized implementations of
> several sorting methods like Bitonic sort that is not supported by R.It is
> faster than quick sort in most cases in our architecture.
> 
> I have two questions in this regard with respect to financial domain.
> 
> How much sorting is used in this domain?
> In those cases what type of sorting is used?
> Will it help if a seperate R command for bitonic sort is implemented and
> override the default one?
> Are there any specific packages used by Financial sector where optimized
> sorting techniques have been implemented?

Sorting is often used in financial time series: e.g. to examine
drawdowns, or to extract a quantile of an observed series or a monte
carlo simulation.

Implementation of additional parallel sort algorithms in R such as
Batcher's bitonic sort seems as though it could be valuable in financial
time series.

I'm not aware of additional sorting implementations in R specific to
finance, most finance specific functionality uses R general functions
such as sort() and order() 

It seems that your implementation would be best proposed as a patch to
one of these functions on the r-devel list, or alternately contained in
an optimized sorting package that could overload the standard functions
with a new implementation.

Regards,

   - Brian



More information about the R-SIG-Finance mailing list