The only difference between them is that in one graphic, the Output Selected is "Short then Cover After 1 Bar", and the other graphic the Output is "Buy then Sell After 1 Bar". When you look at the annual return numbers, there are notable differences I'm hoping you can help explain. For instance, if you look at the bucket labeled "R >= 1.7", in the Short version of the graphic the annual returns are about 10.5%. If you look at the same bucket in the Long version of the graphic, the returns are about -6%. If you look at the last bucket on the chart - R >= 2.6 - the difference in results is even more pronounced. The number of trades for the buckets in both graphics is exactly the same.
I'm guessing the Ranking System Analyzer results are all frictionless (no slippage, no commissions, etc.), so I would have expected the two 1 bar results to be the inverse of one another - if the first graphic showed a +10.5% annual return, the second would shown a -10.5% annual return. Can you explain the difference? I'm guessing there is an easy answer, but I can't figure it out off-hand.
If you need more information, let me know.
Thank you.
So, that makes sense. I wasn't considering that in a short sale, you calculate the gain/loss % based on the "cover" price rather than the "short" price.
Even so, I think I'm still missing something. Let me give you another example I don't understand yet. Please look at the histograms shown in the two links provided above. In one, the "R >= 2.6" bucket shows a gain of roughly +16% if I short then cover after 1 bar. In the other, the "R >= 2.6" bucket shows a negative return of about -2% if I buy then sell after 1 bar. I wouldn't think the answer you gave above would address this magnitude of a difference, would it? Again, these results are from the exact same test; the only difference is a 1 day short versus a buy then sell after 1 day.
On a related note, it may help to have a more detailed understanding of how the Ranking Analyzer engine evaluates a formula. As an example, let's say I'm evaluating a system based on the output of "Buy then sell after 1 bar". I'm guessing the engine buys 1 share of every stock that meets the entry criteria at the open (?) the day following the setup day and sells at the open (?) one day later. Is that true?
Calculation is based on the return of each trade (no matter how many shares bought or sold).
A trade is entered on the next bar at open and sold on next bar at open too.
To verify your ranking system, I suggest you reference it in the "Rules Analyzer" using the "Ranking" function, create the same outputs and list enty/exit trades.
Here's the link to the CSV output of the Rules Analyzer run. I'm probably missing something, because I don't see how it helps validate the issue I raised. You said something about "list entry/exit trades" - I didn't see a setting for that.
Related question: Can I setup a Simulation that will take the exact same positions to validate the Ranking system? Here is a file showing a given setup in the Ranking Manager I'd like to validate in the Simulator: https://docs.google.com/file/d/0BxSjaSuq_9wgUTZxSnQxWC1mMVE/edit?usp=sharing
I tried setting up a Simulation myself that I thought I could use to get the same trades, but I think QS only allows a single position in a single security at a time, so I think that is why I couldn't get the number of trades to match up. Here s a trading report showing the formula, setup, and results: https://docs.google.com/file/d/0BxSjaSuq_9wgR2NWb19sV0UtLXc/edit?usp=sharing
The simulator will show different results because it is a true-portfolio backtester (maximum number of positions, different size for each trade...)
The ranking system is similar to the rules analyzer. On each trading bar, all trades are considered and the result is averaged.
You can create a trading rule that compares the value of your ranking system with "2.6" (for example), set "Buy then sell after one bar" as output then analyze this trading rule. While performing the analysis, there is an option you can check to display all generated trades.
For more information please contact support [at] quantshare [dot] com
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.