Friday, May 8, 2015

Advanced trade selections in QuantSense

After some hard coding I decided to take a rest for a while and put down a few words on how to do some advanced trade selections in QuantSense. One of the quite common tasks is to compare trading results in a similar time periods of different years. Let us say that we want to compare our own trade results in the first quarter of 2014 vs the first quarter of 2015. Of course, you can do it for every period separately, print the results and compare them on the paper or in multiple windows on a screen.

I will show you a much more convenient way how to do this kind of comparison in QuantSense. We will need one account  for storing your full trade history (it is more like a folder). Let us call this account simply 'Full history'. In QuantSense, go to Accounts screen a create a new empty account with this name. Then import your full trading history from Meta Trader 4 into this account if you have not done it previously.

Next, we will need two another accounts for storing the trades of particular periods. Let us call them '1. quarter 2014' and '1. quarter 2015'. Just create both accounts and leave them empty.

Go to Trades screen and select the 'Full history' account. A full list of trades will appear on the right side. Now activate the date filter and set the date interval to January 1st 2014 - March 31 2014. Click 'Update'. The list of trades will change such that only trades which were closed in this period will appear. Right under the list there is button 'Select/Unselect all'. Click it and all displayed trades will be selected. Now in the bottom menu (right click or swipe from the bottom to open it) there is a 'Copy' button. Click it and QuantSense will offer you the destination accounts. Select the '1.quarter 2014' account and click 'OK'. All the selected trades will be copied to the '1.Quarter 2014' account.
Here is a screenshot of copying trades from 'Full history' to '1. Quarter 2014'.

Got the point now? We repeat the process for the first quarter 2015.

Change the date filter to match the first quarter 2015, i.e. to January 1 2015 - March 31 2015. Click update, select all trades shown and copy them to the '1.Quarter 2015' account. That is all. We have our data prepared. And the best part is coming now.

Go to Reports screen, select both accounts '1.Quarter 2014' and '1.Quarter 2015'. In the bottom menu there is a 'Settings' button, click it. Set the report such that you activate 'Compare' mode. The rest of the settings are self explanatory. If you know that difference between the number of trades in both account is larger you might want to set 'Custom granularity for profit chart' on, let us say, 7 days period in order to 'align' the curves and better see the profits in corresponding time periods. This is how does the Report Settings screen look like with all options selected as described above:

Return back to the Reports screen and click 'Create report'. QuantSense will generate a nice report for you comparing the two selected accounts with statistics computed for every account separately. You get a few charts, a table with statistics and a list of trades for every selected account. Yes, it is that easy.

For a quick view here are two screenshots from the Report screen. The first one showing the chart comparing the profits in both quarters computed in 7 days granularity. Note that my 1. Quarter 2015 (the orange line) finished a bit early - I do not have enough trades in March 2015 but you get the point:

And when you scroll the report a bit lower you can see an easy to read table with all statistics computed for every account separately:

You can save the report to a folder of your choice. It can be opened by any browser. And you can upload it on your website as it is - all files from the report folder to a folder on your website. To see the full report uploaded on my website click the following link.

After you have finished you can delete accounts '1. Quarter 2014' and '1. Quarter 2015'. All your trades are still in 'Full history' account so you will not loose anything.

To complete this example you need to have some upgrades in QuantSense. You can buy them in QuantSense store right in the app. You need Unlimited accounts upgrade to be able to create more than two accounts and to be able to copy trades between accounts. And you need the Reports upgrade to be able to generate the report. Or simply buy a Premium and do not care about upgrades any more. In the time of writing this post it is still for a discounted price and it will stay there until I finish Market Context upgrade allowing you to do interesting analysis and optimizations in the context of market quotes data. Part of it is available for the Premium users right now for beta testing.

Thanks for reading.