Index | Recent Threads | Who's Online | Search

New Thread
This topic has been viewed 110 times and has 3 replies
whotookmynickname
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

Cloudvestor Smart & Lazy Investor. Subscribe now!
Steady returns (30% p.a.), low turnover, well-diversified portfolio.

Mar 12, 2019 1:00:34 PM       
SpacemanJones
Re: Handling ticker replacements question

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?)

Mar 12, 2019 9:55:46 PM       
pdemartino
Re: Handling ticker replacements question

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.

Mar 13, 2019 4:03:12 PM       
whotookmynickname
Re: Handling ticker replacements question

Thanks Paul!

Cloudvestor Smart & Lazy Investor. Subscribe now!
Steady returns (30% p.a.), low turnover, well-diversified portfolio.

Mar 21, 2019 12:47:49 PM