|
Brian
2010-10-31 12:53:58
|
|
Could you provide a simple example for ranking the number of stocks that are the result of a simulation rules.
For example,
Lets say my rule to buy in a simulation is...
RSI(14) < 30 AND RSI(14) > 10
Now if my simulation only has 5 positions available, I wish to select the 5 "best" securities.
How can I sort the results of the above rules and get the 5 securities that have the lowest RSI(14) value?
Thank you
|
|
|
|
QuantShare
2010-11-01 07:05:45
0
|
|
Best Answer
To do this:
- Update a trading system and select the "Ranking" tab.
- Click on "Define Long & Short Ranking System".
- Click "Update the ranking system".
- Click "Add formula"
- Type the following formula in the "Node formula" panel
Formula: 1/RSI(14)
- Click on "OK" then "Save".
|
|
|
|
Brian
2010-11-01 11:22:17
0
|
|
Thank you for your help,
I believe that worked (the performance stats changed) but it is hard to tell what exactly happened internally. I suppose the "Analyze" function might help but when I tried I got zero for every "bucket".
Please excuse a newbie, your software has so much capabilities, it's a little difficult to get your hands around all the nuances.
|
|
|
|
QuantShare
2010-11-02 06:35:48
0
|
|
To verify this, you can use the screener. Set a specific date, your system buy rules as filter and "1/RSI(14)" as column display then check buy signals for the same date in the simulator report.
When clicking the analyze button, you should get data in the first buckets (verify dates and symbols).
In order for the ranking system to display all buckets you should add values between (0 and 100) and thus you should type: (1/RSI(14)) * 100
Let me know if you have any other questions.
|
|
|
|
Brian
2010-11-03 16:32:02
0
|
|
Could you also provide me with a simple example on how to modify the generic Quantshare buy rule (during simulation) with a buy stop or buy limit order?
Two other questions,
1) Since we are using daily data, how does Quantshare internally fill a limit order for the following day?
2) If I use limit orders and I have 5 maximum positions, will Quantshare place a max of 5 limit orders (whether they get filled or not) or will it try to actually fill the five positions by going down the ranking order?
|
|
|
|
QuantShare
2010-11-04 05:44:31
0
|
|
- In the "Update a trading system" form, click on "at open" in the "Buy at open of tomorrow" line.
You can then set a limit order instead of a market order.
- On the day, the buy limit order is pending; the simulator will do the following:
+ If limit price is lower than today's low -> Order not executed (but is still alive)
+ If limit price is lower or equal to today's open -> Order is executed at limit price
+ If limit price is higher than today's open -> Order is executed at open price
- It will create only 5 limit orders. If one of these orders is no filled then it will create another limit order (if there is a buy signal for the current bar)
You can set the number of bars the order can be kept in the pending list by updating the "Orders are valid for" option in the Capital Settings of a trading system.
|
|
|
|
Brian
2010-11-06 14:05:14
0
|
|
Thank you, I was using the formula editor and did not see that option before.
Will you be adding the ability to issue a buy/sell "stop" order instead of market or limit in the future?
|
|
|
|
QuantShare
2010-11-08 04:46:57
0
|
|
Yes of course we can add it. Thank you for the suggestion.
|
|
|
|