Friday, March 8, 2013

Closer Approximation

Hello everyone!

To recap, last week I plotted the prices of the Nasdaq index against time and attempted to determine the period of these prices, which I approximated to 118 days. But after all the effort of plotting, detrending, and graphing dominant frequencies, it seemed silly to find just an approximation of the period. I decided to go ahead and find the (more or less) exact period for Nasdaq.

As you may recall, this is the graph of the Nasdaq's frequency content:


Now, instead of zooming in and finding an approximate value for the frequency, I'll include a bit of code in my m-file that finds the exact dominant frequency and period. Here it is:

And when I run the file in Matlab, in addition to the graphs, I get:

xmax =
    0.0078
dompdnasdaq =
   128


This means that the period of Nasdaq is actually much closer to 128 days than my previous guess of 118 days according to the data I used. It'd be interesting to see if this period remains consistent over a longer period of time, like 5 or 10 years...or what the period of other stock indices are...

Well, until next time! See you soon!

No comments:

Post a Comment