Handling ticker replacements question

Hi P123 and members

Do you know of any good way of handling ticker replacements in formulas?

I would want to call a specific ticker Close in a buy rule (VXX). I had created a formula like this: $VXX: GetSeries(“VXX”) and used Close(0, $VXX) in the buy rules. That worked.
Now as VXX was replaced with VXXB, VXX ticker changed to VXX^19.

I adjusted the formula as follows but this does not work anymore.
$VXX: IsNA(GetSeries(“VXX^19”),GetSeries(“VXXB”))

Any suggestions how to solve this?

Thanks
whotookmynickname

I haven’t checked how VXX and VXXB data is populated, but can you maybe change the IsNA to an Eval statement to see if that works? Unsure if a date field can be used as the Eval criteria, but something saying prior to date x use VXX, after date x use VXXB. (I wonder if VXXB has been populated backward to reflect VXX performance?)

This seems to work:

Eval(Close(0,GetSeries("VXXB"))!=NA,GetSeries("VXXB"),GetSeries("VXX^19"))

The trick is that it looks like there was a period where they both exist. (As issued prices?) This prefers VXXB during that time.

Thanks Paul!