CL vs. K/KDB or efficient analysis of financial time series



Folks,

Suppose I have a stock price time series of a million or more entries.
I'm looking to backtest a trading strategy over all these price points.
My strategy would only need, say, 400 points at a time so I would need
to have a sliding window where the first point is always dropped as I
move the window forward.

What is the most efficient way of implementing this with Lisp? Would
the series package help?

I'm being as non-technical as possible on purpose and I'm avoiding the
issue of how to store all the data.

Basically, I evaluating different technologies for implementing a
short-term futures trading platform. The original post is here:
http://groups-beta.google.com/group/uptick/browse_thread/thread/bf733a1f3f3a2e38

I was looking at http://kx.com/papers/kdb-tickdemo.php which tells you
that

"Kdb achieves this kind of efficiency because of its design. It is
fully vertically partitioned and replaces tables by ordered arrays. For
this reason, moving averages, correlations and other such queries can
be done directly in the database."

I'm wondering if it's possible to achieve with Lisp the kind of time
series analysis performance that K achieves with KDB. Apparently,
simple table scans on over one billion trades (e.g. select max price
from trades) can be done in less than a second with K.

Thanks, Joel

.



Relevant Pages

  • Re: CL vs. K/KDB or efficient analysis of financial time series
    ... >I'm looking to backtest a trading strategy over all these price points. ... >from trades) can be done in less than a second with K. ...
    (comp.lang.lisp)
  • Re: recommendation for brokerage
    ... X number of shares at X price, they are all filled at the same price on ... Carolyn wrote: ... trades through. ... looking for an online brokerage to trade stocks and stock options. ...
    (misc.invest.stocks)
  • Rob the casinos legally
    ... A great way to scientifically beat the option market with contained ... If you want to make money during this time, ... to trade between +5% and -5% of its current price in 87.5% of the ... this technique will make you money 87.5% of your trades! ...
    (rec.gambling.craps)
  • Rob the casinos legally
    ... A great way to scientifically beat the option market with contained ... If you want to make money during this time, ... to trade between +5% and -5% of its current price in 87.5% of the ... this technique will make you money 87.5% of your trades! ...
    (rec.gambling.poker)
  • Rob the casinos legally
    ... A great way to scientifically beat the option market with contained ... If you want to make money during this time, ... to trade between +5% and -5% of its current price in 87.5% of the ... this technique will make you money 87.5% of your trades! ...
    (soc.culture.singapore)