experienced prop trader details his custom Python algo trading setup

The reason why I use python, is because I day-trade using Machine Learning based models. C# is an objectively non-suitable language for that. Even "more-cross-platform" ML libraries have very poor C# support. I actually execute my trades in NinjaTrader by means of integration. I write a file into a watched folder and NT executes a trade.

I can also appreciate why an non-ML, but algo-trader would like python: it has great many libraries for anything you can imagine and then some. Of specific interest to an algo person would be pythons Data manipulation libraries that essentially combine flexibility of Excel and SQL in working with tabular and/or multidimensional data.

So my pipeline in LIVE DEPLOYMENT: IB [Brokerage + Live Data] -> [My Python Code Running night-before prepared models]-> [Produces a Trade Instruction file containing Entry Limit, Target and Stop]->[NT Reads This File through custom C# strategies]->fork here to two destinations: [1 NT Brokerage, 2 IB Brokerage]

NinjaTrader
Pros:
- an awesome charting (free)
- quick indicator development (free),
- dirt cheap commissions (I bought perpetual multi-platform license)
- Great Trade-Handling API
Cons:
- C# does not support python
- No easy way to export technical studies

IB comments:
- Good Python API for hooking into live data, reasonable data fees
- Poor Trade Handling especially if you have multiple instruments in play. What specifically weak is complexity of order/position lifecycle events (ninja is so much easier in that regard)
- Awesome and knowledgeable support that you will have to use little too much for my liking.
Sounds tight! I have a C# .NET Core ML implementation but I had to write it from scratch. It suits my needs but the Python ecosystem definitely has more to offer in terms of ML libraries.
 
Sounds tight! I have a C# .NET Core ML implementation but I had to write it from scratch. It suits my needs but the Python ecosystem definitely has more to offer in terms of ML libraries.
The fundamental difference is real support for tuples/vectors and operations on them. Many of the operations have direct counterparts in CPU/GPU and do not have parallel in C#.

I don't know why anyone would do anything ML in anything other than python.
1. In order to get proficient in ML, one had to go through a gazillion of python examples. It would take a deliberate effort not to learn it.
2. Just complete lack of anything remotely matching python ecosystem. A glaring example would be a Light GBM. Microsoft-developed ML library that does NOT have C# interface.
3. Subject matter at hand (building ML-based trading sys) is complicated enough, why make it any more difficult with exotic tools that WILL have spotty support.
 
The fundamental difference is real support for tuples/vectors and operations on them. Many of the operations have direct counterparts in CPU/GPU and do not have parallel in C#.

I don't know why anyone would do anything ML in anything other than python.
1. In order to get proficient in ML, one had to go through a gazillion of python examples. It would take a deliberate effort not to learn it.
2. Just complete lack of anything remotely matching python ecosystem. A glaring example would be a Light GBM. Microsoft-developed ML library that does NOT have C# interface.
3. Subject matter at hand (building ML-based trading sys) is complicated enough, why make it any more difficult with exotic tools that WILL have spotty support.
Python was not the right tool for what I needed. I had specific requirements and .NET Core worked perfectly.
 
Back
Top