Hi, Ive been a professional trader for about a decade but feel in order to keep with the times I really need to make the effort and start exploring the world of algo trading. Its benefits are clear. Ive built "systems" on CQG and Tradestation in the past but want to use a more universal language. Knowing a few guys in the algo/fund world Python seems to be the way forward. I was hoping to get your advice on best way to start. Im following the Codeacademy Python course and picking up the basics. But theres only so many times I can print "hello world" or change "parrot" from upper case to lower case. I still have no understanding how I can start applying this knowledge to trading. I really learn best in a way that is vocationally and solving a problem i am interested in. So a couple of quick questions... 1/ how do you get your code into a trading environment? To take Tradestation for example, you write your code into a box and and it is being updated onto charts, giving you backtest results etc in real time almost. How does writing something on Idle or Notepad++ translate into complex charts? How does it translate basic code into charts and backtest results. 2/ CQG/Ninja Trader/Tradestation and other retail backtesting platforms have a trading vocabulary of keywords saved in its library such as "long, short, buy,sell, daily high" etc. Again, just writing in Idle or Notepad++ do you have to explain all these values to it? I guess both these questions are "is there a trading environment to start coding into like CQG but instead of using its basic language it uses Python?" All the YouTube vids/websites are so generic in their advice. Is there anywhere that specifically helps people to learn Python in a trading environment, forums/courses/software etc? Any other tips on where to start? Thanks
The only way to really learn how to be a good software engineer is through experience. Fortunately, there's not much that you really need to know to start writing software. So you could buy a book, but personally, I'd start here: I recommend doing the homework assignments. There's probably some other lecture series that's Python specific.
Thanks ET will give the video a watch. But am still confused. Is there a software platform to write code for trading system? I don't see how writing code on notepad translates into charts and trading data
If you're using Notepad, or any other text editor, as a base you're gonna have to make your own trading platform. If you're unsure of even what you're trying to accomplish, I cannot recommend that, as progress will be slow with lots of pitfalls and blind alleys. Two recommendations: Install free version of Ninjatrader. It's C#, which is a true general-purpose language. Not too hard to learn. You can do almost anything within Indicator or Strategy code, and at the same time you get a trading platform as environment around your code. Formulas in Excel is pretty powerful, so download OHLCV-data and play around. Not general-purpose, but very nice in order to test formulas. If you want to accomplish anything of value, you need to be clear what you want to accomplish and what value it'll bring on the table. Then the how will be easier to see.
https://www.quantiacs.com https://www.quantopian.com https://www.reddit.com/r/finance/comments/3g6bex/algorithmic_trading_and_finance_with_python/
I think Ninjatrader is probably a good place to start for the retail investor. Perhaps consider MultiCharts. It's been a while since I looked at either, but they are both based on C# and I'd recommend Visual Studio as an IDE. You can download Visual Studio Express Edition for free to get started. Personally, Eclipse is my favorite IDE. I use Visual Studio at work and Eclipse for trade system development. Eclipse with Java is hard to beat. I suspect the guys using Python are developing their own trade system based on a proprietary in-house platform.
Thanks a lot guys. So in summary, if you want to build your own coded system in a language more advanced than a point and click Gui i can't do that in Python without having to build everything from scratch? In terms of what I am trying to accomplish I'm a professional day trader. But I think a lot of very short term market structure trades I do can be coded into a systems. I also want to backtest new ideas. Ideally I am talking about sub minute time frames and most retail backtesting platforms don't allow that level of sophistication. I'm looking to be a little more complex than just a moving average cross on a long term time frame. I had a look at ninja trader before and they had issues with intrabar granularity. So if I had a near by profit target (2 or 3 ticks) that was triggered on the same bar I got in on it would always assume i got it giving unrealistic back tests. This is because it wouldn't look inside the bar and recognise on this occasion the stop was hit before the target or vice versa.
Check out the websites I posted. Quantopian is web based, free, and has back testing capabilities. It also has a community with a lot of code. I ran into the same limitations that you described above with respect to Ninja and tradestation. The websites I posted use python as the language. Another great alternative is Amibroker. I haven't coded anything in amibroker so I am not familiar with any limitation. https://www.amibroker.com
No problem. This is a pretty good article that you should read. BEST PROGRAMMING LANGUAGE FOR ALGORITHMIC TRADING SYSTEMS? Below is another option. http://gbeced.github.io/pyalgotrade/#