Ticks (Last Traded Price) ... float or double?

Discussion in 'App Development' started by abattia, Mar 25, 2013.

  1. Makis

    Makis

    Are you on something? I never mentioned C or C++ or C# or any other language ranking on the C thread. And most certainly I did not admit any language is ranked bellow any other language.
     
    #41     Apr 10, 2013
  2. Makis

    Makis

    I do not know how, but I can live with that. But as a service to other members watching this thread, can you name a single exchange feed that distributes floating points?

    You couldn't have just made up "Most direct exchange feeds also use floating point price data. Saying all use integer type feeds is factually wrong." , right ?
     
    #42     Apr 10, 2013
  3. Let it go Makis...

    FYI Just got a call from a client running into significant errors using floating points directly relating to this topic. He was dumping his recorded trade data into excel and using conditional formats comparing prices for post analysis.

    Banging his head against the wall on why 2.58 wasn't lighting up a match against 2.58 from the trade data.

    Low and behold the underlying comparison was 2.58 against 2.58012012012...

    This was an easy fix as it wasn't buried in code somewhere and visible once he dropped the cell formatting. If this was buried in code he'd still be scratching his head.

     
    #43     Apr 10, 2013
  4. Makis

    Makis

    right, greater than or less than conditionals may hide such bugs, but when testing for equality it blows up.

    Using floating points, specially across different platforms is very dangerous due to the fact that there is no standard of how to represent them.

    Different combinations of hardware and os may use different formats to represent the same floating point number.

    Even the IEEE 754 standard which attempts to standardize a floating point format, failed to address hardware and different 'endianness'.

    The rule of thumb is, unless someone plans to always work on a single architecture (hardware+OS) then converting to integer is the safest way to go, not so much for performance, but for data integrity.
     
    #44     Apr 10, 2013
  5. hftvol

    hftvol

    which is your argument why all pricing data should be converted to integers? You can't be serious...;-)

    Btw, why do you cite a moron who can obviously not read? I responded to his exact inquiry several times now and he still asks the same question. He is on my ignore, I have answered all questions and made my point clear. I just learned to screen people much more thoroughly than ever before hiring anyone in the future. He claims he even worked at Bloomberg and still insists B-Pipe converts to integer types. What a moron and blatant liar.

     
    #45     Apr 10, 2013
  6. There is no argument...

    Just a practical example of real life stuff that goes wrong.

    Don't really understand the point your trying to make.

    Build out a few 100+TB historic data repositories and support
    clients and their mismash of apps and you may see things differently.

    Congruity and consistency across platforms is pretty important especially for enterprises.

    If your after ultimate performance on an isolated basis there will certainly be better ways to skin this cat.

    This is really a foundation issue... fundamental data structure and once decided on and implemented its pseudo cast in stone.

     
    #46     Apr 10, 2013
  7. misaki

    misaki

    I think he mistook you for me, although I didn't mention anything about C/C++ being superior either - think he mistook me for the threadstarter of that thread too - he just created that strawperson out of nowhere and started going way out of tangent and talking about SO language popularity or something. This guy has an axe to grind with everyone. And he's clearly neither hf nor vol, just a huge wannabe; so I'm advising that you should just leave him alone.
     
    #47     Apr 10, 2013
  8. hftvol

    hftvol

    fair points in an environment that has to be cross OS and hardware compatible.

    However, this does not apply to most investment banks or hedge funds. Choice of OS and hardware was decided early on and there are either Linux apostles or hardcore Windows believers, which is obviously also a function of the tasks at hand. What often happens, however, is that the back end runs on Linux machines and the UI is served on a Windows server (but even that is a dying breed, I would say more than half of the top 10 investment banks run their DMA algos on Windows boxes). However, having said that I would not consider anyone an experienced developer if he/she had to convert every last floating point value into an integer just to assure it sails safely from a Linux machine to Windows or vice versa.

    I am getting the impression you are implying that every calculation that is based on floating point value types is inherently inaccurate to the degree of getting the result wrong. I believe that most shops DO NOT convert their floating point value types to integer types and they still trade and make money. I cannot prove this belief but its an extrapolation from empirical observation and from what I hear.

    P.S.: I was obviously limiting my comments re investment bank hardware environment to the DMA algo teams, I am well aware that each large banks struggles with more programming language implementations than languages even exist, and so many hardware platforms that its impossible to consolidate unless the budget is unlimited which is a far cry from reality.

     
    #48     Apr 10, 2013
  9. hftvol

    hftvol

    no I did not. Here is his quote. He never mentioned C++ or C# in the C thread? And he did not suggest he believes C# is ranked higher on SO? Someone is senile here and its not me, I wonder how old the guys are who talk a lot about Cobol and Fortran....

    "04-10-13 12:44 AM
    I cannot understand how this thread ended up on SO language popularity. I never checked but I would assume C# is more popular on SO... just a feeling.... it is used more by novices and non professional programmers that would reach out for online help.

    Both C++ and C# have their place on the market. I would never write a low latency trading system in C#, and I would never write the user interface to the trading system in C++.

    Since this thread is hot, lets add another dimension.... Linux or Windows...... just joking :)"



     
    #49     Apr 10, 2013
  10. misaki

    misaki

    ;) What's wrong with Fortran?

    Look, I disagree with most of what you say but at least you try to explain yourself, so I just want to end our grudge here as it's unproductive.

    Peace.
     
    #50     Apr 10, 2013