Another Backtesting and live-trading framework: F4
This looks really good but I think I may just stick to the path I am on with Backtrader. This does fit a lot of my needs but this was sent over.
- The only framework that simulates swap charges in backtests using historical interest rates.
- The only framework that refactors the market data for different time zones. This is a huge problem with other FX trading platforms, but nobody seems to realise it. Different brokers structure their market data in different ways according to different to time zones, which means that strategies developed for one broker may have much worse performance on another broker. The F4 framework takes care of this automatically and ensures that the results are reliable no matter what data source/broker you are using.
- The majority of the core framework is written in C (with some modules in C++), which of course means it’s extremely fast. The framework is compiled into a dynamic library that is then loaded into various front-ends. For example, there is a Python front-end called the ‘NST’ which facilitates backtesting, and there is another Python front-end called ‘The Asirikuy Trader’ which, unsurprisingly, allows you to connect to various brokers for live trading. You can even call the library from Metatrader 4 (and possibly 5). I’m not sure why you’d want to (I think MT4 is terrible), but at least it’s an option.
- On the topic of brokers, you can hook into either the Oanda v20 API or the Dukascopy JForex API. Both of these are already implemented.
- It ships with an extensive machine learning library based on Shark (http://image.diku.dk/shark/), which allows you to trade a huge variety of ready-made ML strategies, or you can of course code your own into the framework. Asirikuy does a lot of research into supervised learning and reinforcement learning; the forum contains loads of useful information in that regard.
- With the membership you get access to 1 minute data for 21 currency pairs going back to December 1986. This data is from a company that provides data to brokers. It is not usually available to retail traders, but Daniel (who runs the website) has negotiated a deal for the community since his friend works there. This data is updated every weekend and, in my opinion, justifies the 194 USD per year all by itself.
- Multithreaded simulations using OpenMP.
- Multithreaded live trading.
- Multi-node optimizations using MPI.
- Brute-force and genetic optimization of strategy parameters.
- There are quite a few more advantages (like GPU data mining software, a variety of portfolio optimization and analysis techniques), but I don’t want to waste any more of your time 🙂
- It is a pain in the neck to install. It’s fine once it’s up and running, but it can take a while to get all of the dependencies installed. That being said, the customer support offered by Daniel is the best I have experienced anywhere. He will do anything and everything to help you out, and he usually responds in a matter of hours.
- From your videos I know that you’re interested in using Python for your actual strategy logic. Strategies in F4 are usually coded in C/C++. However, there is a member that has apparently embedded Python within the framework, so I’m sure you could get it working if you wanted to. Of course, you have all of the source code as well, so you can implement any functionality that you want.