|
Dave Walton
2014-05-16 03:45:41
|
|
Hi QS,
I've started to do backtesting with survivorship bias free data. I use Norgate Premium data and something I was not expecting happens when including delisted stocks. basically if I have an open position on one of the symbols that is delisted prior to my simulation end date, the simulator keeps the position open through the end of my simulation. I would expect the simulator to close this position. This ties up capital in a way that does not mimic reality. Is there a way to change this behavior in the simulator?
|
|
|
|
clonex
2014-05-16 08:37:18
0
|
|
Try
sell = ref(close-1)=0;
|
|
|
|
QuantShare
2014-05-16 09:17:27
0
|
|
Best Answer
Hi Dave,
You can add the following sell rule:
sell = .....
sell = sell and IsLastBar();
|
|
|
|
Dave Walton
2014-05-18 06:54:50
0
|
|
Thanks QS. I forgot about the IsLastBar() function...
It should be this just for clarity's sake:
sell = sell OR IsLastBar();
This exits as normal or whenever the data time series ends. That is exactly what I wanted.
|
|
|
|
QuantShare
2014-05-18 16:42:33
0
|
|
Yes Dave, sorry, it should be OR not AND
|
|
|
|
Torsten
2016-05-25 10:01:54
0
|
|
Hi Dave,
are you using Norgate's PDU alpha for your backtests?
If so, I would be very interested how to get the data into QS. The PDU alpha data to is the reason I'm still using AB.
Best regards,
Torsten
|
|
|
|
Dave Walton
2016-05-25 18:58:39
0
|
|
Hi Torsten,
I use Norgate data in QS but I maintain my own database of index constituency. Norgate supports this natively for AB, RE, and Python. I also use RE so I cross-check results.
|
|
|
|