Page 1 of 1

Error message when uploading data

Posted: Thu Dec 04, 2014 2:13 pm
by Aixia_Mei
Hi,

I am trying to upload the data of log return with following codes:

cal(daily) 2006 04 03
all 2014:03:31
*
open data C:\Users\aixia\Desktop\51 Daily Price.xlsx
data(format=xlsx,org=columns) / PUDONG
*
set r1 = PUDONG
nonlin b0 b1 b2 b3 b4 b5 a0 a1 a2 a3 a4 d
compute d=1.0
*
stat(NOPRINT) r1
compute start = 2
compute end = 2087

But RATS always replies as:

Not XLSX workbook
## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points

The price data is form Chinese stock markets. Since in China, they get some long-period holidays, which leave stock returns unchanged for days, the difference of log return of certain stock remains zero. I am not sure whether should I delete all those zero log return data. Besides, there are also relatively long share suspended period for many stocks in my data set. This also leave the difference of daily log returns as zero for days. Need I do something to deal with this?

I've attached both my RATS input and data excel here. Could you please help me to have a look?

Many thanks,
Aixia

Re: Error message when uploading data

Posted: Thu Dec 04, 2014 8:06 pm
by TomDoan
I assume you're using something earlier than RATS v8.2. (It works beginning with that). The simplest thing is to re-save the first spreadsheet as a simpler .XLS file.

Re: Error message when uploading data

Posted: Fri Dec 05, 2014 3:02 pm
by Aixia_Mei
TomDoan wrote:I assume you're using something earlier than RATS v8.2. (It works beginning with that). The simplest thing is to re-save the first spreadsheet as a simpler .XLS file.
Hi Tom,

Yes, the version I use is WinRATS8.0. As you suggested, I've tried changed the data file into simple xls form. But it still shows no results. There is no more error message this time. It seems nothing is wrong with the codes.

With thanks,
Aixia

Re: Error message when uploading data

Posted: Fri Dec 05, 2014 9:24 pm
by TomDoan
You have NOPRINT options on both the MAXIMIZE instructions. Hence, no output.

Re: Error message when uploading data

Posted: Sun Dec 07, 2014 11:37 am
by Aixia_Mei
TomDoan wrote:You have NOPRINT options on both the MAXIMIZE instructions. Hence, no output.
Hi Tom,

Thanks a lot for helping me point out this. But I don't think the results I currently get is reliable. Since there was a no convergence problem when I dealt the data with my original codes, I inserted a ''piters=5'' to the first MAXIMIZE, according to Chapter 4, the USER'S GUIDE. However, the results of B3 and B4 look very strange. Could you please help have a check? My running results are as below:

MAXIMIZE - Estimation by Simplex
Daily(5) Data From 2006:04:04 To 2014:03:31
Usable Observations 2085
Function Value 5051.0544

Variable Coeff
**********************************************
1. B0 0.000391351
2. B1 -0.021727966
3. B2 0.012707494
4. B3 -0.004056005
5. B4 0.002063089
6. B5 -0.000455020
7. A0 0.000027464
8. A1 0.125429906
9. A2 0.880748810
10. A3 -0.000981806
11. A4 -0.086814743
12. D 0.817770243


MAXIMIZE - Estimation by BFGS
Convergence in 42 Iterations. Final criterion was 0.0000002 <= 0.0000100
With Heteroscedasticity/Misspecification Adjusted Standard Errors
Daily(5) Data From 2006:04:04 To 2014:03:31
Usable Observations 2085
Function Value 5068.9335

Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. B0 -0.000000 0.000000 -0.10563 0.91587729
2. B1 0.000068 0.000493 0.13889 0.88953833
3. B2 0.025760 0.002795 9.21610 0.00000000
4. B3 -23.209764 0.673047 -34.48463 0.00000000
5. B4 -101.308677 0.449564 -225.34879 0.00000000
6. B5 -0.000000 0.000000 -0.02300 0.98164734
7. A0 0.000008 0.000004 2.06597 0.03883108
8. A1 0.064017 0.001671 38.31147 0.00000000
9. A2 0.938209 0.009316 100.70841 0.00000000
10. A3 0.018244 0.009608 1.89882 0.05758814
11. A4 -0.023904 0.006753 -3.53967 0.00040062
12. D 0.793947 0.022108 35.91276 0.00000000

ll= 5068.93353
akaike= -7.26271
schwarz= -7.23023


kind regards,
Aixia

Re: Error message when uploading data

Posted: Sun Dec 07, 2014 2:14 pm
by TomDoan
Why are you using the GED rather than the t? (Note BTW, that there's a built-in function for the log GED density so you don't have to write it out). The GED density isn't differentiable at 0, which can cause numerical problems when you apply a derivative-based optimization algorithm.

Your return series has a lot of exact zeros, often four or five in a row. Is this really thinly traded, or are those non-trading days that probably shouldn't be included in the data set?

Re: Error message when uploading data

Posted: Thu Feb 26, 2015 4:28 am
by Aixia_Mei
Hi Tom,

One more question about uploading the data. In my spreadsheet, the first column is the series of date, and for the rest are several columns of single stock's return time series. How can I solely adopt the fourth column of the single time series, e.g. named SH3 ? I've tried both of the following codes, but neither works:

(1)
OPEN DATA "C:\Users\ai\Desktop\51 return"
CALENDAR(D) 2006:04:03
DATA(FORMAT=XLS,ORG=OBS) 2006:04:03 2014:03:31 SH3

(2)
OPEN DATA "C:\Users\ai\Desktop\51 return"
CALENDAR(D) 2006:04:03
DATA(FORMAT=XLS,ORG=COLUMNS,RIGHT=4) 2006:04:03 2014:03:31 SH3

Regards

Re: Error message when uploading data

Posted: Thu Feb 26, 2015 7:33 am
by TomDoan
Is there any harm to reading the extra series?

At any rate, the first should work fine. What does "not work" mean? The RIGHT=4 on the second sounds like it will have no effect if there are only 4 columns anyway.

Re: Error message when uploading data

Posted: Fri Feb 27, 2015 6:09 pm
by Aixia_Mei
Thanks Tom. The first code works fine.