Anyone coding in Assembler?

Discussion in 'App Development' started by braincell, Feb 28, 2012.

  1. jcl

    jcl

    Coding in assembler is effective when a large part of the performance depends on a very small loop. It then certainly makes sense to integrate an assembler loop in the code of your project, no matter how fast your hardware is.

    But this is normally not the case for trade algorithms. Their inner loop is not small, but usually performs a lot of calculations, and it would be quite clumsy to code all this in assembler. It would make more sense to use a GPU for this. This is much faster than assembler and can be coded in HLSL.
     
    #21     Mar 11, 2012
  2. ASM is no question the way to go to produce the fastest code, but I think you forget over all your ASM excitement that this industry does not optimize for speed but PnL. Most users were absolutely right that it is much more efficient, cost management wise, to throw more hardware at an algorithmic/data mining problem and coding in a higher level language than risking to run on a language that makes it very easy to introduce bugs that can be incredibly hard to debug. To my knowledge hardly anyone on the hft side touches assembler.

    I find discussions such as this really miss the key point of algorithmic trading which is the actual strategy. Data mining and machine learning are hopelessly over-hyped when it comes to profiling, testing, and implementing new profitable trading strategies, no matter in what time frame. I see this every single day: It is incredibly easy to come by highly talented programmers, PhD level physics grads, statisticians and mathematicians. Unfortunately you are still short of a strategy that holds up to changes in market dynamics simply because those without years of trading and risk management skills simply lack the know how what works and what might not work. They believe you throw in couple fancy algorithms that crawl through heaps of tick data and voila... out comes a profitable trading strategy. Nothing could be further from the truth, at least from what I witnessed within my 14 years of financial market exposure.

    There are guys without high school diploma who run whole trading desks at an MD level and there are people who run on self-written algorithmic trading platforms strategies that make a very decent living in mid-to-long frequency space. There are tons of extremely smart guys who make tons of money in this market but they all share a common trait: An intricate level of knowledge of mass psychology and how it applies to price finding and deviations from fair value at times of stress. On the other side have I hardly ever seen or met a programming or math guru who proved equally successful in trading. So, such people now pull low level programming languages, scripting languages, machine learning and all the other academic arsenals out of their shirts in the hopes to still catch the train without actually seeing they are attempting to get on the completely wrong train.

    Often the dirtiest platforms, with tons of patches and upgrades applied on top of each other make the most, and that is the PRECISE reason decision makers refuse to re-invent the wheel and rewrite everything so they can claim a beautiful code base. Beauty, elegance, and programming sophistication are not guaranteeing a single penny, at the very least they are a small part of the overall deal.

    I recommend you go and get a drink and rejoice you possess great assembler programming skills but you may want to reassess what you really want to do with it, programming skills alone dont get you anywhere in this particular industry. Maybe you want to refocus and concentrate on writing elegant code for people who appreciate elegant code, people with allocation decision making power to channel hundreds of millions of capital definitely are not your target.

    Just my 2 cents....




     
    #22     Mar 11, 2012
  3. ...to add to this: Without going into much more details of why the trade offs simply do not merit to consider assembler a viable alternative to C++ in most cases when it comes to hft algorithm and systematic architecture platforms: Several others also pointed out that the bottlenecks at the moment have been boiled down to network transmission throughput such as transporting a byte array over a message bus from a publisher to a client, or routing speed, or the very decision making algorithms how, when and where to route orders given there are competing exchange venues. I cannot agree more with that. Assembler won't solve any of those challenges.

    Summary: If you understand market dynamics, changes in micro market structure and how to profit from it, if you understand asset inter-relationships and how dislocations in cross asset correlations can be identified and profitably utilized then you understand that it does not matter whether you write your strategy in assembler or c++ or C# or Java. If you reach the limits and identify that there are efficiencies to be had by moving from one language to another because you may, for example, like to scale your asset coverage from 100 stocks to 5000 names then all the power to you: Your assembler skills may come in handy. But you gave the impression away that you lack a whole lot of other skills that are needed to actually get to that point.

    Nonetheless, good luck to you in making the right choices for yourself.


    Just my 2 cents.... [/B][/QUOTE]
     
    #23     Mar 11, 2012
  4. it makes ZERO sense, fully agree. It comes down to the never ending confrontations between coders and quant traders: Beautiful and efficient code vs speed of development, scalability, readability. Unfortunately (for the coders) its generally the traders who make the decisions because they sign responsible for the risk and generated PnL. If I get back to an algorithm 3 months later and had to spend half day arm in arm with 3 assembler programmers just so we understand what they have coded up in order to make slight changes to the code then I would bang their heads against the wall and curse the day I was born. Completely unfeasible!!!


     
    #24     Mar 11, 2012
  5. ssrrkk

    ssrrkk

    Thanks for your insights from an insider perspective. I would like to ask then why do the big banks and hedge funds keep hiring physics and math phds? It must mean that although they don't possess the necessary market insights (which is of course not expected of them fresh out of grad school or post-doc'ing), they must have valuable skills to translate those insights into practice and profits, or am I wrong?
     
    #25     Mar 11, 2012
  6. Thanks for the post. It certainly made me think because i see your point(s).

    My current assumption is that: with enough of math and statistics and whatnot, the "mass psychology" which is the key as you put it, might just be discovered with creative machine learning. It takes a little bit of something extra to figure out and test if the machine found a "fundamental market truth" or just a curve fit, but that's another discussion on it's own (i could write 100s of pages). I also know for a fact some fairly successful traders profited from machine learning, though i do believe they weren't as good on average as some of the people without high-school education you mentioned.

    I am mostly excited about ASM because i am still a retail punter with only a dozen K of $ at my disposal for research. With ASM i don't need to rent a cloud worth 1000s of CPUs, instead i can cut my costs down to 50 or so (transition from a very high level language to asm). For me, that matters. For the industry, i'm sure it doesn't.
     
    #26     Mar 11, 2012
  7. byteme

    byteme

    Rackspace Cloud: 1.5 cents p/h => $15 p/h for 1000 CPUs.

    How much is your time worth? $100 p/h?
     
    #27     Mar 11, 2012
  8. Firstly, I think it's 15 cents, not 1.5. So it comes out at around $150 p/h.
    Second, the above wouldn't be so bad but, did you look into what kind of CPUs they are offering? Maybe it's something like a single core of a Pentium II with 128 MB ram? Yeah it's usually something like that, and sadly that equates to no cost efficiency. Maybe they upgraded recently though.
     
    #28     Mar 11, 2012
  9. they hire such talent to solve quantitative analysis and pricing issues, not to run trading books or sign off a book in the hundreds of millions on a daily basis. I know exactly one(!) desk head who has got a Phd in astrophysics. All others usually get stuck on the exotic derivatives pricing side or similar intellectual excitements. Most funds exclusively hire such academicians into research functions and not trading functions. Most of the time...(there are exceptions...)

     
    #29     Mar 11, 2012
  10. I may be old school already, being already in my 30s, but I do not believe one discovers profitable strategies in bits and bytes (though I program on a daily basis and need to understand in detail what other programmers, who work for me, are doing and how to plug all the sauce together). Dynamics in the market place are found, identified and harvested through years of actual trading experience, feeling the pain when a position goes against you, feeling the urge to take off a position when you reach a certain target but know you should keep it running. There are tons of tasks that need to be quantified and that can be quantified, a great job for algorithms and quants. But: I claim the heart of most strategies is identified and profiled by those that really understand risk/reward, how other market participants react to certain news or market price dynamics. Example: For a statistician a 30% draw down may be well justified if a strategy generated returns north of 50% and if other risk metrics were supportive of the seemingly favorable risk/reward profile: However, funding may have been long withdrawn or the head may have forced a closing of the position long before the draw down to the tune of 30% materialized, something the statistician may have no awareness of. Its a very simplified example but I think you get the point. Continuously changing market dynamics guarantee that not a single strategy that has ever been identified through machine learning algos makes it through its life cycle without adherence to all the other variables of which the change in dynamics is a function of.

    Please do not get me wrong: I did not say a trading desk is not the right place for a math or physics major. What I do say is that I witnessed a lot of academicians that display what I would call "academic arrogance" and who utterly failed in coming up with a single strategy that could break even after transaction costs. They are great at researching time series, identifying cointegration, they can set up great multi factor models and run PCAs that look very impressive. Did all that contribute to the bottom line? Not much if you ask me....I myself graduated from one of the top schools in quant finance a while ago and I never understood this whole school pride, I got the impression a hell of a lot of people went through those programs because they felt inadequate and needed something to feel great about themselves. Now they accomplished something and can rely on, after all not everyone gets into and through a rigorous quantitative grad school program. I myself worked myself up from the very bottom before I entered grad school and I always have the most respect for self-made geniuses who focus on the now and tomorrow rather than those who cling on to past accomplishments.

    In summary, you limit yourself if you believe every problem in this world can be solved through bits and bytes ans mathematical functions. It may be true but sometimes the problem at hand can be much faster and much more profitably solved through other means. ...

    You sound like a talented programmer. Why dont you try to get your foot in the door of some hedge funds or sell-side firms to consult for them or sell some optimized algo engines? It sounds it may be a much better fit, but its for you to decide.






     
    #30     Mar 11, 2012