Hi, I am trying to create a series say "VC", where the first observation of this series "VC" is 100 and from the second observation onwards use the formula series VC=(1+HP)*(VC(-1)), where HP is a series of growth rates. Please, if someone could help me would be very appreciate.
Thanks
Series creation with growth rate
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Series creation with growth rate
Hi, I am trying to create a series say "VC", where the first observation of this series "VC" is 100 and from the second observation onwards use the formula series VC=(1+HP)*(VC(-1)), where HP is a series of growth rates. Please, if someone could help me would be very appreciate.
Thanks
Code: Select all
series vc =100
smpl 2 @last
vc = (1+HP)*VC(-1)
-
superjocker
- Posts: 27
- Joined: Mon Mar 30, 2020 5:45 pm
Re: Series creation with growth rate
Thanks, but it didnt work, actually I had tried something similar with the same result, just NAs. No problem creating the VC=100 series, but then when defining the smpl and running the formula, just get NAs.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Series creation with growth rate
What's in the HP series?
-
superjocker
- Posts: 27
- Joined: Mon Mar 30, 2020 5:45 pm
Re: Series creation with growth rate
just growth rates likeWhat's in the HP series?
na
0.03
0.05
0.07
0.08
0.001
0.025
so I need to end up with
series VC
100
103---------->100*(1+0.03)
108.15---------->103*(1+0.05)
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Series creation with growth rate
Perhaps post your EViews workfile.
-
superjocker
- Posts: 27
- Joined: Mon Mar 30, 2020 5:45 pm
Re: Series creation with growth rate
'fondo A
import "D:\Usuario\eorellana\Desktop\Box Sync\Eduardoraran\AFPs\RENTABILIDADES FONDOS.xlsx" range="HISTORICOS A"!$AS$3:$AU$20000 colhead=1 na="#N/A" @freq D7 9/26/2002 @smpl @all
'UF
import "D:\Usuario\eorellana\Desktop\Box Sync\Eduardoraran\AFPs\UF Actual.xlsx" range="UF Diaria"!$A$1:$C$20000 colhead=1 na="#N/A" @freq D7 9/26/2002 @smpl @all
series vc_areal=100
smpl 2 @last
vc_areal=(1+(((1+rent_diaria_a)/(1+rent_diaria_uf))-1))*(vc_areal(-1))
What I gave you was a simplification but (((1+rent_diaria_a)/(1+rent_diaria_uf))-1)) is just a rate. Also I am importing data from an Excel from an specific range, dont know if that is doing something.
import "D:\Usuario\eorellana\Desktop\Box Sync\Eduardoraran\AFPs\RENTABILIDADES FONDOS.xlsx" range="HISTORICOS A"!$AS$3:$AU$20000 colhead=1 na="#N/A" @freq D7 9/26/2002 @smpl @all
'UF
import "D:\Usuario\eorellana\Desktop\Box Sync\Eduardoraran\AFPs\UF Actual.xlsx" range="UF Diaria"!$A$1:$C$20000 colhead=1 na="#N/A" @freq D7 9/26/2002 @smpl @all
series vc_areal=100
smpl 2 @last
vc_areal=(1+(((1+rent_diaria_a)/(1+rent_diaria_uf))-1))*(vc_areal(-1))
What I gave you was a simplification but (((1+rent_diaria_a)/(1+rent_diaria_uf))-1)) is just a rate. Also I am importing data from an Excel from an specific range, dont know if that is doing something.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Series creation with growth rate
Save your workfile to something like foo.wf1 and post that. That's the only way for anyone else to see what EViews thinks it has.
-
superjocker
- Posts: 27
- Joined: Mon Mar 30, 2020 5:45 pm
Re: Series creation with growth rate
The formula:
series vc_areal=100
smpl 2 @last
vc_areal=(1+(((1+rent_diaria_a)/(1+rent_diaria_uf))-1))*(vc_areal(-1))
series vc_areal=100
smpl 2 @last
vc_areal=(1+(((1+rent_diaria_a)/(1+rent_diaria_uf))-1))*(vc_areal(-1))
- Attachments
-
- FOO.WF1
- (1.1 MiB) Downloaded 286 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Series creation with growth rate
Use:
rather than
Your workfile is dated, so "2" corresponds to the date "2" rather than the 2nd observation.
Code: Select all
smpl @first+1 @last
Code: Select all
smpl 2 @last
-
superjocker
- Posts: 27
- Joined: Mon Mar 30, 2020 5:45 pm
Re: Series creation with growth rate
Thank you, it worked!!! thank you very much, you are the best.
Thank you again
Thank you again
Who is online
Users browsing this forum: No registered users and 2 guests
