The observations are not fully used

For questions and discussion related to reading in and working with data.
Aixia_Mei
Posts: 29
Joined: Wed Dec 03, 2014 7:16 pm

The observations are not fully used

Unread post by Aixia_Mei »

Hi Tom,

I get the data from a Chinese data supplier. Unlike Data-stream, in the Chinese supplier's data set, the certain amount of four or five consecutive non-trading days, which are caused by the national holidays, have already been excluded. The current problem is when I try to run the data, the usable observation only shows as 19, however it should be 1942 in the data set.

My code is:

Code: Select all

OPEN DATA "C:\Users\aixia\Desktop\S10"
CALENDAR(D) 2006:04:03
DATA(FORMAT=XLS,ORG=OBS) 2006:04:03 2014:03:31 S10

set r1 = S10

stat(NOPRINT) r1
compute start = 2006:04:03
compute end = 2014:03:31
This results are as below:

MAXIMIZE - Estimation by BFGS
NO CONVERGENCE IN 71 ITERATIONS
LAST CRITERION WAS 0.0000000
ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT
TRY HIGHER SUBITERATIONS LIMIT, TIGHTER CVCRIT, DIFFERENT SETTING FOR EXACTLINE OR ALPHA ON NLPAR
RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES MIGHT ALSO WORK
With Heteroscedasticity/Misspecification Adjusted Standard Errors
Daily(5) Data From 2006:04:04 To 2014:03:31
Usable Observations 19
Skipped/Missing (from 2085) 2066
Function Value 49.0670

Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. B0 0.000004853 0.000002662 1.82261 0.06836224
2. B1 -0.432426251 0.005506891 -78.52457 0.00000000
3. B2 0.208208739 0.001504934 138.35077 0.00000000
4. B3 -0.093034460 0.001634034 -56.93546 0.00000000
5. A0 0.000002514 0.000000316 7.96058 0.00000000
6. A1 0.048737502 0.001384251 35.20858 0.00000000
7. A2 0.000000767 0.000006921 0.11080 0.91177449
8. NU 2.000002748 0.000019505 102539.39566 0.00000000

Statistics on Series Z1
Daily(5) Data From 2006:04:03 To 2006:04:28
Observations 20
Sample Mean -241.401410 Variance 1895348.249424
Standard Error 1376.716474 SE of Sample Mean 307.843162
t-Statistic (Mean=0) -0.784170 Signif Level (Mean=0) 0.442608
Skewness -4.184287 Signif Level (Sk=0) 0.000000
Kurtosis (excess) 18.453581 Signif Level (Ku=0) 0.000000
Jarque-Bera 342.139733 Signif Level (JB=0) 0.000000


Many thanks.
Attachments
S10 Chinese data resources.xls
(210 KiB) Downloaded 764 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: The observations are not fully used

Unread post by TomDoan »

If there are gaps in the data, then a daily calendar will replace those with NA's. Since you're doing a recursive model, any NA will end the calculation right there. Thus, you get about 20 data points before the first NA. To avoid that, don't read the data with a daily CALENDAR scheme---just treat it as irregular time series data.

What's the difference between one of the huge number of 0's in the data set and the missing values?
Aixia_Mei
Posts: 29
Joined: Wed Dec 03, 2014 7:16 pm

Re: The observations are not fully used

Unread post by Aixia_Mei »

I guess the differences is, even with very small probability,in economics term, zeros in log difference returns could be explained as ' the stock is traded in the real market, but the closing price occasionally keeps unchanged'. So I adopt the Chinese supplier's data to avoid deleting this type of zeros mistakenly.

Also NOT ALL time series data of Chinese stock markets downloaded from Data-stream has been adjusted. I found many obvious mistakes are there in Datastream's data when I compare the same data set from four different data suppliers.
Aixia_Mei
Posts: 29
Joined: Wed Dec 03, 2014 7:16 pm

Re: The observations are not fully used

Unread post by Aixia_Mei »

Hi Tom,

Is the following codes correct? I always get a mistake report as # SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points

Code: Select all

OPEN DATA "C:\Users\aixia\Desktop\S10 Chinese data resources"
DATA(FORMAT=XLS,ORG=OBS) / S10
CALENDAR(I)
compute gstart=1,gend=%nobs

set r1 = S10
Many thanks.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: The observations are not fully used

Unread post by TomDoan »

%NOBS doesn't get defined by DATA. Instead, use gend=%ALLOCEND()
Post Reply