Is there a to-go design of algo-trading system?

Discussion in 'Automated Trading' started by xappppp, Jun 27, 2020.

  1. xappppp

    xappppp

    I mean not from strategy perspective, but from program design/operating perspective.

    I just start on this route, but very uncertain about what is a good practice. By googling I get some information similar as picture below.

    Hope someone can help.
     
  2. fan27

    fan27

    Looks about right. What are you hoping to accomplish?
     
  3. xappppp

    xappppp

    I want to know details about how a order is placed and position is managed and data is flowed through in a fully automated algorithm

    Is there any good github project like this?
     
  4. 931

    931

    Could offer few tips on automated trading system architecture but it would require having more information to help with specific idea.

    First tip is: Make a kill switch on some specified level of drawdown or however you prefer.
    I included a remote kill switch for smartphone also in remote system monitoring app.

    Also id recommend writing log to disk about all actions with precise timings about communication to broker , delays etc.
    It could be visualizable log or just readable text.
    By visualizable i mean it can visually reconstruct events that took place on chart for later evaluation.


    It depends on what sort of order you will use.
    Also depends on receiving end and their systems.

    Best if event driven concept.

    What i do for pending orders is.
    Place->receive confirmation->add order to list for managing,log fill conditions and timings ,alert/log to phone etc....
    Place->fail->check conditions->retry or abort...
    Place->connection problem->retry for period->alert to smartphone...
    ...


    In performance critical parts id or use interconnected code instead of object oriented to make it flowing faster.(But its sometimes harder to debug and much harder to place sources in other projects without altering).
     
  5. xappppp

    xappppp

    Thanks for the tips: Here is my more rudimentary questions given there is a lot of stuffs there, I feel a lot concept maybe very basic in app/system development but still very foreign to me.
    1. what is event driven concept, what's the best way to construct process around event driven and how to manage event.
    2. how a log/list is managed in what kind of data structure (a simple list is okay?). I'm assuming to use different lists to record the transition of a order in different status, but would it be stable? what if I re-start the system and then the data are all gone or expires?
     
  6. 931

    931

  7. xappppp

    xappppp

    I think this is the bone/skeleton I want after. But this is very abstract concept. Is there more detail/actual approach to implement such architecture? Thanks!
     
  8. 931

    931

    Dont know what your goal is, so cannot help with architecture either.
    Dont look for block diagrams , focus on your idea and go from there.

    IMO if someone has opensourced something algotrading related on github(and most code was already made, and no updates),it might simply mean, it didnot work out well for them, and they posted sources as experience to share for getting jobs etc...

    In other words software developer who can build great architecture might not discover great strategies.

    But if in the beginning, goal was to build it for self , the github project probably will have very poor documentation if any...
    Developers can work much faster if no documentation is made.

    If your goal is to build trading system from ground up , just start somewhere and build it around your requirements.
    (also great if you can keep the code flexible for future plans)

    Historical data loader and visualization for example might be useful if you plan to test on historical data.(at least thats where i started)
    Next testing environment, for repeating history to your strategies...

    If you already have working strategy that needs no optimization , improvements or any testing. Could skip those and connect your idea to markets.
    Latter is much easyer to do unless your idea involves more code than all the supporting stuff for testing.
     
    Last edited: Jul 3, 2020