New trading platform collaboration C# .NET, anyone?

Discussion in 'Trading Software' started by cjdsellers, Jan 8, 2017.

  1. Hello all,

    I've read this forum for years but this is my first post.

    For the past 12+ months I've been coding my own trading platform in C#, this will be the proprietary software I use to shift into money management professionally (that's the goal). Basically the platforms on offer at the moment are either inadequate for my needs or involve expensive annual licensing fees. I love what the QuantConnect community are doing however I'd prefer a GUI interface and FIX. MT4 is out for so many reasons, NinjaTrader is looking good however you can't submit a stop order along with your pending entry (ELS), no FIX. Modulus M4 and AlgoTrader look like nice packages but I'd prefer to go the 'in-house' route. Plus I do love to code!

    Very short background I've been trading algorithmically/quantitatively for over 5 years and coding for longer, however only 3 years with C#.

    A few key points. I'm utilising Agile principles, source control with Atlassian Source Tree (bit bucket), currently developing the DDD domain model with an event based architecture looking to leverage the Akka.NET reactive messaging patterns (actor model).

    I've completed the indicator module, market data objects, portfolio manager module, alpha model module/signalling, a 'BlackBox' module which is an object module which ties a trading instance for a symbol together, and some other utility static classes and infrastructure projects. It's loosely coupled with all interfaces living inside Nautilus.Core (I'm calling it Nautilus at this stage).

    Using QuickFIX for the FIX4.4 connection to FXCM and later to include IB.

    Using SciChart for charting (I own a license), looking to incorporate Reactive Extensions for the WPF GUI.

    Will be developing a Risk Manager module to help oversee the position sizing algos and for check sums.

    NLog for logging.

    The other part of this app involves a 'studio bench' for developing the alpha model rules using machine learning and ANN's. Looking to use encog3 and Accord.NET here.

    Obviously there's far too much for me to cover here however that's a very broad overview of where I'm at and where I'm heading. I feel that collaborating in some way would be highly beneficial for both the collaborators and myself (as I'm sure there are others who share the same goal as me), the other option is to move to open source however any salable IP potential is then lost (it would be nice to retain that option at this stage).

    Looking forward to anyone's feedback here or if you'd like to reach out for further discussions please PM me.

    Thanks everyone!

    Cheers
    Chris Sellers
     
    Last edited: Jan 8, 2017
    smcoder, Jason Rogers, fan27 and 3 others like this.
  2. Zzzz1

    Zzzz1

    Very interesting, thanks for sharing. I have an almost identical platform that I wrote myself in C#, including Scichart, a self written binary database, and so on. Main difference is probably that my architecture is already 100%event based and that I don't like reactive extensions much, I am a big fan of TPL dataflow (need to reference it externally as it is not part of .Net). I also designed everything around a server - message bus - client sort of model with a server frontend (Ui) being one of the clients.

    I am happy to share thoughts but I don't think i will be collaborating with you on your project as I have my own architecture and don't find it productive or necessary to acquaint myself with another near identical concept.

    You described what you have but somehow i missed reading what you still look to add.

     
    cjdsellers likes this.
  3. Thanks for the reply Zzzz1,

    Your app sounds awesome, especially the binary database. Do you have much experience with Akka.NET and the actor model? I'm definitely preferring it to ReactiveX at the moment (some devs even use it for the GUI too). Some people have used Nesper, NServiceBus or MassTransit however Akka seems cleaner, lighter, faster and more robust to me.

    I'm working on the event based domain model at the moment (the bread and butter!), once that's implemented it will be able to backtest and run live from a console. So clearly I 'need' to develop a slick looking yet clean and simple GUI (who else loves the Nvida GeForce Experience GUI!?).

    Also all market data is downloaded from the broker and held in memory as <Bars> in a <BarStore> within a <BlackBox> (I don't work with tick level data at this stage), so I need to develop the persistence layer... looking to go NoSQL mongoDB for that at this stage. So the overall architecture is really data in, orders out/modified/cancelled via FIX.

    My overall premise is "as simple as possible, but no simpler" because simple = Less time to deploy and more robust. Features can be added later in sprint iterations as needed.

    How long have you been developing and running your app for? Which brokers do you connect to if I may ask? And are you running this in some kind of professional capacity?

    Thanks again,
    Chris
     
  4. Zzzz1

    Zzzz1

    I have no experience with Akka or actor models. Maybe you can take a look at TPL dataflow (http://blog.stephencleary.com/2012/09/introduction-to-dataflow-part-1.html), it is a very interesting concept and works very well when it comes to event processing. For messaging I use Redis, which was originally designed to be a key/value in memory db but also offers messaging features that are very fast and lightweight.

    It sounds like you still have some work to do regarding OMS (order management system), the entity that processes your orders and fills, positions, and risk?

    I started designing my architecture in 2011 and it has since then evolved and improved a lot. I made the mistake initially (as shared in another thread) that I over engineered the initial architecture and I had to take out some of the complexity in order to get up and running. Only after my first algorithms went live did I start again to add more features. Initially I could only submit exchange/broker supported order types. Now I split orders into parent/childorders in order to deploy my own execution algorithms (dma like) that split child orders off the parent order in order to submit orders as prescribed by the execution algorithm. This gives me tons more flexibility to leg into/out of positions and the like. I connect via two prime brokers to their liquidity pools as well as a number ECNs in fx space, as my current focus is exclusively on currency markets, spot as well as derivatives.

     
    Simples likes this.
  5. gkishot

    gkishot

    Forgive me my ignorance, but I am not sure what's the purpose of your work? Is it for your personal needs or you want to sell it for others to use it?
     
  6. Thanks again for your reply,

    I'll read this TPL dataflow article with interest. You're right about the OMS, I've developed reasonably sophisticated systems in MT4 and NT8 however this will be on another level. It'll have a lot to do with the architecture of the domain model, and how I'm going to handle the event bus and messaging etc, how to integrate the FIX messages. the other major area of work I haven't mentioned is the persistence layer. RavenDB is looking quite good for this, Redis also looks excellent and the messaging capabilities are definitely of interest to me. I'm not looking to capture my own market data.

    Currencies are also of heavy focus for me, as are some commodities and stock index CFD's, I don't currently trade account sizes large enough to support full futures contracts with my units per position and fixed risk volatility adjusted position sizing model.
     
    Zzzz1 likes this.
  7. The main focus for me is trading, not becoming a pro software developer as such (even though trading algorithmically these days almost demands you become one) and so the primary goal of my work is to achieve my goal of a proprietary trading platform. I figure there are others out there in the community who have exactly the same goal as me - which is why I'm reaching out. If I was to collaborate or open source at this stage I wouldn't be attempting to sell the application and complicate matters. Hope this clears things up.
     
    Zzzz1 likes this.
  8. InvBox

    InvBox

    Do you have some repos? Will interesting to review it. Can help to collaborate. Has 5+ years C#/trading.
     
    cjdsellers likes this.
  9. gkishot

    gkishot

    How do you trade your algos so far?
     
  10. tommcginnis

    tommcginnis

    I must say.....
    every now and then, I catch myself in Life's Mirror (like, on a Friday night, when I'm excitedly tweaking my latest massive-ass table-chart-graph thingie, *maybe* with a glass of IPA in my hand, maybe _not_.....), and I find myself thinking,

    "God, Tom! You are such a *nerd*!!!"

    And at that point, I usually take a sip of said beerage, and continue on.

    Readying over this thread....... well, you remind me that I'm down here
    {right hand held horizontally at mid-thigh}
    whereas you guys are more like here
    {left hand held similarly at shoulder height}......

    Awesome work, guys.

    Thanks for letting us peek in.
     
    #10     Jan 9, 2017
    cjdsellers likes this.