Hi all,
I am on a learning curve on macro processor.
I am trying to calculate yield to maturity (ytm) formula as follows based on a consumption CAPM model. The goal is to plot ytm against i. I tried this code.
....
@#define J=30
@#for i in 1:J
ytm=betta^-1*(c(+i)/c)^(1/i);
@#endfor
...............................
I get an error message.
Symbol c is being treated as if it were a function (i.e., takes an argument that is not an integer).
I must be doing something silly.