Eviews wrong data query

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

mvictor96
Posts: 21
Joined: Tue Dec 19, 2017 9:23 am

Eviews wrong data query

Postby mvictor96 » Wed Dec 20, 2017 5:05 am

My eviews seems to be pulling in the wrong currency series. When run on other computers the normal series GBPUSD PX_LAST is pulled in. However
when run on my own eviews the following series GBP_USD_CCY_2 is pulled in. Any idea as to what is happening. (I am running exactly the same code but getting different data.




GBP_USD_CCY GBP_USD_CCY_2
2.16 2.25256
2.3555 2.282267692
2.387 2.381171212
2.389 2.387093939
2.2325 2.310423438
1.93 2.078755385
1.803 1.837445455
1.915 1.882337879
1.781 1.845321875
1.7355 1.778752308
1.6945 1.724328788
1.618 1.647645455
1.4825 1.53166875
1.533 1.552786154
1.4977 1.509121212
1.4515 1.469066154
1.4375 1.435287692
1.3575 1.395535385
1.234 1.299055385
1.158 1.216124242
1.236 1.116448438
1.3095 1.254881538
1.4085 1.375948485
1.445 1.434759091
1.4735 1.4404875
1.532 1.508987692
1.4468 1.488837879
1.4825 1.4308
1.607 1.542004688
1.6128 1.64198
1.6248 1.617993939
1.886 1.756483333
1.8865 1.799110769
1.7085 1.84072
1.691 1.694998485
1.811 1.791112308
1.6855 1.747455385
1.55 1.626721538
1.6205 1.59764
1.6125 1.586555385
1.648 1.656256923
1.749 1.676538462
1.8788 1.864793846
1.93 1.945206061
1.751 1.906420313
1.622 1.711769231
1.751 1.685281818
1.8707 1.776931818
1.7363 1.771909231
1.905 1.808147692
1.7773 1.905507576
1.5105 1.578575758
1.5145 1.478385938
1.4912 1.535509231
1.496 1.506030303
1.4775 1.49200303
1.484 1.489001563
1.5443 1.505344615
1.5775 1.551021212
1.5648 1.584149231
1.6215 1.5834
1.5955 1.597550769
1.5848 1.573753846
1.5496 1.560852308
1.527 1.532044615
1.5527 1.524104615
1.5653 1.554827273
1.714 1.637795455
1.6374 1.634073438
1.6656 1.636316923
1.6156 1.627490909
1.6452 1.660006061
1.6725 1.646089063
1.6679 1.653966154
1.6989 1.653759091
1.66 1.675692424
1.6112 1.633025
1.5778 1.606372308
1.6473 1.601877273
1.6182 1.630040909
1.5911 1.606958462
1.5141 1.531801538
1.4754 1.477772308
1.493 1.447384615
1.4161 1.458675385
1.4153 1.422006154
1.4744 1.438550769
1.4546 1.443592424
1.4259 1.42696875
1.5335 1.462343077
1.5684 1.550415152
1.61 1.572428788
1.5827 1.603532813
1.6546 1.619086154
1.6618 1.61120303
1.7858 1.708081818
1.8462 1.838106154
1.8204 1.808433846
1.812 1.818724242
1.9182 1.868143939
1.8905 1.890546875
1.7915 1.855767692
1.7643 1.785487879
1.723 1.748478462
1.7372 1.753064615
1.8483 1.829590769
1.8721 1.875224615
1.9588 1.916583077
1.9678 1.955004615
2.0087 1.986095385
2.0473 2.021613846
1.985 2.044204545
1.9837 1.978067692
1.9923 1.971824615
1.7805 1.893681818
1.4593 1.569887879
1.4323 1.436729688
1.6458 1.552313846
1.5982 1.640862121
1.617 1.633772727
1.5184 1.559692188
1.4945 1.492115385
1.5716 1.550965152
1.5612 1.579874242
1.6028 1.603048438
1.6053 1.63138
1.5584 1.60984697
1.5543 1.572
1.6008 1.571883077
1.5707 1.582750769
1.6167 1.579941538
1.6255 1.605934848
1.5198 1.552289063
1.5213 1.53592
1.6186 1.551190909
1.6557 1.619522727
1.6662 1.654895313
1.7106 1.68338
1.6213 1.669862121
1.5577 1.582874242
1.4818 1.5148875
1.5712 1.533272308
1.5128 1.54899697
1.4736 1.516584848
1.436 1.432127692
1.3311 1.435029231
1.2972 1.313281818
1.234 1.241723077
1.255 1.239272308
1.3025 1.279953846
1.3398 1.308650769
1.3412 1.326122414

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Eviews wrong data query

Postby EViews Gareth » Wed Dec 20, 2017 9:42 am

From where are you pulling the series?
Follow us on Twitter @IHSEViews

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Eviews wrong data query

Postby EViews Steve » Wed Dec 20, 2017 11:12 am

Each database that EViews connects to uses a different connector -- so it might be an issue with that particular connector. Which database are you connecting to? Or is it a file?

Also, please provide the command you're running to perform the fetch (or import). Oh, and provide your EViews version and build date (look in your About EViews dialog).

mvictor96
Posts: 21
Joined: Tue Dec 19, 2017 9:23 am

Re: Eviews wrong data query

Postby mvictor96 » Thu Jan 18, 2018 4:28 am

I am pulling the data from Bloomberg.

create(wf=BEER, page=bloomberg) Q 1970 2017
dbopen(type=bloom) index
copy index::"GBPUSD Curncy PX_LAST" gbp_usd_ccy

this is how I pull in the data. I have just updated to eviews 10 (Nov 2017 build) and still having the same issues...

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Eviews wrong data query

Postby EViews Jason » Thu Jan 18, 2018 4:31 pm

Using the test code you posted I see:

1970Q1
1970Q2
1970Q3
1970Q4
1971Q1 2.41422380952381
1971Q2 2.418458461538462
1971Q3 2.439583333333333
1971Q4 2.503680303030303
1972Q1 2.598069230769231
1972Q2 2.597087692307692
1972Q3 2.445224615384615
1972Q4 2.364490769230769
1973Q1 2.416667692307693
1973Q2 2.530307692307692
1973Q3 2.480181538461538
1973Q4 2.380031818181818
1974Q1 2.27925


Can you post what you are seeing on both machines (plus include the dates).

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Eviews wrong data query

Postby EViews Jason » Fri Jan 19, 2018 10:56 am

I also noticed the GBPUSD series is a daily series. Your test example is importing the series into a quarterly workfile. The frequency conversion method will affect the final values in the series. You can either change the default frequency method via Options->General options->Series and Alphas->Frequency conversion or you can specify the method within the 'fetch' command using the 'c=' option.

http://www.eviews.com/help/helpintro.html#page/content/commandcmd-fetch.html

mvictor96
Posts: 21
Joined: Tue Dec 19, 2017 9:23 am

Re: Eviews wrong data query

Postby mvictor96 » Mon Jan 29, 2018 3:33 am

GBP_USD_CCY Wrong data Pulled in GBP_USD_CCY Correct Series
1980Q1 2.25256 2.16
1980Q2 2.282267692 2.3555
1980Q3 2.381171212 2.387
1980Q4 2.387093939 2.389
1981Q1 2.310423438 2.2325
1981Q2 2.078755385 1.93
1981Q3 1.837445455 1.803
1981Q4 1.882337879 1.915
1982Q1 1.845321875 1.781
1982Q2 1.778752308 1.7355
1982Q3 1.724328788 1.6945
1982Q4 1.647645455 1.618
1983Q1 1.53166875 1.4825
1983Q2 1.552786154 1.533
1983Q3 1.509121212 1.4977
1983Q4 1.469066154 1.4515
1984Q1 1.435287692 1.4375
1984Q2 1.395535385 1.3575
1984Q3 1.299055385 1.234
1984Q4 1.216124242 1.158
1985Q1 1.116448438 1.236
1985Q2 1.254881538 1.3095
1985Q3 1.375948485 1.4085
1985Q4 1.434759091 1.445
1986Q1 1.4404875 1.4735
1986Q2 1.508987692 1.532
1986Q3 1.488837879 1.4468
1986Q4 1.4308 1.4825
1987Q1 1.542004688 1.607
1987Q2 1.64198 1.6128
1987Q3 1.617993939 1.6248
1987Q4 1.756483333 1.886
1988Q1 1.799110769 1.8865
1988Q2 1.84072 1.7085
1988Q3 1.694998485 1.691
1988Q4 1.791112308 1.811
1989Q1 1.747455385 1.6855
1989Q2 1.626721538 1.55
1989Q3 1.59764 1.6205
1989Q4 1.586555385 1.6125
1990Q1 1.656256923 1.648
1990Q2 1.676538462 1.749
1990Q3 1.864793846 1.8788
1990Q4 1.945206061 1.93
1991Q1 1.906420313 1.751
1991Q2 1.711769231 1.622
1991Q3 1.685281818 1.751
1991Q4 1.776931818 1.8707
1992Q1 1.771909231 1.7363
1992Q2 1.808147692 1.905
1992Q3 1.905507576 1.7773
1992Q4 1.578575758 1.5105
1993Q1 1.478385938 1.5145
1993Q2 1.535509231 1.4912
1993Q3 1.506030303 1.496
1993Q4 1.49200303 1.4775
1994Q1 1.489001563 1.484
1994Q2 1.505344615 1.5443
1994Q3 1.551021212 1.5775
1994Q4 1.584149231 1.5648
1995Q1 1.5834 1.6215
1995Q2 1.597550769 1.5955
1995Q3 1.573753846 1.5848
1995Q4 1.560852308 1.5496
1996Q1 1.532044615 1.527
1996Q2 1.524104615 1.5527
1996Q3 1.554827273 1.5653
1996Q4 1.637795455 1.714
1997Q1 1.634073438 1.6374
1997Q2 1.636316923 1.6656
1997Q3 1.627490909 1.6156
1997Q4 1.660006061 1.6452
1998Q1 1.646089063 1.6725
1998Q2 1.653966154 1.6679
1998Q3 1.653759091 1.6989
1998Q4 1.675692424 1.66
1999Q1 1.633025 1.6112
1999Q2 1.606372308 1.5778
1999Q3 1.601877273 1.6473
1999Q4 1.630040909 1.6182
2000Q1 1.606958462 1.5911
2000Q2 1.531801538 1.5141
2000Q3 1.477772308 1.4754
2000Q4 1.447384615 1.493
2001Q1 1.458675385 1.4161
2001Q2 1.422006154 1.4153
2001Q3 1.438550769 1.4744
2001Q4 1.443592424 1.4546
2002Q1 1.42696875 1.4259
2002Q2 1.462343077 1.5335
2002Q3 1.550415152 1.5684
2002Q4 1.572428788 1.61
2003Q1 1.603532813 1.5827
2003Q2 1.619086154 1.6546
2003Q3 1.61120303 1.6618
2003Q4 1.708081818 1.7858
2004Q1 1.838106154 1.8462
2004Q2 1.808433846 1.8204
2004Q3 1.818724242 1.812
2004Q4 1.868143939 1.9182
2005Q1 1.890546875 1.8905
2005Q2 1.855767692 1.7915
2005Q3 1.785487879 1.7643
2005Q4 1.748478462 1.723
2006Q1 1.753064615 1.7372
2006Q2 1.829590769 1.8483
2006Q3 1.875224615 1.8721
2006Q4 1.916583077 1.9588
2007Q1 1.955004615 1.9678
2007Q2 1.986095385 2.0087
2007Q3 2.021613846 2.0473
2007Q4 2.044204545 1.985
2008Q1 1.978067692 1.9837
2008Q2 1.971824615 1.9923
2008Q3 1.893681818 1.7805
2008Q4 1.569887879 1.4593
2009Q1 1.436729688 1.4323
2009Q2 1.552313846 1.6458
2009Q3 1.640862121 1.5982
2009Q4 1.633772727 1.617
2010Q1 1.559692188 1.5184
2010Q2 1.492115385 1.4945
2010Q3 1.550965152 1.5716
2010Q4 1.579874242 1.5612
2011Q1 1.603048438 1.6028
2011Q2 1.63138 1.6053
2011Q3 1.60984697 1.5584
2011Q4 1.572 1.5543
2012Q1 1.571883077 1.6008
2012Q2 1.582750769 1.5707
2012Q3 1.579941538 1.6167
2012Q4 1.605934848 1.6255
2013Q1 1.552289063 1.5198
2013Q2 1.53592 1.5213
2013Q3 1.551190909 1.6186
2013Q4 1.619522727 1.6557
2014Q1 1.654895313 1.6662
2014Q2 1.68338 1.7106
2014Q3 1.669862121 1.6213
2014Q4 1.582874242 1.5577
2015Q1 1.5148875 1.4818
2015Q2 1.533272308 1.5712
2015Q3 1.54899697 1.5128
2015Q4 1.516584848 1.4736
2016Q1 1.432127692 1.436
2016Q2 1.435029231 1.3311
2016Q3 1.313281818 1.2972
2016Q4 1.241723077 1.234
2017Q1 1.239272308 1.255
2017Q2 1.279953846 1.3025
2017Q3 1.308650769 1.3398
2017Q4 1.327667692 1.3412

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Eviews wrong data query

Postby EViews Jason » Mon Jan 29, 2018 9:15 am

The incorrect series is using the average while the correct series is using the last observation as the frequency conversion method.

To get the desired series, use:

Code: Select all

copy(c=nl) index::"GBPUSD Curncy PX_LAST" gbp_usd_ccy


Also see http://www.eviews.com/help/helpintro.html#page/content/commandcmd-copy.html for more information.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 24 guests