Hello World from the Zorro Trader Robot

Hello World from the Zorro Trader Robot

Having good data really underpins all the research that we’ll do, but unfortunately, good data can be hard to come by and often is quite time-consuming to wrangle into a format we can use in our research. Not to mention store and access efficiently. As you might have guessed Zorro Trader actually takes care of a lot of the heavy lifting for us in regard to data management. The process for managing data with Zorro Trader is actually pretty simple once you know how, but I know that it can be a frustrating endeavor for beginners when they’re first starting out.

Zorro Trader will first log in to the broker or account selected with the scroll box. When logged in and data from the broker server is received, the colored square next to the Server window will change to green. If the broker server is offline or the login password is wrong, you’ll get an error message and the session ends.

By the end of article you’ll be able to access data from a variety of sources with Zorro Trader including a local repository, various web services, and from your broker you’ll also be able to start building your own library of data for use with Zorro Trader. And I’ll even show you how you can easily export it to convenient CSV formats for use in other programs if you want to. Maybe you already have a data library in CSV format you can also convert that to Zorro’s format with some scripts that come bundled with the software.

Zorro Trader Data Management

Zorro Trader will then check if there were any open trades from the previous session. The session status was stored in a .trd file in the Data folder. If the broker API keeps a list of open trades, Zorro Trader will try to match its session status with that list. If a trade from the previous session is not found anymore in the broker’s open trade list, or appears in the broker’s list of closed trades, Zorro will print a “closed” or “not found” message and cancel the trade. If the trade was an option that was meanwhile expired, Zorro will print an “expired” message and also cancel it. Otherwise the trade will be resumed.

The first thing you need to know about historical market data is how Zorro uses it. Obviously, Zorro Trader uses historical price data when you put it in test and train mode, but Zorro can also use data in live trading mode too and that’s because sometimes we need some historical price data at the outset when we start trading.

While trading, Zorro will detect when the .par, .c, .fac or .ml files that contain the parameters, rules, capital allocation factors, or machine learning models are updated by a re-training process. In that case they are automatically reloaded at the begin of the next bar period. It is recommended to retrain strategy parameters and rules regularly (see Walk Forward Optimization) for taking care of market changes. This is especially required for parameter-free strategies that have been walk-forward optimized.

So next I want to show you how to use Zorro to actually get data and this is another great example of how Zorro is the ultimate productivity hack for independent traders because we can actually download data from multiple different web-based sources each of which has its own unique API requirements using a single unified interface by Zorro. I can’t overstate how much time this can save rather than having to write a separate tool for accessing each provider’s data.

Comments are closed.