Numerical Python question
2mc
mcrider at bigfoot.com
Sun Oct 12 17:52:53 EDT 2003
mertz at gnosis.cx (David Mertz) wrote in message news:<mailman.23.1065946432.2192.python-list at python.org>...
> I'm not sure exactly where in the array the various highs and lows are
> stored (different rows?).
I apologize for not making this clear. If an array were to be viewed
as a spreadsheet, then rows would be individual days and columns would
be date, open price, high price, etc.
> But in general, an average is 'sum(highs)/len(highs)'. The version of
> 'sum()' in Numeric will work a lot faster though... although it makes no
> difference for 10 prices. If you start worrying about a million prices,
> you might see a significant boost using Numeric.
Assuming the entire daily price history of the Dow Jones (all of last
century through today), finding the 10 day average for each day would
*not* work significantly faster with Numeric? What if I were doing
the standard deviation of price for 25 days and I wanted this done for
each price - open, high, low, close? Still no speed enhancement of
any significance?
> I have an intro article on Numerical Python forthcoming at IBM dW. But
> the manual for Numeric is quite excellent to start with. Still, the
> package is probably overkill for the simple and small operations
> mentioned.
>
> Yours, David...
I have been reading the manual. I'm still working to get the cobwebs
out of my mind - which are the ways I did things in the other language
I used.
Thank you for your input. And, I look forward to any further comments
my clarification may elicit. Thanks.
Matt
More information about the Python-list
mailing list