Quote from prophet:
Do you even realize what you are saying? Computational efficiency does matter when you are talking about 1 to 4 orders of magnitude improvements. Who wouldn't like to have the equivalent of 10 to 10,000 times as much computing power?
Yes, there may be a somewhat steeper learning curve. More advanced analysis always has a steeper learning curve. Significantly more complex? Certainly not. A little more complex, yes. However, none of the extra complexity matters once the basic data manipulation infrastructure is in place, and you are spending most of your time testing hypotheses, optimizing, trading the systems, etc.Quote from Sparohok:
Prophet, I'm not saying tick data is useless, I'm just saying it's harder to analyze than bar data. The algorithms and data structures are significantly more complex than using bar data. That statement holds for every single algorithm you have described.
My algorithms only convert tick data into fixed intervals for purposes of generating meaningful covariances and regularizing performance statistics into per-hour or per-day intervals. The bulk of my analysis is based on per-hybrid-tick and per-N-hybrid-tick calculations and is never converted to fixed-time until after the trading is done and I have a performance statistic and need to calcualte a covariance or Sharpe ratio.Also, as far as I can tell, your algorithms are essentially converting tick data to fixed intervals prior to numerical analysis. If, in fact, the easiest way to deal with tick data is to first bin it into fixed time intervals then once again that pretty much proves my point.
And that 10 minutes will never add up because youâll only be running 10 minutes of computation per day right? Get real. Any serious optimization over a statistically significant amount of data will take a lot of time.Quote from Sparohok:
If I have a nightly data analysis program that takes 10 minutes to run, I could care less about a 4 order of magnitude improvement. It works, it makes the deadline, and optimizing the code may not be an effective way to spend my time. Instead, I could be designing a new strategy and reusing my clean, well-designed, non-optimal code.
You misrepresent the situation. No one is suggesting all code should be optimized against future problems. Proper optimization only targets the code that matters most.Obviously there are other cases where performance matters very much. But the original poster in the thread was just starting to design their system. At that point it is madness to optimize against performance problems that may never arise.
Optimized code does not imply dirty code. Code can easily be both clean and optimized. Besides, we are usually talking about the critical 10% of code anyway... not a big deal to optimize. Leave the rest unoptimized.It is much easier to optimize clean code than to clean optimized code.

Quote from prophet:
And that 10 minutes will never add up because youâll only be running 10 minutes of computation per day right? Get real. Any serious optimization over a statistically significant amount of data will take a lot of time.
Quote from prophet:
No one ever advocated dirty code. Optimized code does not imply dirty code. Less maintainable, less conciese or less understandable does not mean dirty.
Why do you make such silly arguments? Plenty of traders are making money without any computational optimization, both now and 10 years ago. Most of us system traders use our brains to analyze and trade, in combination with available computational tools, now and then. There were plenty of supercomputers 10 years ago being used efficiently for analysis, perhaps more efficiently than any of us program our computers today. Bloat is accepted today. It wasn't then. Markets were also very different 10 years ago. There was less automation/program trading to compete against. More dumb money too.Quote from Sparohok:
Jeez... kids these days. If 10 minutes on a modern processor isn't enough to do real optimization, then clearly everyone analyzing the markets a decade ago was losing money. Too bad they didn't have Pentium 4s.
I don't know whether to congratulate you or feel sorry for you here. It's wonderful that you have found a system that requires little computational time. On the other hand I feel sorry that you are content enough with the "good money" and "10 minutes a night" to not see the potential to ramp up the testing and perhaps turn "good money" into "great money". I hope your system continues to profit into the future, because when if and when it stops working, you may blame yourself for resting on your laurels, not allocating more than 10 minutes a day for optimization, simulation, or at least exploring new markets. Are you proud of your efficiency or your efficiency plus the obvious laziness it affords you?I'm making good money with a swing strategy that runs in 10 minutes a night on an Athlon 64. In Python by the way... 100% interpreted language. Every application is different.
What code do I consider dirty? Buggy code, poorly written, undocumented and hard to read, poor designs... code that doesnât achieve a very useful balance of correctness, performance and maintainability or readability. The primary purpose of code is to do a job correctly, sometimes as fast as possible. Itâs readability and maintainability is also important, but often secondary to correctness and performance, especially in the case of optimization where the optimized code constitutes a small fraction of the total project, and can be easily rewritten.OK... if less maintainable, less concise, and less understandable code is still clean, what does it take to make code dirty?
Give me a little credit.Quote from kc11415:
marist89>...I can get 850K records out of my database of 500M records in less then a second. Of course, I run Oracle.
That sounds rather good.
May I ask:
1) Is your timing of this query fresh after the database is started? Or, is it after some of these 850K rows have had time to be accessed by other queries such that many still are still cached in the disk buffer? You're not running this query multiple times and then reporting the later/faster result?
2) You're not by chance pinning anything in memory in the KEEP POOL?
3) What's the datatype of the column(s) in the WHERE clause?
4) Are you using a hash or bitmap index for the column(s) referenced in the WHERE clause?
5) Do you have a composite index exactly matching the conditions referenced in your WHERE clause, or do you have individual indexes on each separate column referenced in the WHERE clause?
6) Are you using table partitioning? If so, do(es) the condition(s) in your WHERE clause relate to the column(s) used to specify partition boundaries?
7) Is it safe to assume that you are not using an ORDER BY clause? If so, how do you ensure rows come out in the same order on every query? Just because they are inserted in a particular order is no guarantee they will come out in the same order.
Sure that would affect performance. But if I needed to get 850K rows out real quick I wouldn't design it so that it carried a lot of DML's, now would I?
8) Do you avoid UPDATES, or else INSERTS after DELETES on this table, which can lead to automatic free space management in the form of coalescing or row migration? (which can change the order of rows)
Quote from prophet:
Why do you make such silly arguments.
Quote from prophet:
There were plenty of supercomputers 10 years ago being used efficiently for analysis, perhaps more efficiently than any of us program our computers today. Bloat is accepted today. It wasn't then.
Quote from prophet:
On the other hand I feel sorry that you are content enough with the "good money" and "10 minutes a night" to not see the potential to ramp up the testing and perhaps turn "good money" into "great money".
Sure the analysis might be valid, maybe even serious. Plenty can do serious analysis with a calculator, or all in their head. However, in a comparative sense ten minutes per day of quantitative analysis is not serious relative to what is possible with longer computational times. Analysis on 100 markets is more relevant than analysis over 1 market right?Quote from Sparohok:
To refute your silly assertion, I guess. You said that one cannot do serious market analysis in 10 minutes a day of computer time.
So? Fortunes and Nobels have been won using zero computation too.Fortunes have been made and Nobel prizes have been won using a lot less computation than 10 minutes on an Athlon 64.
Do you believe scores of software companies, quants, hedge funds and financial institutions optimize their code for the fun of it? Would they rather wait years for an analysis to finish that might only take a day with optimized code? Or why donât they just used recycled Pentium II PCs to cut costs?Not to say that I'm making a fortune or winning a Nobel prize, but it's not like I'm going to get there by optimizing my code some more.
You initially asked how people made money in the markets quantitatively 10 or 20 years ago given that I say 10 minutes/day today is not a "serious" amount of computation. I then mentioned custom supercomputer codes for quant analysis, 10 or 20 years ago, with no bloat, most of which is still advanced by todayâs standards. The point is that it has been done, and that a decent amount of computation is often helpful or essential for success. Yes there are exceptions. Plenty have done ok with just calculators, slide rules or hand drawn charts. However, anyone who attempted serious (eg multi market or tick based) analysis with primitive tools like PCs 10 or 20 years ago probably had a slim chance of success unless they had a cluster, or brought novel skills or data to the table.Trust me, 10 years ago, people were complaining about bloat and reminiscing about the old days when people wrote tight code, just like you are today. It was also at least 20 years ago, when computers were a thousand times less powerful,
What is the relevance of this? This statement seems to address the quality or form of optimization, not the quantity of computations involved.that Donald Knuth wrote that "premature optimization is the root of all evil." The more things change the more they stay the same.
Lean mean and fast canât be expressive too? Here you go again making unsubstantiated claims, ignoring all of my arguments, and portraying the issues as black or white. Why go through the trouble if the code isnât expressive and flexible? The whole point of using interpreted Matlab for 90% of my code is to achieve maximum expressiveness and maximum efficiency thanks to the optimized 10%. You never answered the point about only needing to optimize a fraction of code while the other 90% is highly expressive. It's a not a complete overhaul like you would have us believe. More like replacing a fraction of functions with optimized equivalents and avoiding deeply nested loops. How hard is that?Boy, you are making a lot of assumptions here. I'll just say that your assumptions are not correct and leave it at that.
Most programmers goes through a phase where they think about programming as this samurai art of making their code leaner and meaner and faster than anyone else's. Then, if they spend enough time writing, debugging, maintaining, and reusing code, they usually figure out that the true lasting value of code is not how fast it runs or how clever it is, but rather how expressive it is, how well it bridges the gap between human understanding and machine execution.
And you are welcome to educate me on that point. I admit I could be wrong. I really donât mind either way. It just seemed to me that anyone who says they do quant analysis, but is content with 10 minutes of computation per day and little optimization must not be terribly motivated to maintain or improve their profitability.You're welcome to call that laziness, I really don't mind.