Yield Curve?

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
timduy
Posts: 50
Joined: Sun Jan 15, 2012 12:24 am

Yield Curve?

Unread post by timduy »

Anyone have a good way to construct a yield curve in RATS? Bond maturity on x-axis, rate on y-axis?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Yield Curve?

Unread post by TomDoan »

See the bonds.rpf and bondspline.rpf example files.

Note---I found those with "yield curve" in the Help-Find in Files menu operation.
timduy
Posts: 50
Joined: Sun Jan 15, 2012 12:24 am

Re: Yield Curve?

Unread post by timduy »

Excellent! Thank you.

Code: Select all

all 11
OPEN DATA "/Users/Tim/Documents/Magic Briefcase/QuickCharts/YIELDCURVE.xls"
DATA(FORMAT=XLS,ORG=COLUMNS) 1 11 MATURITY FEB232006	NOV72006	MAR192013	SEP132006
*
*
SCATTER(STYLE=LINE,XLABELS=||"1Mo"|"3Mo"|"6Mo"|"1Yr"|"2Yr"|"3Yr"|"5Yr"|"7Yr"|"10Yr"|"20Yr"|"30Yr"||, $
   OVERLAY=DOTS,OVCOUNT=2,OVSAME, HEADER="US Treasury Yield Curve",VLABEL="Interest Rate, %",HLABEL="Maturity", $
   KEY=UPRIGHT, NOKBOX, KLABELS=||"Feb. 23, 2006"|"Nov. 7, 2006"|""|""||, VMIN=4.25) 4
# MATURITY FEB232006 * * 1
# MATURITY NOV72006 * * 2
# MATURITY FEB232006 * * 1
# MATURITY NOV72006 * *  2

SCATTER(STYLE=LINE,XLABELS=||"1Mo"|"3Mo"|"6Mo"|"1Yr"|"2Yr"|"3Yr"|"5Yr"|"7Yr"|"10Yr"|"20Yr"|"30Yr"||, $
   OVERLAY=DOTS,OVCOUNT=2,OVSAME, HEADER="US Treasury Yield Curve",VLABEL="Interest Rate, %",HLABEL="Maturity", $
   KEY=LORIGHT, NOKBOX, KLABELS=||"Mar. 19, 2013"|"Sep. 13, 2006"|""|""||) 4
# MATURITY MAR192013 * * 1
# MATURITY SEP132006 * * 2
# MATURITY MAR192013 * * 1
# MATURITY SEP132006 * * 2
*
Post Reply