comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Problems with large records (GNAT) [continued]
Date: Thu, 01 Mar 2001 07:00:26 GMT
Date: 2001-03-01T07:00:26+00:00	[thread overview]
Message-ID: <esmn6.41158$5M5.2034803@news1.frmt1.sfba.home.com> (raw)
In-Reply-To: 3A9E05B0.46B406ED@linuxchip.demon.co.uk

>  type PriceSummary_T is record
>     OpenPrice   : Float;
>     HighPrice   : Float;
>     LowPrice    : Float;
>     ClosePrice  : Float; -- Split and dividend corrected price
>     UncorrectedClose : Float; -- Raw share price
>     Volume      : Integer;
>     Time        : Time_T;
>  end record;
  I realize you are interested in the generic large-memory-with-Gnat
problem, but, as they say, sometimes it's better to improve the
algorithm than the hardware.  I worked on a commercial system
(Technical Tools Co.) with stock (and commodity) historical data of
this type, using DPMI DOS and Windows 3.1 (and Ada 9X).  For
historical data, stock prices can be 16 bit fixed point with delta of
1/8, rather than 32 bit floats (excluding Berkshire-Hathaway).  Even
with prices in pennys nowadays, 24 bits should be quite enough for a
stock price.  Similarly, a 24 bit Volume (16 million shares of one
stock traded in one day) should be normally be adequate, perhaps with
an exception list for anything that doesn't fit.  A sixteen bit fixed
point value, with suitable delta, should be fine for holding the
split correction, or 24 bits if you really want to allow for even the
most bizarre changes.  I don't know what kind of processing you are
doing, but usually one processes a small number of complete time
series, or the complete market for just a few days, so only a few
rows or columns of the complete matrix need be in RAM at any one time.



  parent reply	other threads:[~2001-03-01  7:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-28 10:44 Problems with large records (GNAT) [continued] Dr Adrian Wrigley
2001-02-28  3:13 ` Robert A Duff
2001-02-28 12:09   ` Dr Adrian Wrigley
2001-02-28  9:51     ` Florian Weimer
2001-02-28 18:35 ` Laurent Guerby
2001-03-01  8:17   ` Dr Adrian Wrigley
2001-03-01  1:58     ` Robert A Duff
2001-03-01 22:18       ` Dr Adrian Wrigley
2001-03-01 17:02         ` Robert A Duff
2001-03-01  7:00     ` tmoran [this message]
2001-03-01 21:52       ` Dr Adrian Wrigley
2001-03-01 19:32         ` tmoran
2001-03-01 19:38     ` Laurent Guerby
2001-03-02 20:32 ` Randy Brukardt
2001-03-07  2:15 ` Dr Adrian Wrigley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox