HFT strategies for FX - anyone ?

Discussion in 'Forex' started by wintergasp, May 25, 2017.

  1. kmiklas

    kmiklas

    Yup. We can represent any price pattern as an ASCII string, and execute regular expression pattern matching algos. Its reasonably straight-forward, and C++ provides a rich pattern-matching library in the form of the <regex> library.

    This is pretty much what Citadel et al. are doing behind tightly locked doors, and is why they tend to snap up voice recognition people. The technology is remarkably similar: detecting patterns in human voices and patterns in stock price signatures.

    From "The C++ Standard Library: A Tutorial and Reference (2nd Edition)" by Nocolai M. Josuttis:

    [​IMG]
     
    #21     May 27, 2017
    mcquak likes this.
  2. Can similar be done in Python?
     
    #22     May 27, 2017
  3. kmiklas

    kmiklas

    Yes, Python has a regular expression library, but speed is usually the issue. Generally speaking, Python is slower than C++. When an arbitrage opportunity arises, the C++ algos eat through the order book, claim their profit, and slower users get stuck with the leftovers. It's annoying; you place a market order, but don't get matched until the price has dropped a nickel, and you lose your profit. Sorta like racing a Corvette against a Camry.

    However, it's not so clear-cut; network speeds and queue prioritization come into play, so Python might be viable, but unless it could be proven with robust case-studies that Python is faster than C++, I would be hesitant to use it. Python is generally used where speed is not an issue; like running after-hours reports, or for test batteries.

    Interestingly, in the perf test below, Python 3 beats C++ in the regex-redux test. I'll have to run some local perf tests to check this out myself. The other tests show just how painfully slow Python is against C++.

    Python regex docs
    https://docs.python.org/2/library/re.html

    Perf test:
    https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=python3&lang2=gpp
     
    Last edited: May 27, 2017
    #23     May 27, 2017
    justrading likes this.
  4. dartmus

    dartmus

    in my opinion,

    Citadel isn't using text expressions. They either examine the state of the logical conditions, directly. Or they use binary numbers (not binary text).



     
    #24     May 27, 2017
  5. Take a step back and see how this looks,your initial post and compare that to for example another member K.Miklas whom is asking for serious collaboration.There is his real name,institution he represents in this case himself-his is acting like a professional.

    On other hand you guys are either hit with outlier loss,because this is when people act irrational or spending too much time in Leadenhall Market ( for those from abroad this is a place in London where traders go to have a beer and chat-there is many trading firms in a vicinity)

    What you put in is what you get.
     
    Last edited: May 29, 2017
    #25     May 29, 2017
    kmiklas likes this.
  6. sdsarmad

    sdsarmad

    Hey.
    I am new here. This is my first post. :)

    Your technology cost just about right, specially considering the cross connect fees to the venues. We do have similar setup with taking and making capabilities, PBs, Venues and paying similar fees also.

    couple of questions:
    1- are you regulated?
    2- If you are not much latency sensitive, why did you bother setting up all these!
    3- RabbitMQ is not really a good option. Maybe that is why you are not seeking low latency strategies!

    Sam
     
    #26     Jul 14, 2017
  7. Surfeur

    Surfeur

    Hello Sam

    About point 3 what is the best solution for you ?

    Thx
    Regard
     
    #27     Sep 25, 2017
  8. sdsarmad

    sdsarmad

    Best solution would be a custom made.
    As an example without going much into the detail. We created something for a similar technique a C++/FIX pass through solution. we have no latency in this cross connect model. As if we are placing the trades from our own algo.
    Sam
     
    #28     Oct 15, 2017
  9. Did any-one receive satisfaction from wintergasp post - Keeping it Forex.
     
    #29     Mar 10, 2018
  10. wintergasp

    wintergasp

    I stopped reading responses to this thread as they were not connected to the initial question.
     
    #30     Mar 11, 2018