

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: INNER  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object  +timeseries_histo
Generate histograms for the Haar coefficients created by applying the Haar transform to the time series for the Applied Materials (symbol: AMAT) daily close price.
There are 512 data points in the AMAT daily close price time series. This program generates a histogram for the first four high frequency sets of coefficients (e.g., 256, 128, 64, and 32 coefficients).
Financial theory states that the average daily return (e.g, the difference between today'ss close prices and yesterday's close price) is normally distributed. So the histogram of the highest frequency coefficients, which reflect the difference between two close prices, should be bell curve shaped, centered around zero.
The close price in the AMAT time series rises sharply about half way through. So as the coefficient frequency decreases, the histogram will be shifted farther and farter away from zero.
Note that an inplace Haar transform is used that replaces the values with the coefficients. The order function orders the coefficients from the butterfly pattern generated by the inplace algorithm into increasing frequencies, where the lowest frequency is at the beginning of the array. Each frequency is a power of two: 2, 4, 8, 16, 32, 64, 128, 256.
Constructor Summary  
(package private) 
timeseries_histo()

Method Summary  
private void 
graph_coef(double[] vals)
Graph the coefficients. 
static void 
main(java.lang.String[] args)

Methods inherited from class java.lang.Object 

Constructor Detail 
timeseries_histo()
Method Detail 
private void graph_coef(double[] vals)
Graph the coefficients.
public static void main(java.lang.String[] args)


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: INNER  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 