Search / Replace (MA, C, AR)

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

kcaron
Posts: 101
Joined: Wed Mar 04, 2015 11:46 am

Search / Replace (MA, C, AR)

Postby kcaron » Fri Oct 25, 2024 7:23 am

I have to find a way to replace MA, C, and AR if a user enters these stock tickers in a program.

My program begins with a userform that asks the user to enter a list of tickers and then stores the tickers in a variable called %tickerlist. It then fetches a stock price series for each using a Bloomberg link.

It works well except where MA, C, or AR are entered because these are all restricted variables in EViews.

So... I think a workaround is to run a loop of some kind on the tickers stored in %tickerlist and, whenever a restricted ticker is found, replace it with the company's CUSIP or ISIN.

it would be great if there was a list of all reststricted variables in case there are other tickers that might cause issues... It may exist somewhere, but I can't seem to find it.

Many thanks in advance for any suggestions.

KC

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Search / Replace (MA, C, AR)

Postby EViews Gareth » Fri Oct 25, 2024 8:13 am

You can use the @isvalidname function.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest