LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 12 Jul 2004 16:12:12 -0700
Reply-To:     Marky <marky@NEOSTRADA.PL>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Marky <marky@NEOSTRADA.PL>
Organization: http://groups.google.com
Subject:      Re: NEED HELP in double summing of cross multiplication..PLS!!!
Content-Type: text/plain; charset=ISO-8859-1

Hi Puddin'

I want to do exactly what you mentioned - I want to compute daily volatility from intradaily data(tick data). So that to obtain good estimates of realized volatility ('good' means that a mean of cross-muliplications has to be as small as possible) I need to choose best (equidistant) time interval and criteria is those cross-muliplications have to be small.

Hope I made it more clear. Cheers, Marek

pudding_man@MAIL.COM (pudding man) wrote in message news:<20040712010311.784D979002E@ws1-14.us4.outblaze.com>... > 'Scuse me for barging in ... > > Like Howard, I didn't fully grasp your problem (still > don't). You have intra-day returns on traded equity > securities? Are you trying to derive daily returns > from the intra-day returns? It may be beneficial to > further explain what you're trying to do. > > As to the mechanics of what you ask, it is less > problematical. > > Suppose that a trading day consisted of 5 hours, > a measurement being made at the end of each hour. > The following tested code may suggest an approach: > > data ee; > do day = 1 to 2; > do hour = 1 to 5; > x + 1; > output; > end; > end; > run; > > data ff(keep = day hour xday); > array xx(999); > > do i = 1 by 1 until (last.day); > set ee; by day; > xx(i) = x; > end; > > do j = 1 to i - 1; > do k = j + 1 to i; > xday = sum(xday, xx(j) * xx(k)); > end; > end; > > put day= hour= xday=; > run; > > > Hope it hep's ... > > Cheers, > Puddin' > > ******************************************************* > ***** Puddin' Man **** Pudding_Man-at-mail.com ******** > *******************************************************; > > ----- Original Message ----- > From: Marky <marky@NEOSTRADA.PL> > Date: Sun, 11 Jul 2004 14:56:59 -0700 > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: NEED HELP in double summing of cross multiplication..PLS!!! > > Ok- here is example let's assume that 1 day is divided into 5 > observations,so daily cross-multiplications are: > > Observations: Output : > x > 1 1*2 + 1*3 + 1*4 + 1*5 + > 2 2*3 + 2*4 + 2*5 + > 3 3*4 + 3*5 + > 4 4*5 = > 5 = 85 > 6 6*7 + 6*8 + 6*9 + 6*10 + > 7 7*8 + 7*9 + 7*10 + > 8 8*9 + 8*10 + > 9 9*10 = > 10 =635 > > and so on. > > > > Howard_Schreier@ITA.DOC.GOV (Howard Schreier) wrote in message news:<200407110317.i6B3Hd214519@listserv.cc.uga.edu>... > > So you have about 350 trading days (350 x 72 = 25,200). > > > > Why don't you post a mini example (perhaps 2 days x 4 intervals per day) > > and show both the input data and expected results? > > > > On Sat, 10 Jul 2004 11:28:26 -0700, Marky <marky@NEOSTRADA.PL> wrote: > > > > >Hi Fellows, > > > > > >I have a problem with following matter: > > > > > >I have about 25000 observations which are 5-minute returns of certain > > >equity (equivalent to 1.5 year). I need to create a formula that > > >computes a sum of cross multiplications every 72 (here 72 equals 1 > > >day)observations. Formula is as follows: (sum from i=1 to 71)(sum from > > >j=i+1 to 72) r(i)*r(j) > > > > > >where r(i) is return in time i > > > > > >PLEASE help me with that. I only made a formula that computes sum of > > >multiplication over all observations, but it is useless for me ;( > > > > > >THANKS for help


Back to: Top of message | Previous page | Main SAS-L page