<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeff Billimek&#039;s Journal</title>
	<atom:link href="http://billimek.com/jeff/feed/" rel="self" type="application/rss+xml" />
	<link>http://billimek.com/jeff</link>
	<description>Jeff Billimek&#039;s Journal at billimek.com</description>
	<lastBuildDate>Wed, 27 Jan 2010 17:55:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>vix reversal trigger in python</title>
		<link>http://billimek.com/jeff/2010/01/27/vix-reversal-trigger-in-python/</link>
		<comments>http://billimek.com/jeff/2010/01/27/vix-reversal-trigger-in-python/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 17:52:17 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1477</guid>
		<description><![CDATA[I wrote a python script to send an email whenever a particular type of VIX reversal indicator triggers.  Basically if the following conditions are met, it will send an email:
* If the VIX index has a NEW 15-day high today and closed below the open, then it suggests a buy indicator.
* If the VIX [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a python script to send an email whenever a particular type of VIX reversal indicator triggers.  Basically if the following conditions are met, it will send an email:<br />
* If the VIX index has a NEW 15-day high today and closed below the open, then it suggests a buy indicator.<br />
* If the VIX index has a NEW 15-day low today and closed above the open, then it suggests a sell indicator.</p>
<p>I decided to write this in python since I&#8217;ve never used it before.  It was a fun learning experience.  I was a bit taken back by the lack of statement terminators and the indenting rules, but in all I like it better than perl.</p>
<p>This script runs every weekday at 4:15pm (since the yahoo stock quotes are delayed 15 minutes).</p>
<p>Future enhancement ideas are to include the <a href="http://stockcharts.com/h-sc/ui?s=$VIX&#038;p=D&#038;yr=0&#038;mn=0&#038;dy=15&#038;id=p61617889820">15-day chart from stockcharts.com</a> as an inline attachment (I have a bash script which already does this so it shouldn&#8217;t be that hard to port), as well as proper cleanup &#038; organization of the code once/if I ever learn more python.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">smtplib</span>
<span style="color: #ff7700;font-weight:bold;">import</span> ystockquote
&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">email</span>.<span style="color: black;">mime</span>.<span style="color: black;">text</span> <span style="color: #ff7700;font-weight:bold;">import</span> MIMEText
&nbsp;
<span style="color: #808080; font-style: italic;"># ticker to look up</span>
ticker = <span style="color: #483d8b;">'^VIX'</span>
<span style="color: #808080; font-style: italic;"># number of days of historical data to fetch (not counting today)</span>
days_back = <span style="color: #ff4500;">14</span>
&nbsp;
email_from = <span style="color: #483d8b;">'redacted'</span>
email_to = <span style="color: #483d8b;">'redacted'</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># yesterday's date</span>
end = <span style="color: #dc143c;">datetime</span>.<span style="color: black;">date</span>.<span style="color: black;">today</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> + <span style="color: #dc143c;">datetime</span>.<span style="color: black;">timedelta</span><span style="color: black;">&#40;</span>days= -<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
<span style="color: #808080; font-style: italic;"># 30 days ago from today</span>
start = <span style="color: #dc143c;">datetime</span>.<span style="color: black;">date</span>.<span style="color: black;">today</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> + <span style="color: #dc143c;">datetime</span>.<span style="color: black;">timedelta</span><span style="color: black;">&#40;</span>days= -<span style="color: #ff4500;">30</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># fetch the historical data from yahoo</span>
data = ystockquote.<span style="color: black;">get_historical_prices</span><span style="color: black;">&#40;</span>ticker, start.<span style="color: black;">strftime</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;%Y%m%d&quot;</span><span style="color: black;">&#41;</span>, end.<span style="color: black;">strftime</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;%Y%m%d&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># validate that we have enough historical data to continue</span>
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&lt;</span> <span style="color: black;">&#40;</span>days_back + <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Not enough historical data available to continue (need at least 15 days of market data)'</span>
    <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
current = ystockquote.<span style="color: black;">get_price</span><span style="color: black;">&#40;</span>ticker<span style="color: black;">&#41;</span>
<span style="color: #008000;">open</span> = ystockquote.<span style="color: black;">get_open</span><span style="color: black;">&#40;</span>ticker<span style="color: black;">&#41;</span>
high = ystockquote.<span style="color: black;">get_high</span><span style="color: black;">&#40;</span>ticker<span style="color: black;">&#41;</span>
low = ystockquote.<span style="color: black;">get_low</span><span style="color: black;">&#40;</span>ticker<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #483d8b;">''</span><span style="color: #483d8b;">'
print '</span>start date <span style="color: #ff7700;font-weight:bold;">is</span>: <span style="color: #483d8b;">' + str(start)
print '</span>end date <span style="color: #ff7700;font-weight:bold;">is</span>: <span style="color: #483d8b;">' + str(end)
print '</span>number of days of actual market data retrieved <span style="color: #ff7700;font-weight:bold;">is</span>: <span style="color: #483d8b;">' + str((len(data) - 1))
print '</span>Current price: <span style="color: #483d8b;">' + str(current)
print '</span>Open price: <span style="color: #483d8b;">' + str(open)
print '</span>High price: <span style="color: #483d8b;">' + str(high)
print '</span>Low price: <span style="color: #483d8b;">' + str(low)
&nbsp;
# Loop through the previous 14-days of data (the first item in the data array
# is omitted because it is just header information
print '</span>the previous <span style="color: #ff4500;">14</span>-day of historical data:<span style="color: #483d8b;">'
for i in range(1, (days_back + 1)):
    print data[i][0] + '</span>: High:<span style="color: #483d8b;">' + data[i][2] + '</span> Low:<span style="color: #483d8b;">' + data[i][3]
'</span><span style="color: #483d8b;">''</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> isNewHigh<span style="color: black;">&#40;</span>high, data<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Returns True if the 'high' is higher than any of the highs in the data
    array passed in. Otherwise returns False
    &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span>, <span style="color: black;">&#40;</span>days_back + <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">float</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span>= <span style="color: #008000;">float</span><span style="color: black;">&#40;</span>high<span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">False</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> isNewLow<span style="color: black;">&#40;</span>low, data<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Returns True if the 'low' is lower than any of the lows in the data
    array passed in. Otherwise returns False
    &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span>, <span style="color: black;">&#40;</span>days_back + <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">float</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">3</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&lt;</span> = <span style="color: #008000;">float</span><span style="color: black;">&#40;</span>low<span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">False</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> isCurrentHigherThanOpen<span style="color: black;">&#40;</span>current, <span style="color: #008000;">open</span><span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Simple check to see if the current price is greater than the open price
    &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">float</span><span style="color: black;">&#40;</span>current<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #008000;">float</span><span style="color: black;">&#40;</span><span style="color: #008000;">open</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> isCurrentLowerThanOpen<span style="color: black;">&#40;</span>current, <span style="color: #008000;">open</span><span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Simple check to see if the current price is lower than the open price
    &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">float</span><span style="color: black;">&#40;</span>current<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #008000;">float</span><span style="color: black;">&#40;</span><span style="color: #008000;">open</span><span style="color: black;">&#41;</span>
&nbsp;
buy = <span style="color: #008000;">False</span>
sell = <span style="color: #008000;">False</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># if the current price is higher than the open and today is a new 15-day low, </span>
<span style="color: #808080; font-style: italic;"># then this is a SELL indicator</span>
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>isCurrentHigherThanOpen<span style="color: black;">&#40;</span>current, <span style="color: #008000;">open</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span> isNewLow<span style="color: black;">&#40;</span>low, data<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
    <span style="color: #808080; font-style: italic;">#print 'today is a 15-day low (' + str(low) + ') &amp; the current price (' + str(current) + ') is higher than the open (' + str(open) + ')'</span>
    sell = <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># if the current price is lower than the open and today is a new 15-day high, </span>
<span style="color: #808080; font-style: italic;"># then this is a BUY indicator</span>
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>isCurrentLowerThanOpen<span style="color: black;">&#40;</span>current, <span style="color: #008000;">open</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span> isNewHigh<span style="color: black;">&#40;</span>high, data<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
    <span style="color: #808080; font-style: italic;">#print 'today is a 15-day high (' + str(high) + ') &amp; the current price (' + str(current) + ') is lower than the open (' + str(open) + ')'</span>
    buy = <span style="color: #008000;">True</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>buy | sell<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> buy:
        body = <span style="color: #483d8b;">'Today is a new 15-day high ('</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>high<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">') &amp; the current price ('</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>current<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">') is lower than the open ('</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">open</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">')<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>====&gt;This is a VIX BUY indicator!'</span>
        subject = <span style="color: #483d8b;">'VIX BUY indicator triggered'</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        body = <span style="color: #483d8b;">'Today is a new 15-day low ('</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>low<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">') &amp; the current price ('</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>current<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">') is higher than the open ('</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">open</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">')<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>====&gt;This is a VIX SELL indicator!'</span>
        subject = <span style="color: #483d8b;">'VIX SELL indicator triggered'</span>
    msg = MIMEText<span style="color: black;">&#40;</span>body<span style="color: black;">&#41;</span>
    msg<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Subject'</span><span style="color: black;">&#93;</span> = subject
    msg<span style="color: black;">&#91;</span><span style="color: #483d8b;">'From'</span><span style="color: black;">&#93;</span> = email_from
    msg<span style="color: black;">&#91;</span><span style="color: #483d8b;">'To'</span><span style="color: black;">&#93;</span> = email_to
    s = <span style="color: #dc143c;">smtplib</span>.<span style="color: black;">SMTP</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'localhost'</span><span style="color: black;">&#41;</span>
    s.<span style="color: black;">sendmail</span><span style="color: black;">&#40;</span>email_from, email_to, msg.<span style="color: black;">as_string</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    s.<span style="color: black;">quit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>I took the <a href="http://www.goldb.org/ystockquote.html">ystockquote.py from Corey Goldberg</a> and had to extend it slightly to include some additional information:<br />
* day&#8217;s high price<br />
* day&#8217;s low price<br />
* last trade time<br />
* last &#8216;real time&#8217; trade + time (this doesn&#8217;t appear to be real time after all)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;">#  Copyright (c) 2007-2008, Corey Goldberg (corey@goldb.org)</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;">#  license: GNU LGPL</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;">#  This library is free software; you can redistribute it and/or</span>
<span style="color: #808080; font-style: italic;">#  modify it under the terms of the GNU Lesser General Public</span>
<span style="color: #808080; font-style: italic;">#  License as published by the Free Software Foundation; either</span>
<span style="color: #808080; font-style: italic;">#  version 2.1 of the License, or (at your option) any later version.</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib</span>
&nbsp;
&nbsp;
<span style="color: #483d8b;">&quot;&quot;&quot;
This is the &quot;ystockquote&quot; module.
&nbsp;
This module provides a Python API for retrieving stock data from Yahoo Finance.
&nbsp;
sample usage:
&gt;&gt;&gt; import ystockquote
&gt;&gt;&gt; print ystockquote.get_price('GOOG')
529.46
&quot;&quot;&quot;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #dc143c;">stat</span><span style="color: black;">&#41;</span>:
    url = <span style="color: #483d8b;">'http://finance.yahoo.com/d/quotes.csv?s=%s&amp;f=%s'</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #dc143c;">stat</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">urllib</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'&quot;'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_all<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Get all available quote data for the given ticker symbol.
&nbsp;
    Returns a dictionary.
    &quot;&quot;&quot;</span>
    values = __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'l1c1va2xj1b4j4dyekjm3m4rr5p5p6s7oahagat1k1'</span><span style="color: black;">&#41;</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">','</span><span style="color: black;">&#41;</span>
    data = <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'price'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'change'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'volume'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'avg_daily_volume'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">3</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'stock_exchange'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">4</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'market_cap'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">5</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'book_value'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'ebitda'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">7</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'dividend_per_share'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">8</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'dividend_yield'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">9</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'earnings_per_share'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">10</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'52_week_high'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">11</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'52_week_low'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">12</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'50day_moving_avg'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">13</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'200day_moving_avg'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">14</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'price_earnings_ratio'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">15</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'price_earnings_growth_ratio'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">16</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'price_sales_ratio'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">17</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'price_book_ratio'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">18</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'short_ratio'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">19</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'open'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">20</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'days_high'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">21</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'days_low'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">22</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'last_trade_time'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">23</span><span style="color: black;">&#93;</span>
    data<span style="color: black;">&#91;</span><span style="color: #483d8b;">'last_trade_real_time'</span><span style="color: black;">&#93;</span> = values<span style="color: black;">&#91;</span><span style="color: #ff4500;">24</span><span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> data
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_price<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'l1'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_change<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'c1'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_volume<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'v'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_avg_daily_volume<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'a2'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_stock_exchange<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'x'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_market_cap<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'j1'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_book_value<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'b4'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_ebitda<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'j4'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_dividend_per_share<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'d'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_dividend_yield<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'y'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_earnings_per_share<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'e'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_52_week_high<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'k'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_52_week_low<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'j'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_50day_moving_avg<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'m3'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_200day_moving_avg<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'m4'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_price_earnings_ratio<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'r'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_price_earnings_growth_ratio<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'r5'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_price_sales_ratio<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'p5'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_price_book_ratio<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'p6'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_short_ratio<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'s7'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_open<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'o'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_high<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'h'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_low<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'g'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_last_trade_time<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'t1'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_last_real_time_trade<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span><span style="color: black;">&#41;</span>: 
    <span style="color: #ff7700;font-weight:bold;">return</span> __request<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, <span style="color: #483d8b;">'k1'</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> get_historical_prices<span style="color: black;">&#40;</span><span style="color: #dc143c;">symbol</span>, start_date, end_date<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    Get historical prices for the given ticker symbol.
    Date format is 'YYYYMMDD'
&nbsp;
    Returns a nested list.
    &quot;&quot;&quot;</span>
    url = <span style="color: #483d8b;">'http://ichart.yahoo.com/table.csv?s=%s&amp;'</span> <span style="color: #66cc66;">%</span> <span style="color: #dc143c;">symbol</span> + \
          <span style="color: #483d8b;">'d=%s&amp;'</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>end_date<span style="color: black;">&#91;</span><span style="color: #ff4500;">4</span>:<span style="color: #ff4500;">6</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> - <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span> + \
          <span style="color: #483d8b;">'e=%s&amp;'</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>end_date<span style="color: black;">&#91;</span><span style="color: #ff4500;">6</span>:<span style="color: #ff4500;">8</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + \
          <span style="color: #483d8b;">'f=%s&amp;'</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>end_date<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>:<span style="color: #ff4500;">4</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + \
          <span style="color: #483d8b;">'g=d&amp;'</span> + \
          <span style="color: #483d8b;">'a=%s&amp;'</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>start_date<span style="color: black;">&#91;</span><span style="color: #ff4500;">4</span>:<span style="color: #ff4500;">6</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> - <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span> + \
          <span style="color: #483d8b;">'b=%s&amp;'</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>start_date<span style="color: black;">&#91;</span><span style="color: #ff4500;">6</span>:<span style="color: #ff4500;">8</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + \
          <span style="color: #483d8b;">'c=%s&amp;'</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>start_date<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>:<span style="color: #ff4500;">4</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + \
          <span style="color: #483d8b;">'ignore=.csv'</span>
    days = <span style="color: #dc143c;">urllib</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>.<span style="color: black;">readlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    data = <span style="color: black;">&#91;</span>day<span style="color: black;">&#91;</span>:-<span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">','</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> day <span style="color: #ff7700;font-weight:bold;">in</span> days<span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> data</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2010/01/27/vix-reversal-trigger-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>daily vix chart</title>
		<link>http://billimek.com/jeff/2010/01/22/daily-vix-chart/</link>
		<comments>http://billimek.com/jeff/2010/01/22/daily-vix-chart/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 20:16:44 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1464</guid>
		<description><![CDATA[A bash script to email an inline image of the previous 15-day ^VIX index chart:
daily_stocks.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# requires: basename,date,sed,sendmail,uuencode,wget
# portions of this taken from http://www.zedwood.com/article/103/bash-send-mail-with-an-attachment
&#160;
function fappend &#123;
    echo &#34;$2&#34;&#62;&#62;$1;
&#125;
DATE=`date +%F`
&#160;
# CHANGE THESE
SYMBOL=&#34;\$VIX&#34;
DAYS=&#34;15&#34;
URL=&#34;http://stockcharts.com/c-sc/sc?s=${SYMBOL}&#38;p=D&#38;yr=0&#38;mn=0&#38;dy=${DAYS}&#38;i=p16348210875&#38;r=4872&#34;
TOEMAIL=redacted
FREMAIL=redacted
SUBJECT=&#34;Daily ${SYMBOL} for `date +%c`&#34;;
ATTACHMENT=&#34;/tmp/${SYMBOL}-${DATE}.png&#34;
&#160;
# DON'T CHANGE ANYTHING BELOW
TMP=&#34;/tmp/tmpfil_123&#34;$RANDOM;
FILENAME=`basename $ATTACHMENT`
&#160;
# Fetch the daily chart and put it into ${TMP}.png
/opt/local/bin/wget -q -O ${TMP}.png &#34;${URL}&#34;
&#160;
rm [...]]]></description>
			<content:encoded><![CDATA[<p>A bash script to email an inline image of the previous 15-day <a href="http://finance.yahoo.com/q?s=^VIX">^VIX index</a> chart:<br />
<strong>daily_stocks.sh</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># requires: basename,date,sed,sendmail,uuencode,wget</span>
<span style="color: #666666; font-style: italic;"># portions of this taken from http://www.zedwood.com/article/103/bash-send-mail-with-an-attachment</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> fappend <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$2&quot;</span><span style="color: #000000; font-weight: bold;">&gt;&gt;</span>$<span style="color: #000000;">1</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #007800;">DATE</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>F<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># CHANGE THESE</span>
<span style="color: #007800;">SYMBOL</span>=<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>VIX&quot;</span>
<span style="color: #007800;">DAYS</span>=<span style="color: #ff0000;">&quot;15&quot;</span>
<span style="color: #007800;">URL</span>=<span style="color: #ff0000;">&quot;http://stockcharts.com/c-sc/sc?s=<span style="color: #007800;">${SYMBOL}</span>&amp;p=D&amp;yr=0&amp;mn=0&amp;dy=<span style="color: #007800;">${DAYS}</span>&amp;i=p16348210875&amp;r=4872&quot;</span>
<span style="color: #007800;">TOEMAIL</span>=redacted
<span style="color: #007800;">FREMAIL</span>=redacted
<span style="color: #007800;">SUBJECT</span>=<span style="color: #ff0000;">&quot;Daily <span style="color: #007800;">${SYMBOL}</span> for <span style="color: #780078;">`date +%c`</span>&quot;</span>;
<span style="color: #007800;">ATTACHMENT</span>=<span style="color: #ff0000;">&quot;/tmp/<span style="color: #007800;">${SYMBOL}</span>-<span style="color: #007800;">${DATE}</span>.png&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># DON'T CHANGE ANYTHING BELOW</span>
<span style="color: #007800;">TMP</span>=<span style="color: #ff0000;">&quot;/tmp/tmpfil_123&quot;</span><span style="color: #007800;">$RANDOM</span>;
<span style="color: #007800;">FILENAME</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #007800;">$ATTACHMENT</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Fetch the daily chart and put it into ${TMP}.png</span>
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-q</span> <span style="color: #660033;">-O</span> <span style="color: #800000;">${TMP}</span>.png <span style="color: #ff0000;">&quot;<span style="color: #007800;">${URL}</span>&quot;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #007800;">$TMP</span>;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #800000;">${TMP}</span>.png <span style="color: #000000; font-weight: bold;">|</span> uuencode <span style="color: #660033;">-m</span> <span style="color: #007800;">$FILENAME</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #007800;">$TMP</span>;
<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'1,1d'</span> <span style="color: #007800;">$TMP</span>;<span style="color: #666666; font-style: italic;">#removes first &amp; last lines from $TMP</span>
<span style="color: #007800;">DATA</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$TMP</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #800000;">${TMP}</span>.png
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #007800;">$TMP</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;From: <span style="color: #007800;">$FREMAIL</span>&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;To: <span style="color: #007800;">$TOEMAIL</span>&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;Reply-To: <span style="color: #007800;">$FREMAIL</span>&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;Subject: <span style="color: #007800;">$SUBJECT</span>&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;Content-Type: image/png; name=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$FILENAME</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;Content-Transfer-Encoding: base64&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;Content-Disposition: inline; filename=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$FILENAME</span><span style="color: #000099; font-weight: bold;">\&quot;</span>;&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DATA</span>&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;&quot;</span>;
fappend <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;&quot;</span>;
<span style="color: #666666; font-style: italic;">#cat $TMP&gt;out.txt</span>
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$TMP</span><span style="color: #000000; font-weight: bold;">|/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sendmail</span> -t;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$TMP</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># sleep for 10 seconds to prevent launchd cleanup</span>
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">10</span></pre></td></tr></table></div>

<p>Now, the launchd plist (think cron for OSX) to invoke the script every weekday at 4pm:<br />
<strong>com.billimek.stocks.plist</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;">&lt; ?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;">&lt; !DOCTYPE plist PUBLIC <span style="color: #ff0000;">&quot;-//Apple//DTD PLIST 1.0//EN&quot;</span> <span style="color: #ff0000;">&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plist</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>AbandonProcessGroup<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;true</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Disabled<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;false</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Label<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.billimek.stocks<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>LowPriorityIO<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;true</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Nice<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProgramArguments<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/usr/local/bin/daily_stocks.sh<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>StartCalendarInterval<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hour<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>16<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Minute<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>00<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Weekday<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hour<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>16<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Minute<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>00<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Weekday<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hour<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>16<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Minute<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>00<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Weekday<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hour<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>16<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Minute<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>00<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Weekday<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hour<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>16<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Minute<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>00<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Weekday<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/integer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>UserName<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jeff<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>This is what it looks like as an email on my iphone:<br />
<a href="http://billimek.com/jeff/wp-content/uploads/2010/01/daily-vix-example-email.jpg"><img src="http://billimek.com/jeff/wp-content/uploads/2010/01/daily-vix-example-email.jpg" alt="daily vix example email" title="daily vix example email" width="320" height="480" class="size-full wp-image-1471" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2010/01/22/daily-vix-chart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jeff&#8217;s photography metadata statistics</title>
		<link>http://billimek.com/jeff/2010/01/01/jeffs-photography-metadata-statistics/</link>
		<comments>http://billimek.com/jeff/2010/01/01/jeffs-photography-metadata-statistics/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 15:24:07 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1460</guid>
		<description><![CDATA[Some fun statistics from my photograph library (lightroom) that contains photographs from 2002 through present-day:
48,711 photos total
5,839 with 3 stars (good enough to publish)
&#8212;Top 6 camera models used:

20,486: Canon EOS 5D
10,698: Canon EOS 10D
10,429: Canon EOS 20D
2,837: Minolta Dimage 7i
2,593: Canon PowerShot D=S410
512: Canon EOS 1Ds Mark III

&#8212;Top 7 Lenses used:

8,712: EF17-40mm f/4L USM 8,712
7,317: [...]]]></description>
			<content:encoded><![CDATA[<p>Some fun statistics from my photograph library (lightroom) that contains photographs from 2002 through present-day:</p>
<p>48,711 photos total<br />
5,839 with 3 stars (good enough to publish)</p>
<p>&#8212;Top 6 camera models used:</p>
<ul>
<li>20,486: Canon EOS 5D</li>
<li>10,698: Canon EOS 10D</li>
<li>10,429: Canon EOS 20D</li>
<li>2,837: Minolta Dimage 7i</li>
<li>2,593: Canon PowerShot D=S410</li>
<li>512: Canon EOS 1Ds Mark III</li>
</ul>
<p>&#8212;Top 7 Lenses used:</p>
<ul>
<li>8,712: EF17-40mm f/4L USM 8,712</li>
<li>7,317: EF50mm f/1.8</li>
<li>7,038: EF70-200mm f/2.8L IF USM</li>
<li>6,949: EF28-135mm IF USM</li>
<li>5,153: 15mm Fisheye</li>
<li>3,592: EF100mm f/2.8L Macro USM</li>
<li>1,239: EF24-70mm USM</li>
</ul>
<p>&#8212;Top 7 names tagged:</p>
<ul>
<li>6,318: Ansley Billimek</li>
<li>5,067: Jennifer Billimek</li>
<li>3,191: Jeff Billimek</li>
<li>1,674: Larry Billimek</li>
<li>1,405: Tucker Billimek</li>
<li>1,173: Brinley Billimek</li>
<li>1,140: Lily Billimek</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2010/01/01/jeffs-photography-metadata-statistics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nom nom nom</title>
		<link>http://billimek.com/jeff/2009/08/07/nom-nom-nom/</link>
		<comments>http://billimek.com/jeff/2009/08/07/nom-nom-nom/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 17:42:26 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1431</guid>
		<description><![CDATA[So Jen and I went through the starbucks drive-thru and they gave us a free sample of their cinnamon roll.  Jen didn&#8217;t want any so I gladly ate it.  It was good and I made cookie-monster sounds as I ate, &#8220;Nom Nom Nom&#8221;.  Jen gave me that look again.  I was all, &#8220;well at least [...]]]></description>
			<content:encoded><![CDATA[<p>So Jen and I went through the starbucks drive-thru and they gave us a free sample of their cinnamon roll.  Jen didn&#8217;t want any so I gladly ate it.  It was good and I made cookie-monster sounds as I ate, &#8220;Nom Nom Nom&#8221;.  Jen gave me <em>that look</em> again.  I was all, &#8220;well at least I&#8217;m not making pig noises as I eat&#8221;.  And then I had a funny thought which I shared with Jen: &#8220;Why don&#8217;t we go to a fancy restaurant and  make squealing noises like pigs while we eat?&#8221;  As I imagined this in my minds-eye it seemed really funny  and I started laughing hysterically.  Jen didn&#8217;t find it funny though.  Jen was all, &#8220;I&#8217;m glad you can make yourself laugh.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2009/08/07/nom-nom-nom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>working too many hours</title>
		<link>http://billimek.com/jeff/2007/05/30/working-too-many-hours/</link>
		<comments>http://billimek.com/jeff/2007/05/30/working-too-many-hours/#comments</comments>
		<pubDate>Thu, 31 May 2007 03:30:23 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1456</guid>
		<description><![CDATA[So after I went back to sleep this morning I got a call a couple of hours later from my director.  Aparantly there were some problems with the sever and he needed my help.  I worked on this until about 6pm.  I worked from home all day today.
Jen had taken my car to work today [...]]]></description>
			<content:encoded><![CDATA[<p>So after I went back to sleep this morning I got a call a couple of hours later from my director.  Aparantly there were some problems with the sever and he needed my help.  I worked on this until about 6pm.  I worked from home all day today.</p>
<p>Jen had taken my car to work today and brought it home washed.  It looked great and I was so excited that it was nice and clean!  She also had gone shopping and bought some new tennis shirts for me and some new tennis skirts for herself.  I made tofu rubens for dinner tonight.  Jennifer thought that I was a little grumpy but I explained that I was just tired.</p>
<p>I&#8217;m a terrible cook and managed to make the tofu chewy.  This is something that Jennifer has never seen done before.  After dinner we watched an episode of &#8216;24&#8242;.</p>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2007/05/30/working-too-many-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>production support</title>
		<link>http://billimek.com/jeff/2007/05/29/production-support/</link>
		<comments>http://billimek.com/jeff/2007/05/29/production-support/#comments</comments>
		<pubDate>Wed, 30 May 2007 03:59:46 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1454</guid>
		<description><![CDATA[When I got home from work today I took a nap as I was very tired.  I went to bed at 10pm and woke up at 1:40am to do more work on the server migration.  There were issues and it took longer than expected.  I didn&#8217;t finish until about 5am.  I went to bed but [...]]]></description>
			<content:encoded><![CDATA[<p>When I got home from work today I took a nap as I was very tired.  I went to bed at 10pm and woke up at 1:40am to do more work on the server migration.  There were issues and it took longer than expected.  I didn&#8217;t finish until about 5am.  I went to bed but then was paged an hour later.  There were more problems.</p>
<p>I worked on this some more while Jennifer woke up, showered, dressed, and left.  I continued to work until about 7am at which point I went to bed again.</p>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2007/05/29/production-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>memorial day</title>
		<link>http://billimek.com/jeff/2007/05/28/memorial-day-2/</link>
		<comments>http://billimek.com/jeff/2007/05/28/memorial-day-2/#comments</comments>
		<pubDate>Tue, 29 May 2007 03:59:18 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1452</guid>
		<description><![CDATA[Because it is Memorial Day, Jennifer had off from work.  I didn&#8217;t.  She was still in bed when I left this morning at 8:30am.  It was very quiet at work today.  This evening I spent a lot of time working on a unix server patch failover.  I ended up working from 11pm until 3am.  Kumar [...]]]></description>
			<content:encoded><![CDATA[<p>Because it is Memorial Day, Jennifer had off from work.  I didn&#8217;t.  She was still in bed when I left this morning at 8:30am.  It was very quiet at work today.  This evening I spent a lot of time working on a unix server patch failover.  I ended up working from 11pm until 3am.  Kumar helped too.</p>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2007/05/28/memorial-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>more dogsitting</title>
		<link>http://billimek.com/jeff/2007/05/27/more-dogsitting/</link>
		<comments>http://billimek.com/jeff/2007/05/27/more-dogsitting/#comments</comments>
		<pubDate>Mon, 28 May 2007 03:00:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1449</guid>
		<description><![CDATA[Sydney woke Jennifer and I up this morning &#8211; we aren&#8217;t used to that.  Jen started to freak out because she couldn&#8217;t find any coffee in the house and had to leave right away to go find some.  She came back a little while later with some coffee and some doughnuts for me.  How nice!
We [...]]]></description>
			<content:encoded><![CDATA[<p>Sydney woke Jennifer and I up this morning &#8211; we aren&#8217;t used to that.  Jen started to freak out because she couldn&#8217;t find any coffee in the house and had to leave right away to go find some.  She came back a little while later with some coffee and some doughnuts for me.  How nice!</p>
<p>We sat outside on the back deck and talked.  It was a nice morning out but there was a lot of smoke in the air form the huge fires in south Georgia.  Jen made plans to go over to Scott&#8217;s house to help him paint.  She asked that I stay behind and keep and eye on the dogs.  I&#8217;m all for that!</p>
<p>So I played Gears of War again for hours and made it all the way to act 4 but then got tired of playing.  So I switched over to Guitar Hero.  All day long the dogs slept.  Is that all they do is sleep all day long?  Next I worked on the laptop some.  OpenVPN works great &#8211; it&#8217;s like I&#8217;ve never left my home network (only that access is slower).</p>
<p>I packed up and went home.  Jen was still at Scott&#8217;s house so I worked on laundry and did some work on the PC downstairs.  Jen got home and we went out to dinner.  First we tried to go over to M&amp;T but they are closed on Sunday so instead we went to Marlow&#8217;s tavern in vinings.  It was nice out so we sat outside.</p>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2007/05/27/more-dogsitting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dogsitting</title>
		<link>http://billimek.com/jeff/2007/05/26/dogsitting-2/</link>
		<comments>http://billimek.com/jeff/2007/05/26/dogsitting-2/#comments</comments>
		<pubDate>Sun, 27 May 2007 03:59:58 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1446</guid>
		<description><![CDATA[It was a pretty busy day today.  It started out with Jen and I doing a step class at our gym.  Once we finished that we went home, showered, packed up, and headed over to the Barett Parkway area to do some shopping.  Jen returned some items to T.J. Maxx and I got a haircut [...]]]></description>
			<content:encoded><![CDATA[<p>It was a pretty busy day today.  It started out with Jen and I doing a step class at our gym.  Once we finished that we went home, showered, packed up, and headed over to the Barett Parkway area to do some shopping.  Jen returned some items to T.J. Maxx and I got a haircut with Tami and Studio 8 Salon.  She did a great job as always!  Once that was done Jennifer and I looked at court shoes at DSW but didn&#8217;t see anything that we liked.</p>
<p>Next we went over to Katie &amp; Chris&#8217;s house.  They are out of town and we are dogsitting for them.  I helped Jennifer hang some shelves and then played Gears of War for a while.  Later we went over to the neighborhood tennis courts and played some tennis.  It was very hot outside but still fun.  We played three sets.</p>
<p>Lisa was having a party tonight so we went over to her house.  The party went from 7:30pm till 11:30pm.  I had some hotdogs.  We went back to Katie&#8217;s house where I proceeded to stay up very late playing Gears of War on Chris&#8217;s Xbox 360. I don&#8217;t have one so this was a fun treat.</p>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2007/05/26/dogsitting-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>openvpn</title>
		<link>http://billimek.com/jeff/2007/05/25/openvpn/</link>
		<comments>http://billimek.com/jeff/2007/05/25/openvpn/#comments</comments>
		<pubDate>Sat, 26 May 2007 03:59:36 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://billimek.com/jeff/?p=1443</guid>
		<description><![CDATA[It was quiet at work this Friday and I worked on system test &#8217;string testing&#8217; (connectivity) items.  I also met with Ningyu today and feel that this promotion thing is an uphill battle.
When I got home I was pretty tired and took a quick nap.  Jan, Sandy, and Scott came over for dinner.  We had [...]]]></description>
			<content:encoded><![CDATA[<p>It was quiet at work this Friday and I worked on system test &#8217;string testing&#8217; (connectivity) items.  I also met with Ningyu today and feel that this promotion thing is an uphill battle.</p>
<p>When I got home I was pretty tired and took a quick nap.  Jan, Sandy, and Scott came over for dinner.  We had salad and grilled salmon with fresh-baked cookies for desert.  It was a nice time.</p>
<p>Later in the evening I set up openvpn on the laptop and published photos from the recent St. Maarten trip.</p>
]]></content:encoded>
			<wfw:commentRss>http://billimek.com/jeff/2007/05/25/openvpn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
