Page 1 of 1

Credit Rating Graphs

Posted: Thu May 14, 2015 4:58 am
by Artur Patricio
Hello I would like to know If it is possible when doing a graph to assign alpha charecters to my y axis. I want to make a graph of the credit ratings of a country during time. I have already used the valmap function to attribute labels to my numeric values rating scale (i.e 24=AAA; 23=AA+). However when I do a graph on the y axis it still appears numbers instead of letters. Does anyone knows how to do this ?

Thanks a lot in advance for the help you might gave to me,

Artur

Re: Credit Rating Graphs

Posted: Thu May 14, 2015 7:27 am
by EViews Gareth
I believe that cannot be done.

Re: Credit Rating Graphs

Posted: Thu May 14, 2015 7:46 am
by Artur Patricio
Hmm... I have seen that on the graph options - Axes & Scaling - Obs/Date - add custom obs labels - you can assing the letters to your X axis but I guess that we can do the same for the y axis. or not ?

Re: Credit Rating Graphs

Posted: Thu May 14, 2015 8:30 am
by EViews Gareth
Cannot.

Re: Credit Rating Graphs

Posted: Fri May 15, 2015 4:08 am
by Artur Patricio
Hello again dear colleagues I just want to share with you the programming I have developed to solve my problem which was doing credit rating graphs. I discover a trick for doing such graphs. Below a share with you the commands I hope that it can be of help for the people that have the same problem.

%x="PT_RTG_SP"
%MYGROUP="GR_"+%x
%MYGRAPH="GRA_"+%x

group {%MYGROUP} PT_RTG_SP+0

Call graf_GR({%MYGROUP},240,%MYGRAPH)

{%MYGRAPH}.axis(left) range(10, 24)
{%MYGRAPH}.axis(left) -label grid zeroline

{%MYGRAPH}.addtext(T,textcolor(0,35,90),font(verdana,14,+b)) "Portugal – Rating S&P"
{%MYGRAPH}.addtext(-0.53,-0.11,textcolor(0,35,90),font(verdana,14,-b)) "AAA"
{%MYGRAPH}.addtext(-0.53, 0.14,textcolor(0,35,90),font(verdana,14,-b)) "AA+"
{%MYGRAPH}.addtext(-0.53, 0.36,textcolor(0,35,90),font(verdana,14,-b)) "AA"
{%MYGRAPH}.addtext(-0.53, 0.61,textcolor(0,35,90),font(verdana,14,-b)) "AA-"
{%MYGRAPH}.addtext(-0.53, 0.87,textcolor(0,35,90),font(verdana,14,-b)) "A+"
{%MYGRAPH}.addtext(-0.53, 1.11,textcolor(0,35,90),font(verdana,14,-b)) "A"
{%MYGRAPH}.addtext(-0.53, 1.35,textcolor(0,35,90),font(verdana,14,-b)) "A-"
{%MYGRAPH}.addtext(-0.53, 1.60,textcolor(0,35,90),font(verdana,14,-b)) "BBB+"
{%MYGRAPH}.addtext(-0.53, 1.85,textcolor(0,35,90),font(verdana,14,-b)) "BBB"
{%MYGRAPH}.addtext(-0.53, 2.11,textcolor(0,35,90),font(verdana,14,-b)) "BBB-"
{%MYGRAPH}.addtext(-0.53, 2.37,textcolor(0,35,90),font(verdana,14,-b)) "BB+"
{%MYGRAPH}.addtext(-0.53, 2.64,textcolor(0,35,90),font(verdana,14,-b)) "BB"
{%MYGRAPH}.addtext(-0.53, 2.87,textcolor(0,35,90),font(verdana,14,-b)) "BB-"
{%MYGRAPH}.addtext(-0.53, 3.13,textcolor(0,35,90),font(verdana,14,-b)) "B+"
{%MYGRAPH}.addtext(-0.53, 3.39,textcolor(0,35,90),font(verdana,14,-b)) "B"
{%MYGRAPH}.setelem(1) legend("Rating S&P") lwidth(1.5)

{%MYGRAPH}.datelabel format("yyyy:MM") interval(obs,24,)

{%MYGRAPH}.drawdefault shadecolor(@rgb(252,242,194) ) existing

show {%MYGRAPH}