Click here to Login





                                                   Why Would the Ranking Analyzer Results Differ Here?

  0

0
Dave W.
2013-07-19 18:22:45


Hello. I'm running a simple query through the Ranking System Analyzer and getting some results I am hoping you can help explain.

Please see the following two screenshots of the Ranking System results:

http://goo.gl/WY5rX
http://goo.gl/xhoQ5

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.



QuantShare
2013-07-20 06:56:26

  0

Let us say a stock price today is $10. After one day the price goes up to $12.

A long system would show a positive result of 20% ((12/10)-1)*100
A short system would show a negative result of -16.6% ((10/12)-1)*100

You see the difference.



Dave W.
2013-07-20 20:53:05

  0

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?




QuantShare
2013-07-20 22:33:19

  0

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.




Dave W.
2013-07-20 23:11:59

  0

Ok, thanks. I'll give that a try.


Dave W.
2013-07-20 23:27:29

  0

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.

https://docs.google.com/file/d/0BxSjaSuq_9wgV1BmTjc1anh0VTA/edit?usp=sharing



Dave W.
2013-07-21 00:15:54

  0

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




QuantShare
2013-07-21 07:23:53

  0

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



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
High to low stock pattern for the close price
PREV - Previous value of the same formula
Trading System Based on the CloseHL Percent Rank Oscillator
Rank Industries based on the average Relative Strength Index
Stock Ranking using Rate of Change and SMA Volume

How-to Lessons
How to copy the data/settings of an account to another account
What is the Bookmark Panel?
Difference between the watchlist and the screener tools
How to quickly download the most recent EOD data for your stocks
How to scale and move the chart Y-axis

Related Forum Threads
Ranking Analyzer Issue
Ranking System Manager and Simulator yield very different results
Custom Exits in the QS Rules Analyzer
Why cannot see COMP results on chart and in debugger
Ranking System with Trading System Help, Revisited

Blog Posts
Ranking stocks based on their correlation with the S&P 500 Index
Introduction to the trading rules analyzer
Optimization in the statistical data analysis tool
QuantShare Trading Software: New Features in the 3.1.2 Version
6 techniques to improve the performance of your stock trading str...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



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.