<br><br><div class="gmail_quote">On Wed, May 26, 2010 at 4:18 AM, Thomas Baumgart <span dir="ltr"><<a href="mailto:thb@net-bembel.de" target="_blank">thb@net-bembel.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
on Wednesday 26 May 2010 08:43:44 Brian Cappello wrote:<br>
<br>
[...]<br>
<div><br>
> Meanwhile, TA-Lib provides some 150+ indicators/pattern recognitions<br>
> specifically designed and tweaked for financial market analysis. (Granted,<br>
> probably 3/4 of those can be "easily" recreated with basic algebra and<br>
> simple/exponential moving averages (and/or less commonly statistics stuff)<br>
> - but, the way I see it, why reinvent the wheel?)<br>
<br>
</div>Yep, try to avoid the re-invention path.<br>
<div><br>
> Anyways, between yours and Thomas' input and my now being able to better<br>
> understand the AlkValue class, I think I'm going to try to store prices as<br>
> QList<AlkValue> (as opposed to float[] or double[]).<br>
<br>
</div>The container class you use to store the values should be influenced by the<br>
methods you need to access them. Lists are great to iterate over but have a<br>
bad performance when you search specific values in them.<br></blockquote><div><br>Thomas, <br>Good call, I hadn't really given that much thought. Major oops, thanks! Luckily I was able to fit in a course on data structures, but, my understanding of various types of trees is significantly broken/nonexistent :( [I should probably get on that...] Dates will definitely need to be searched, but aside from finding a maximum and/or minimum, personally at least I can't see much of a reason to need to search prices/volume. [Can anybody think of one?] Having prices/volume easily iteratable at least makes time conversion/adjusting prices a snap. (And adding high/low detection to those algorithms shouldn't be hard; every value is already being walked over.) <br>
<br>Maybe dates could be duplicated by using them as keys in a map/hash that stores the list-index of each date's price data? That would still need "probing" if the user say, gave a Saturday as the start date, but that'd still be much cheaper than trying to search a list! Keying dates would also mean the most recent close should probably be stored at the end, but that's certainly possible - all the math is just "mirrored" and therefore a little more tricky (at least for me) to understand/get right. Or, maybe, some kind of tree is more appropriate... but even with my limited understanding I don't *think* that's the case? I'm pretty busy today, so it might not be until tomorrow, but I'll see what I can do to put together an initial graphical overview of the building blocks :)<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br>
> If at some point down<br>
> the road I've learned enough to be able to write code that can detect and<br>
> work with optional dependencies, then maybe I'll consider adding TA-Lib<br>
> support via a "middle man" prices holder class. [Memory just keeps getting<br>
> cheaper, no?] But, in the mean time, it's beginning to seem a little dumb<br>
> to trade off both convenience and accuracy for the possibility of future<br>
> laziness :) [Or maybe I'm missing/don't know something? I know that<br>
> happens all the time with me... :]<br>
<br>
</div>Once we know all the building blocks and see how they fit together we can<br>
think about packaging and dependencies. Some sort of graphical overview on how<br>
all this fits together would be a good start (just my 0.02).<br>
<div><br>
<br>
--<br>
<br>
Regards<br>
<br>
Thomas Baumgart<br>
<br>
GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA<br>
-------------------------------------------------------------<br>
</div>Flying is absolutely safe as long as you land as often<br>
as you take off. -- Klaus Klages<br>
-------------------------------------------------------------<br>
<br>_______________________________________________<br>
Kde-finance-apps mailing list<br>
<a href="mailto:Kde-finance-apps@kde.org" target="_blank">Kde-finance-apps@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-finance-apps" target="_blank">https://mail.kde.org/mailman/listinfo/kde-finance-apps</a><br>
<br></blockquote></div><br>