s-news
[Top] [All Lists]

Re: query on column vector manipulation

To: "'Bill.Venables@CMIS.CSIRO.AU'" <Bill.Venables@CMIS.CSIRO.AU>
Subject: Re: query on column vector manipulation
From: "Burbidge, Robert" <robert.burbidge@csfb.com>
Date: Thu, 22 Aug 2002 17:10:21 +0100
Cc: s-news@lists.biostat.wustl.edu, 2116242101@jcom.home.ne.jp
>but your function is way too complicated.  The usual way to do it would be
> 
>    calcLOG <- function(x) diff(log(x))
> 
>finish.  This makes you wonder if you need a special function to do the job at 
>all...
 
Insightful decided to supply one in the finmetrics module anyway:

ret     <-      getReturns(x)

Jeffrey Wang of Insightful pointed out to me that for multiple price series, 
this is more efficient than:

ret <-  apply(log(x), 2, diff)

which is what I was using before.

Rgds

Robert

This message is for the named person's use only. It may contain sensitive and 
private proprietary or legally privileged information. No confidentiality or 
privilege is waived or lost by any mistransmission. If you are not the intended 
recipient, please immediately delete it and all copies of it from your system, 
destroy any hard copies of it and notify the sender. You must not, directly or 
indirectly, use, disclose, distribute, print, or copy any part of this message 
if you are not the intended recipient. CREDIT SUISSE GROUP and each legal 
entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT 
business units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all 
e-mail communications through its networks. Any views expressed in this message 
are those of the individual sender, except where the message states otherwise 
and the sender is authorized to state them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is 
indicative only, is subject to change and does not constitute an offer to deal 
at any price quoted. Any reference to the terms of executed transactions should 
be treated as  preliminary only and subject to our formal written confirmation.



<Prev in Thread] Current Thread [Next in Thread>