Em 17 de novembro de 2010 Allin Cottrell <cottrell(a)wfu.edu> escreveu:
On Sun, 7 Nov 2010, Henrique Andrade wrote:
> I would like to calculate the PPI inflation of the last 12 months. For
this
> task I'm using the following sript:
>
> *<script>*
> *open* fedstl.bin
> *data* ppiaco
> *series* x = ppiaco/ppiaco(-1)
> *series* ppi_12_months = ((x(-11) * x(-10) * x(-9) * x(-8) * x(-7) *
x(-6) *
> x(-5) * x(-4) * x(-3) * x(-2) * x(-1) * x) - 1) * 100
> *delete* x
> *setinfo* ppi_12_months -d "PPI accumulated in the last 12 months"
> *</script>*
>
> How can I make it more "elegant" (i.e "shorter")?
series ppi12 = 100 * (ppiaco - ppiaco(-12))/ppiaco(-12)
Definitely this is much simpler :-)
But if we don't have the price index (like the PPI)? That is, if we have
only
the monthly inflation (like the variable "x" in my script)?
Best regards,
Henrique