Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: <josef.pktd-Re5JQEeQqe8AvxtiuMwx3w <at> public.gmane.org>
Subject: a pandas example - get volatility for your stocks
Newsgroups: gmane.comp.python.pystatsmodels
Date: Sunday 31st January 2010 04:32:05 UTC (over 6 years ago)
I'm still trying to figure out some of the methods that are available
in pandas. Here is a short example that plots a measure for stock
price volatility.

'''
A quick look at volatility of stock returns for 2009

Just an exercise to find my way around the pandas methods.
Shows the daily rate of return, the square of it (volatility) and
a 5 day moving average of the volatility.
No guarantee for correctness.
Assumes no missing values.
colors of lines in graphs are not great

uses DataMatrix and WidePanel to hold data downloaded from yahoo using
matplotlib.
I haven't figured out storage, so the download happens at each run of
the script.
'''
 
CD: 18ms