<br><br><div class="gmail_quote">On Wed, May 26, 2010 at 4:18 AM, Thomas Baumgart <span dir="ltr">&lt;<a href="mailto:thb@net-bembel.de" target="_blank">thb@net-bembel.de</a>&gt;</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>
&gt;  Meanwhile, TA-Lib provides some 150+ indicators/pattern recognitions<br>
&gt;  specifically designed and tweaked for financial market analysis. (Granted,<br>
&gt;  probably 3/4 of those can be &quot;easily&quot; recreated with basic algebra and<br>
&gt;  simple/exponential moving averages (and/or less commonly statistics stuff)<br>
&gt;  - but, the way I see it, why reinvent the wheel?)<br>
<br>
</div>Yep, try to avoid the re-invention path.<br>
<div><br>
&gt; Anyways, between yours and Thomas&#39; input and my now being able to better<br>
&gt; understand the AlkValue class, I think I&#39;m going to try to store prices as<br>
&gt; QList&lt;AlkValue&gt; (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&#39;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&#39;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&#39;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&#39;s price data? That would still need &quot;probing&quot; if the user say, gave a Saturday as the start date, but that&#39;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&#39;s certainly possible - all the math is just &quot;mirrored&quot; 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&#39;t *think* that&#39;s the case? I&#39;m pretty busy today, so it might not be until tomorrow, but I&#39;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>
&gt; If at some point down<br>
&gt; the road I&#39;ve learned enough to be able to write code that can detect and<br>
&gt; work with optional dependencies, then maybe I&#39;ll consider adding TA-Lib<br>
&gt; support via a &quot;middle man&quot; prices holder class. [Memory just keeps getting<br>
&gt; cheaper, no?] But, in the mean time, it&#39;s beginning to seem a little dumb<br>
&gt;  to trade off both convenience and accuracy for the possibility of future<br>
&gt;  laziness :)  [Or maybe I&#39;m missing/don&#39;t know something? I know that<br>
&gt;  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>