Spectral Analysis*
Moderators: EViews Gareth, EViews Moderator, EViews Esther
Spectral Analysis*
This thread is about the Spectral Analysis add-in which calculates various spectral analysis tools for time series :series:. It's an improved version of the periodogram add-in, it has new methods to calculate spectal density and a significance test signal that could be used as a white noise test.
Regards, Nicolas Ronderos Pulido
Regards, Nicolas Ronderos Pulido
Last edited by NicolasR on Fri Nov 03, 2017 10:35 am, edited 1 time in total.
Re: Spectral Analysis*
It is exactly what I need, Thank you for all your efforts, I'm :D .
Re: Spectral Analysis*
Yes, a very comprehensive and useful add-in. Thanks for sharing...
-
- Posts: 23
- Joined: Fri Jun 21, 2013 11:34 am
Re: Spectral Analysis*
i don´t know much about spectral analysis, can i use one of any elements ofs this to make hp filter for daily frequency time serie?
please help
please help
Re: Spectral Analysis*
The Hodrick Prescott filter is a low pass filter, that is, it preserves the low frequency components in the spectrum (long run). Therefore, you can use the estimated spectrum of your series to see if there is any significant peak at the low frequency components, if there is not, the smoothed series with de HP filter would be based on artificially inflated frequency components.
Hope it helps.
Regads.
Hope it helps.
Regads.
Re: Spectral Analysis*
The version 2.0 of the spectral analysis add-in is now available. It contains tests for detecting periodic components, white noise and Gaussian white noise, also it performs an automatic procedure for extracting cycles of a time series, named significant pass filter (SPF). The add-in could also be used to perform dynamic Fourier analysis, the program file can be found below and in the add-in file. In the PDF document of the add-in are showed the spectral theory of economic series and some examples using the add-in applied to data of the Industrial Production Index, the Chicago Board Options Exchange S&P 100 volatility index (VXO) and the exchange rate Euro/Dollar.
Regads.
Regads.
Code: Select all
mode quiet
'---------------------------------------------------------------Dynamic Spectra Inputs----------------------------------------------------------------
!step=1 'Step parameter for the rolling
!window=100 'Number of data that will be used to estimate the spectrum
'-----------------------------------------------------------------Static Spectral Inputs------------------------------------------------------------------
%series="vxo"
%s_window="Bartlett-Priestley" 'Periodogram, Hamming, Hann, Bartlett, Parzen, Truncated, Daniell, Bartlett-Priestley
!criteria=0.05 'Selection criteria for the spectral filter
%log_scale="N" 'Y/N
!truncation=20 'Truncation point
'----------------------------------------------------------------------------------------------------------------------------------------------------------------
!obs=@obs({%series})
!start=@ifirst({%series})
!end=@ilast({%series})
!nrolls=(!obs-!window)/!step
!loop=0
for !i=0 to !obs-!window step !step
!loop=!loop+1
%first = @otod(!start+!i)
%last = @otod(!start+!i+!window)
smpl {%first} {%last}
if %log_scale="N" then
{%series}.spectral({%s_window},table,truncation=!truncation,criteria=!criteria)
else if %log_scale="Y" then
{%series}.spectral({%s_window},table,truncation=!truncation,criteria=!criteria,log)
endif
endif
for !j=1 to !window/2
table(!window/2+1,!nrolls+2) dynamic(1,!loop+1)=@pagesmpl
table(!window/2+1,!nrolls+2) dynamic(!j+1,1)=data(!j+1,2)
table(!window/2+1,!nrolls+2) dynamic(!j+1,!loop+1)=data(!j+1,4)
next
for !j=!start to @obsrange
if !criteria<1 then
if sf_wsum(!j)<>NA then
vector(@obsrange,1) cycle(!j,1)=sf_wsum(!j)
endif
else
if mf_wsum(!j)<>NA then
vector(@obsrange,1) cycle(!j,1)=mf_wsum(!j)
endif
endif
next
if !criteria<1 then
%s_m="s"
else
%s_m="m"
endif
if %s_window="Periodogram" then
delete data {%s_m}f_wsum {%s_window}01
else if %s_window="Bartlett-Priestley" then
%priestley=@right(%s_window,9)
delete data periodogram_{%priestley} {%s_m}f_wsum
else
delete data periodogram_{%s_window} {%s_m}f_wsum
endif
endif
scalar roll=@floor((!loop/!nrolls)*100)
!roll_=roll
statusline Rolling Percentaje: (!roll_%)
next
smpl @all
mtos(cycle,stochastic_cycle)
delete roll cycle
'----------------------------------------------------------------------------------------------------------------------------------------------------------------
Re: Spectral Analysis*
I have version 2.0 of spectralanalysis. In order to do cross-spectral analysis, I need sine and cosine coefficients by frequency, not just plotted. Please help. Explain how I can do this without entering your program. If I alter your program, there will be future issues when you alter your program and I want to stick to your program. Thanks.
Re: Spectral Analysis*
Hi lofficer,
The add-in only performs univariate spectral analysis, in fact I´m working on a cross spectral analysis add-in I belive it will be ready in a couple of months.
The add-in only performs univariate spectral analysis, in fact I´m working on a cross spectral analysis add-in I belive it will be ready in a couple of months.
Re: Spectral Analysis*
Thanks. I look forward to your cross-spectral program.
Re: Spectral Analysis*
thanks for the STR Add-in it's very useful
i have two suggestions,
1-can you improve this Add-in to calculate (views the series of cumulative and frequency) and show the Cumulative spectral distribution (graph).
2-EViews 9 beta can now estimate the ARFIMA model, can you write an Add-in test of GPH (Geweke-Porter-Hudak test long memory).
Kind Regards. MED
i have two suggestions,
1-can you improve this Add-in to calculate (views the series of cumulative and frequency) and show the Cumulative spectral distribution (graph).
2-EViews 9 beta can now estimate the ARFIMA model, can you write an Add-in test of GPH (Geweke-Porter-Hudak test long memory).
Kind Regards. MED
Re: Spectral Analysis*
The cumulative spectrum could be calculated simply with the command @cumsum(%spectrum_name). The test sounds interesting but it is not in my plans, sorry.
Best regards.
Nicolas.
Best regards.
Nicolas.
-
- Posts: 1
- Joined: Mon Apr 27, 2015 7:15 am
Re: Spectral Analysis*
Hi Nicolas,
many thanks for the great add-in. It is really helpful. May I ask if you have any progress with the cross-spectral tools? A few months ago you mentioned you were working on this.
Thank you.
Kind regards,
Stoyan
many thanks for the great add-in. It is really helpful. May I ask if you have any progress with the cross-spectral tools? A few months ago you mentioned you were working on this.
Thank you.
Kind regards,
Stoyan
-
- Posts: 63
- Joined: Sat Jun 06, 2015 11:48 am
Re: Spectral Analysis*
Hi all, i have a problem with spectral analysis add in.
I work with high frequency financial observation.
Whit more 10.0000 observation the system returns error "OUT OF MEMORY MATRIX"
Can you fix this problem?
I work with high frequency financial observation.
Whit more 10.0000 observation the system returns error "OUT OF MEMORY MATRIX"
Can you fix this problem?
Re: Spectral Analysis*
Hi,
If you are working with 100.000 observations the add-in will not work. However if you click options-->General options-->Advanced system options and change the memory reserved for windows to 200 you will probably can work with 12000 observations (in a 32 bit version). Increase the temporal aggregation will afect the short-run cycle that you might find, In financial data I doubt that there is a cicle of this type. What are you trying to find or prove?
Regards.
If you are working with 100.000 observations the add-in will not work. However if you click options-->General options-->Advanced system options and change the memory reserved for windows to 200 you will probably can work with 12000 observations (in a 32 bit version). Increase the temporal aggregation will afect the short-run cycle that you might find, In financial data I doubt that there is a cicle of this type. What are you trying to find or prove?
Regards.
-
- Posts: 63
- Joined: Sat Jun 06, 2015 11:48 am
Re: Spectral Analysis*
Nicolas i m work with high frequency data (5min rivelation), in one day, for exp. Sep500 future there are 250 5min rivelation multiply for cycle of 30 day or more and get a 7500 observation, multiply for back test 2 years at least.....
I think software should allow econometric analysis of time series high frequency, everything else is the past.
I urge you to implement the software. I paid this software 1750 Dollars!
I think software should allow econometric analysis of time series high frequency, everything else is the past.
I urge you to implement the software. I paid this software 1750 Dollars!
Who is online
Users browsing this forum: No registered users and 1 guest