Sunday, March 21, 2010

Russell 3000 Weekly Stats (03/15/10-03/19/10)

Key Figures Russell 3000 IWV
Total Active Components2967 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 251 (1.69%) 0 (0.00%)
# All-time Closing Lows 18 (0.12%) 0 (0.00%)

# Higher Closes 7338 (49.46%) 2 (40.00%)
# Lower Closes 7079 (47.72%) 3 (60.00%)

Total Gains/Losses $183.19 (0.05%) $0.45 (0.13%)
Average True Range (3.09%) (0.89%)

* Results are cumulative for the period.

Price verification found 0 errors

Friday, March 19, 2010

Russell 3000 Daily Stats (03/19/10)

Key Figures Russell 3000 IWV
Total Active Components2967 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 32 (1.08%) 0 (0.00%)
# All-time Closing Lows 4 (0.13%) 0 (0.00%)

# Higher Closes 931 (31.38%) 0 (0.00%)
# Lower Closes 1980 (66.73%) 1 (100.00%)

Total Gains/Losses $-543.55 (-0.68%) $-0.42 (-0.61%)
Average True Range (3.69%) (1.29%)

* Results are cumulative for the period.

Price verification found 0 errors

Thursday, March 18, 2010

Russell 3000 Daily Stats (03/18/10)

Key Figures Russell 3000 IWV
Total Active Components2967 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 44 (1.48%) 0 (0.00%)
# All-time Closing Lows 5 (0.17%) 0 (0.00%)

# Higher Closes 1164 (39.23%) 0 (0.00%)
# Lower Closes 1700 (57.30%) 1 (100.00%)

Total Gains/Losses $-240.15 (-0.30%) $-0.07 (-0.10%)
Average True Range (2.86%) (0.52%)

* Results are cumulative for the period.

Price verification found 0 errors

Wednesday, March 17, 2010

Russell 3000 Daily Stats (03/17/10)

Key Figures Russell 3000 IWV
Total Active Components2967 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 71 (2.39%) 0 (0.00%)
# All-time Closing Lows 5 (0.17%) 0 (0.00%)

# Higher Closes 1941 (65.42%) 1 (100.00%)
# Lower Closes 941 (31.72%) 0 (0.00%)

Total Gains/Losses $526.39 (0.66%) $0.40 (0.58%)
Average True Range (2.95%) (0.92%)

* Results are cumulative for the period.

Price verification found 0 errors

Monday, March 15, 2010

Russell 3000 Daily Stats (03/15/10)

Key Figures Russell 3000 IWV
Total Active Components2967 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 42 (1.42%) 0 (0.00%)
# All-time Closing Lows 3 (0.10%) 0 (0.00%)

# Higher Closes 1246 (42.00%) 0 (0.00%)
# Lower Closes 1627 (54.84%) 1 (100.00%)

Total Gains/Losses $-171.96 (-0.22%) $-0.07 (-0.10%)
Average True Range (3.03%) (0.81%)

* Results are cumulative for the period.

Price verification found 0 errors

TaylorTrade weekly Stats (03/08/10-03/12/10)

Key Figures TaylorTrade SPY
Active Components29 1
Entries this period0 0
Exits this period0 0
IPOs this period0 0
Inactive this period0 0
Missing in PriceDB0 0

# 1yr Closing Highs 20 (13.79%) 2 (40.00%)
# 1yr Closing Lows 0 (0.00%) 0 (0.00%)

roc250 >= 0.0 145 (100.00%) 5 (100.00%)
roc250 < 0.0 0 (0.00%) 0 (0.00%)

sma50 > sma200 123 (84.83%) 5 (100.00%)
sma50 <= sma200 22 (15.17%) 0 (0.00%)

# Higher Closes 81 (55.86%) 5 (100.00%)
# Lower Closes 64 (44.14%) 0 (0.00%)

Total Gains/Losses $15.31 (0.18%) $1.21 (0.21%)
Average True Range (2.17%) (0.77%)

* Results are cumulative for the period.

Sunday, March 14, 2010

Russell 3000 Weekly Stats (03/08/10-03/12/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 252 (1.70%) 0 (0.00%)
# All-time Closing Lows 7 (0.05%) 0 (0.00%)

# Higher Closes 8187 (55.17%) 4 (80.00%)
# Lower Closes 6196 (41.75%) 1 (20.00%)

Total Gains/Losses $945.92 (0.24%) $0.76 (0.22%)
Average True Range (2.98%) (0.78%)

* Results are cumulative for the period.

Price verification found 0 errors

Friday, March 12, 2010

Russell 3000 Daily Stats (03/12/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 50 (1.68%) 0 (0.00%)
# All-time Closing Lows 2 (0.07%) 0 (0.00%)

# Higher Closes 1302 (43.87%) 1 (100.00%)
# Lower Closes 1577 (53.13%) 0 (0.00%)

Total Gains/Losses $7.76 (0.01%) $0.04 (0.06%)
Average True Range (2.91%) (0.76%)

* Results are cumulative for the period.

Price verification found 0 errors

Thursday, March 11, 2010

Russell 3000 Daily Stats (03/11/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 58 (1.95%) 0 (0.00%)
# All-time Closing Lows 1 (0.03%) 0 (0.00%)

# Higher Closes 1741 (58.66%) 1 (100.00%)
# Lower Closes 1117 (37.63%) 0 (0.00%)

Total Gains/Losses $242.81 (0.31%) $0.26 (0.38%)
Average True Range (2.99%) (1.02%)

* Results are cumulative for the period.

Price verification found 0 errors

Wednesday, March 10, 2010

Russell 3000 Daily Stats (03/10/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 53 (1.79%) 0 (0.00%)
# All-time Closing Lows 2 (0.07%) 0 (0.00%)

# Higher Closes 1969 (66.34%) 1 (100.00%)
# Lower Closes 923 (31.10%) 0 (0.00%)

Total Gains/Losses $404.97 (0.52%) $0.34 (0.50%)
Average True Range (3.11%) (0.76%)

* Results are cumulative for the period.

Price verification found 0 errors

Tuesday, March 09, 2010

Russell 3000 Daily Stats (03/09/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 39 (1.31%) 0 (0.00%)
# All-time Closing Lows 0 (0.00%) 0 (0.00%)

# Higher Closes 1649 (55.56%) 1 (100.00%)
# Lower Closes 1226 (41.31%) 0 (0.00%)

Total Gains/Losses $175.79 (0.23%) $0.16 (0.24%)
Average True Range (3.12%) (1.03%)

* Results are cumulative for the period.

Price verification found 0 errors

Monday, March 08, 2010

Russell 3000 Daily Stats (03/08/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 52 (1.75%) 0 (0.00%)
# All-time Closing Lows 2 (0.07%) 0 (0.00%)

# Higher Closes 1526 (51.42%) 0 (0.00%)
# Lower Closes 1354 (45.62%) 1 (100.00%)

Total Gains/Losses $114.76 (0.15%) $-0.04 (-0.06%)
Average True Range (2.75%) (0.36%)

* Results are cumulative for the period.

Price verification found 0 errors

Sunday, March 07, 2010

Russell 3000 Weekly Stats (03/01/10-03/05/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period2 0
# All-time Closing Highs 253 (1.70%) 0 (0.00%)
# All-time Closing Lows 16 (0.11%) 0 (0.00%)

# Higher Closes 10494 (70.71%) 5 (100.00%)
# Lower Closes 3999 (26.95%) 0 (0.00%)

Total Gains/Losses $3614.86 (0.95%) $2.37 (0.72%)
Average True Range (3.26%) (1.05%)

* Results are cumulative for the period.

Price verification found 0 errors

Friday, March 05, 2010

Russell 3000 Daily Stats (03/05/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 69 (2.32%) 0 (0.00%)
# All-time Closing Lows 1 (0.03%) 0 (0.00%)

# Higher Closes 2641 (88.98%) 1 (100.00%)
# Lower Closes 282 (9.50%) 0 (0.00%)

Total Gains/Losses $1293.76 (1.69%) $1.07 (1.61%)
Average True Range (3.44%) (1.61%)

* Results are cumulative for the period.

Price verification found 0 errors

Thursday, March 04, 2010

Russell 3000 Daily Stats (03/04/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 44 (1.48%) 0 (0.00%)
# All-time Closing Lows 3 (0.10%) 0 (0.00%)

# Higher Closes 1790 (60.31%) 1 (100.00%)
# Lower Closes 1086 (36.59%) 0 (0.00%)

Total Gains/Losses $370.00 (0.48%) $0.15 (0.23%)
Average True Range (2.90%) (0.62%)

* Results are cumulative for the period.

Price verification found 0 errors

Wednesday, March 03, 2010

Russell 3000 Daily Stats (03/03/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 33 (1.11%) 0 (0.00%)
# All-time Closing Lows 5 (0.17%) 0 (0.00%)

# Higher Closes 1485 (50.03%) 1 (100.00%)
# Lower Closes 1405 (47.34%) 0 (0.00%)

Total Gains/Losses $71.52 (0.09%) $0.09 (0.14%)
Average True Range (3.10%) (0.83%)

* Results are cumulative for the period.

Price verification found 0 errors

Tuesday, March 02, 2010

Russell 3000 Daily Stats (03/02/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 56 (1.89%) 0 (0.00%)
# All-time Closing Lows 3 (0.10%) 0 (0.00%)

# Higher Closes 2045 (68.90%) 1 (100.00%)
# Lower Closes 837 (28.20%) 0 (0.00%)

Total Gains/Losses $588.89 (0.78%) $0.25 (0.38%)
Average True Range (3.16%) (0.84%)

* Results are cumulative for the period.

Price verification found 0 errors

Monday, March 01, 2010

Russell 3000 Daily Stats (03/01/10)

Key Figures Russell 3000 IWV
Total Active Components2968 1
Total New Listings this period0 0
Total Inactive this period2 0
# All-time Closing Highs 51 (1.72%) 0 (0.00%)
# All-time Closing Lows 4 (0.13%) 0 (0.00%)

# Higher Closes 2532 (85.31%) 1 (100.00%)
# Lower Closes 389 (13.11%) 0 (0.00%)

Total Gains/Losses $1291.77 (1.74%) $0.81 (1.25%)
Average True Range (3.71%) (1.35%)

* Results are cumulative for the period.

Price verification found 0 errors

Sunday, February 28, 2010

TaylorTrade weekly Stats (02/22/10-02/26/10)

Key Figures TaylorTrade SPY
Active Components29 1
Entries this period0 0
Exits this period0 0
IPOs this period0 0
Inactive this period0 0
Missing in PriceDB0 0

# 1yr Closing Highs 6 (4.14%) 0 (0.00%)
# 1yr Closing Lows 0 (0.00%) 0 (0.00%)

roc250 >= 0.0 143 (98.62%) 5 (100.00%)
roc250 <>2 (1.38%) 0 (0.00%)

sma50 > sma200 120 (82.76%) 5 (100.00%)
sma50 <= sma200 25 (17.24%) 0 (0.00%)

# Higher Closes 70 (48.28%) 3 (60.00%)
# Lower Closes 71 (48.97%) 2 (40.00%)

Total Gains/Losses $6.06 (0.07%) $-0.40 (-0.07%)
Average True Range (2.30%) (1.18%)

* Results are cumulative for the period.

Russell 3000 Weekly Stats (02/22/10-02/26/10)

Key Figures Russell 3000 IWV
Total Active Components2971 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 104 (0.70%) 0 (0.00%)
# All-time Closing Lows 21 (0.14%) 0 (0.00%)

# Higher Closes 6811 (45.86%) 1 (20.00%)
# Lower Closes 7652 (51.52%) 4 (80.00%)

Total Gains/Losses $-158.63 (-0.04%) $-0.36 (-0.11%)
Average True Range (3.26%) (1.14%)

* Results are cumulative for the period.

Price verification found 0 errors

Thursday, February 25, 2010

Russell 3000 Daily Stats (02/25/10)

Key Figures Russell 3000 IWV
Total Active Components2970 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 29 (0.98%) 0 (0.00%)
# All-time Closing Lows 5 (0.17%) 0 (0.00%)

# Higher Closes 1315 (44.28%) 0 (0.00%)
# Lower Closes 1562 (52.59%) 1 (100.00%)

Total Gains/Losses $-0.09 (-0.00%) $-0.06 (-0.09%)
Average True Range (3.69%) (1.64%)

* Results are cumulative for the period.

Price verification found 0 errors

Wednesday, February 24, 2010

Russell 3000 Daily Stats (02/24/10)

Key Figures Russell 3000 IWV
Total Active Components2970 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 23 (0.77%) 0 (0.00%)
# All-time Closing Lows 4 (0.13%) 0 (0.00%)

# Higher Closes 2142 (72.12%) 1 (100.00%)
# Lower Closes 760 (25.59%) 0 (0.00%)

Total Gains/Losses $619.25 (0.84%) $0.57 (0.88%)
Average True Range (3.08%) (1.04%)

* Results are cumulative for the period.

Price verification found 0 errors

Tuesday, February 23, 2010

Russell 3000 Daily Stats (02/23/10)

Key Figures Russell 3000 IWV
Total Active Components2971 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 10 (0.34%) 0 (0.00%)
# All-time Closing Lows 3 (0.10%) 0 (0.00%)

# Higher Closes 693 (23.33%) 0 (0.00%)
# Lower Closes 2213 (74.49%) 1 (100.00%)

Total Gains/Losses $-789.68 (-1.06%) $-0.81 (-1.24%)
Average True Range (3.43%) (1.50%)

* Results are cumulative for the period.

Price verification found 0 errors

Monday, February 22, 2010

Russell 3000 Daily Stats (02/22/10)

Key Figures Russell 3000 IWV
Total Active Components2971 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 24 (0.81%) 0 (0.00%)
# All-time Closing Lows 3 (0.10%) 0 (0.00%)

# Higher Closes 1478 (49.75%) 0 (0.00%)
# Lower Closes 1404 (47.26%) 1 (100.00%)

Total Gains/Losses $70.83 (0.09%) $-0.04 (-0.06%)
Average True Range (2.88%) (0.69%)

* Results are cumulative for the period.

Price verification found 0 errors

TaylorTrade weekly Stats (02/16/10-02/19/10)

Key Figures TaylorTrade SPY
Active Components29 1
Entries this period0 0
Exits this period0 0
IPOs this period0 0
Inactive this period0 0
Missing in PriceDB0 0

# 1yr Closing Highs 8 (6.90%) 0 (0.00%)
# 1yr Closing Lows 0 (0.00%) 0 (0.00%)

50sma > 200sma 99 (85.34%) 4 (100.00%)
50sma <= 200sma 17 (14.66%) 0 (0.00%)

# Higher Closes 79 (68.10%) 4 (100.00%)
# Lower Closes 37 (31.90%) 0 (0.00%)

Total Gains/Losses $34.76 (0.54%) $3.10 (0.71%)
Average True Range (2.27%) (1.14%)

* Results are cumulative for the period.

Sunday, February 21, 2010

Russell 3000 Weekly Stats (02/16/10-02/19/10)

Key Figures Russell 3000 IWV
Total Active Components2973 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 101 (0.85%) 0 (0.00%)
# All-time Closing Lows 16 (0.13%) 0 (0.00%)

# Higher Closes 8175 (68.75%) 4 (100.00%)
# Lower Closes 3373 (28.37%) 0 (0.00%)

Total Gains/Losses $2351.58 (0.80%) $1.95 (0.76%)
Average True Range (3.16%) (1.10%)

* Results are cumulative for the period.

Price verification found 0 errors

Friday, February 19, 2010

Russell 3000 Daily Stats (02/19/10)

Key Figures Russell 3000 IWV
Total Active Components2972 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 29 (0.98%) 0 (0.00%)
# All-time Closing Lows 3 (0.10%) 0 (0.00%)

# Higher Closes 1764 (59.35%) 1 (100.00%)
# Lower Closes 1110 (37.35%) 0 (0.00%)

Total Gains/Losses $258.09 (0.35%) $0.17 (0.26%)
Average True Range (3.08%) (1.03%)

* Results are cumulative for the period.

Price verification found 0 errors

Thursday, February 18, 2010

Russell 3000 Daily Stats (02/18/10)

Key Figures Russell 3000 IWV
Total Active Components2973 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 30 (1.01%) 0 (0.00%)
# All-time Closing Lows 6 (0.20%) 0 (0.00%)

# Higher Closes 2043 (68.72%) 1 (100.00%)
# Lower Closes 849 (28.56%) 0 (0.00%)

Total Gains/Losses $473.62 (0.64%) $0.39 (0.60%)
Average True Range (3.09%) (0.91%)

* Results are cumulative for the period.

Price verification found 0 errors

Wednesday, February 17, 2010

Russell 3000 Daily Stats (02/17/10)

Key Figures Russell 3000 IWV
Total Active Components2973 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 21 (0.71%) 0 (0.00%)
# All-time Closing Lows 3 (0.10%) 0 (0.00%)

# Higher Closes 1898 (63.84%) 1 (100.00%)
# Lower Closes 972 (32.69%) 0 (0.00%)

Total Gains/Losses $426.60 (0.58%) $0.39 (0.61%)
Average True Range (3.04%) (0.73%)

* Results are cumulative for the period.

Price verification found 0 errors

Tuesday, February 16, 2010

Russell 3000 Daily Stats (02/16/10)

Key Figures Russell 3000 IWV
Total Active Components2973 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 21 (0.71%) 0 (0.00%)
# All-time Closing Lows 4 (0.13%) 0 (0.00%)

# Higher Closes 2471 (83.11%) 1 (100.00%)
# Lower Closes 443 (14.90%) 0 (0.00%)

Total Gains/Losses $1193.50 (1.65%) $1.00 (1.58%)
Average True Range (3.44%) (1.72%)

* Results are cumulative for the period.

Price verification found 0 errors

Sunday, February 14, 2010

TaylorTrade weekly Stats (02/08/10-02/12/10)

Key Figures TaylorTrade SPY
Active Components29 1
Entries this period0 0
Exits this period0 0
IPOs this period0 0
Inactive this period0 0
Missing in PriceDB0 0

# 1yr Closing Highs 3 (2.07%) 0 (0.00%)
# 1yr Closing Lows 0 (0.00%) 0 (0.00%)

50sma > 200sma 137 (94.48%) 5 (100.00%)
50sma <= 200sma 8 (5.52%) 0 (0.00%)

# Higher Closes 85 (58.62%) 2 (40.00%)
# Lower Closes 60 (41.38%) 3 (60.00%)

Total Gains/Losses $32.12 (0.41%) $1.38 (0.26%)
Average True Range (2.93%) (1.66%)

* Results are cumulative for the period.

Russell 3000 Weekly Stats (02/08/10-02/12/10)

Key Figures Russell 3000 IWV
Total Active Components2975 1
Total New Listings this period0 0
Total Inactive this period2 0
# All-time Closing Highs 38 (0.26%) 0 (0.00%)
# All-time Closing Lows 39 (0.26%) 0 (0.00%)

# Higher Closes 8768 (58.95%) 3 (60.00%)
# Lower Closes 5747 (38.64%) 2 (40.00%)

Total Gains/Losses $1593.90 (0.45%) $0.90 (0.29%)
Average True Range (3.71%) (1.69%)

* Results are cumulative for the period.

Price verification found 0 errors

Friday, February 12, 2010

Russell 3000 Daily Stats (02/12/10)

Key Figures Russell 3000 IWV
Total Active Components2974 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 14 (0.47%) 0 (0.00%)
# All-time Closing Lows 7 (0.24%) 0 (0.00%)

# Higher Closes 1804 (60.66%) 1 (100.00%)
# Lower Closes 1092 (36.72%) 0 (0.00%)

Total Gains/Losses $316.38 (0.44%) $0.06 (0.09%)
Average True Range (3.63%) (1.52%)

* Results are cumulative for the period.

Price verification found 0 errors

Thursday, February 11, 2010

Trading Framework Part I: Tools I Use

I received a question from a reader regarding the software I use...more specifically...the open source software I use in trading. Instead of a direct response, I figured this type of question might be useful to other readers of this blog.

My basic trading framework is the following:
Operating System:Windows Vista Home Premium
Programming Languages:Python 2.6.2 & R 2.9.1
Databases:SQLite 2.4.1, Numpy 1.3.0, & CSV
Programming Editor:SciTE 1.78
Graphing Engines:Matplotlib 0.98.5 & R
GUI:HTML & JavaScript
Scheduler:Windows Task Scheduler
Shells:Command.com (DOS) & Cygwin (Bash)
Historical Quotes:CSI & Yahoo Finance

Operating System
Choosing Windows as the operating system is mainly out of convenience. As you can see above, the only real item that would prevent a full move to Linux is the historical quote provider, CSI. Everything else can run on another platform or a suitable alternative is available.

Another reason I've stayed with Windows is due to my current job (windows shop). But, I will admit, I have been very close to switching to a Mac the past few months or possibly OpenSUSE. Just haven't taken the bite yet.

On a side note, prior to my current employer...I worked for a University that was really ahead of its time. Every program we developed had to pass a compatibility test, "Could it easily run on another platform?" While this at times was an impossible task due to user requirements...we still always coded with this compatibility in mind. And I've kept this same philosophy in developing the trading simulation engine.

Programming Languages
I'm originally a Cobol programmer. Yes, that's right...if you've never heard of one...now you're reading a blog by one. Cobol programmers, the good ones, are very keen on whitespace. When you're throwing a lot of code around...the whitespace is what keeps you sane. And so, when I was trying out the various scripting languages back in the day...Python really struck my fancy. I spent the better part of 9 years trying to force programmers to keep the code pretty in Cobol. Only to see Python come around and truly force programmers to code clean. Over the years, I have worked in various other languages, but I've always stuck with Python.

I think another reason I chose Python was due to WealthLab's Scripting language (Pascal-based). I felt I could build an environment similar to WealthLab that would offer the same scripting ease. So far, Python has done a great job in keeping the framework simple and extensible.

Another language I have used from time to time in my trading is R. I use R mainly to analyze trading results. A few years ago, I actually developed a prototype of the trading simulation engine in R. But, it was too slow. The loops killed it. With the recent development of Revolution Computing's ParallelR...I've often wondered what the results would now be. But, I'm past the point of return with the engine in Python. But, as far as fast analysis of CSV files...it is really hard to beat R.

Databases
I struggled several years with how to store and retrieve the historical price series data for the trading simulation engine. The main problem was the data could not fit into memory yet access had to be extremely fast. So, for years I used plain CSV files to store the data.

Basically, reading the CSV files from CSI and writing out new price CSV files with my fixes from possible bad data along with additional calculated fields. At first I stored the data into 1 big CSV file. Then used either the DOS sort or Bash sort command to sort the file by date. I was afraid I would run into file size limits (at the time I was on Windows XP 32-bit). So, I started writing the data out to thousands of files broken down by date. Basically, each file was a date containing all the prices for that date. Worked really well...except analysis on the backend became difficult. Plus, it felt kludgy.

I had always tried to use regular databases for the pricing backend...but they couldn't handle the storage and retrieval rates I required. Just too slow. And yes, I tried all of them: MySQL, PostGreSQL, Firebird, Berkely DB, SQLite, etc.

It wasn't until I read an article by Bret Taylor covering how FriendFeed uses MySQL that I had an idea as to how to use a database to get the best of both worlds - fast storage & retrieval along with slick and easy access to the data. That's when I went back to SQLite and began a massive hacking of code while on a Texas Hill Country vacation. Really bumped the trading simulation engine to another level. The trick to fast storage & retrieval? Use less but bigger rows.

For a memory database? I use numpy. It's a fantastic in-memory multi-dimensional storage tool. I dump the price series from SQLite to numpy to enable row or column-wise retrieval. Only recently have I found the performance hit is a little too much. So, I've removed numpy from one side of the framework. And contemplating removing it from the other side as well. It takes more work to replicate numpy via a dictionary of dictionaries of lists. But, surprisingly, it is worth the effort when dealing with price series. Which means, I may not use numpy in the engine for long. Still a great tool to use for in-memory storage.

Graphing Engines and GUI
I really try to keep it simple in the front-end of the trading framework. I use Matplotlib to visualize price or trading results. And HTML along with Javascript to display trading statistics. Honestly, not a lot has gone into this side of things. Still very raw. My goal for 2010 is to work more in this area.

I have used R quite a bit in analyzing the output of the trading backtests. R is really powerful here. Quickly and easily chart and/or view pretty much any subset of the data you wish.

If there's certain items I look at over and over in the backtests...I'll typically replicate in Python & Matplotlib and include in the backtest results.

Editor, Schedulers, and Shells.
SciTE is hands down my favorite Python editor. I don't like the fancy IDE type stuff. SciTE keeps it simple.

Windows Task Scheduler is for the birds. I should know...my main job is centered around Enterprise Scheduling. But, the windows task scheduler gets the job done most of the time. I just have to code around a lot of the times it misses or doesn't get things quite right. Which is okay...that's life. That's one of the main reasons I have thought about switching to a nix box for cron and the like.

The DOS shell or Bash shell...I don't get too fancy in either. I do use the Bash shell quite a bit in performing global changes in the python code. Or back when the database was CSV based. Again, nix boxes win here. But, us windows developers hopefully can always get a copy of Cygwin to save the day.

Historical Quotes
I have used CSIdata for many years. Mainly for the following reasons:
  • Dividend-adjusted quotes which are essential if analyzing long-term trading systems.
  • Adjusted closing price - needed if you wish to test the exclusion of data based on the actual price traded - not the split-adjusted price.
  • CSV files - CSI does a great job of building and maintaining CSV files of price history.
  • Delisted data - I thought this would be a bigger deal but didn't really impact test results...but still nice to have for confirmation.
  • Data is used by several hedge funds and web sites such as Yahoo Finance.
The only drawback I have to CSI is the daily limit to the number of stocks you can export out of the product. It can get frustrating trying to work around the limit. Of course, you can always pony up for a higher limit.

This covers Part I of the series. Next up? The type of analysis I perform with the trading framework.

Later Trades,

MT

Russell 3000 Daily Stats (02/11/10)

Key Figures Russell 3000 IWV
Total Active Components2975 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 13 (0.44%) 0 (0.00%)
# All-time Closing Lows 4 (0.13%) 0 (0.00%)

# Higher Closes 2486 (83.56%) 1 (100.00%)
# Lower Closes 423 (14.22%) 0 (0.00%)

Total Gains/Losses $979.61 (1.38%) $0.63 (1.00%)
Average True Range (3.94%) (1.85%)

* Results are cumulative for the period.

Price verification found 0 errors

Wednesday, February 10, 2010

Russell 3000 Daily Stats (02/10/10)

Key Figures Russell 3000 IWV
Total Active Components2975 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 3 (0.10%) 0 (0.00%)
# All-time Closing Lows 8 (0.27%) 0 (0.00%)

# Higher Closes 1351 (45.41%) 0 (0.00%)
# Lower Closes 1530 (51.43%) 1 (100.00%)

Total Gains/Losses $-37.08 (-0.05%) $-0.07 (-0.11%)
Average True Range (3.46%) (1.43%)

* Results are cumulative for the period.

Price verification found 0 errors

Tuesday, February 09, 2010

Russell 3000 Daily Stats (02/09/10)

Key Figures Russell 3000 IWV
Total Active Components2975 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 6 (0.20%) 0 (0.00%)
# All-time Closing Lows 5 (0.17%) 0 (0.00%)

# Higher Closes 2465 (82.86%) 1 (100.00%)
# Lower Closes 454 (15.26%) 0 (0.00%)

Total Gains/Losses $937.69 (1.33%) $0.85 (1.37%)
Average True Range (3.80%) (2.20%)

* Results are cumulative for the period.

Price verification found 0 errors

Monday, February 08, 2010

Russell 3000 Daily Stats (02/08/10)

Key Figures Russell 3000 IWV
Total Active Components2975 1
Total New Listings this period0 0
Total Inactive this period2 0
# All-time Closing Highs 2 (0.07%) 0 (0.00%)
# All-time Closing Lows 15 (0.50%) 0 (0.00%)

# Higher Closes 662 (22.25%) 0 (0.00%)
# Lower Closes 2248 (75.56%) 1 (100.00%)

Total Gains/Losses $-602.84 (-0.85%) $-0.57 (-0.91%)
Average True Range (3.71%) (1.44%)

* Results are cumulative for the period.

Price verification found 0 errors

Sunday, February 07, 2010

TaylorTrade weekly Stats (02/01/10-02/05/10)

Key Figures TaylorTrade SPY
Active Components29 1
Entries this period0 0
Exits this period0 0
IPOs this period0 0
Inactive this period0 0
Missing in PriceDB0 0
# 1yr Closing Highs 2 (0.80%) 0 (0.00%)
# 1yr Closing Lows 0 (0.00%) 0 (0.00%)

# Higher Closes 123 (49.20%) 3 (60.00%)
# Lower Closes 127 (50.80%) 2 (40.00%)

Total Gains/Losses $-29.10 (-0.21%) $-0.73 (-0.13%)
Average True Range (3.00%) (1.86%)

* Results are cumulative for the period.

Russell 3000 Weekly Stats (02/01/10-02/05/10)

Key Figures Russell 3000 IWV
Total Active Components2979 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 30 (0.20%) 0 (0.00%)
# All-time Closing Lows 43 (0.29%) 0 (0.00%)

# Higher Closes 6851 (46.00%) 3 (60.00%)
# Lower Closes 7715 (51.80%) 2 (40.00%)

Total Gains/Losses $-867.29 (-0.24%) $-0.37 (-0.12%)
Average True Range (3.98%) (1.90%)

* Results are cumulative for the period.

Price verification found 0 errors

Friday, February 05, 2010

Russell 3000 Daily Stats (02/05/10)

Key Figures Russell 3000 IWV
Total Active Components2977 1
Total New Listings this period0 0
Total Inactive this period2 0
# All-time Closing Highs 3 (0.10%) 0 (0.00%)
# All-time Closing Lows 12 (0.40%) 0 (0.00%)

# Higher Closes 1765 (59.29%) 1 (100.00%)
# Lower Closes 1135 (38.13%) 0 (0.00%)

Total Gains/Losses $285.35 (0.40%) $0.17 (0.27%)
Average True Range (4.47%) (2.23%)

* Results are cumulative for the period.

Price verification found 0 errors

Thursday, February 04, 2010

Russell 3000 Daily Stats (02/04/10)

Key Figures Russell 3000 IWV
Total Active Components2979 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 3 (0.10%) 0 (0.00%)
# All-time Closing Lows 16 (0.54%) 0 (0.00%)

# Higher Closes 159 (5.34%) 0 (0.00%)
# Lower Closes 2782 (93.39%) 1 (100.00%)

Total Gains/Losses $-2292.51 (-3.14%) $-2.04 (-3.17%)
Average True Range (4.71%) (3.19%)

* Results are cumulative for the period.

Price verification found 0 errors

Wednesday, February 03, 2010

Russell 3000 Daily Stats (02/03/10)

Key Figures Russell 3000 IWV
Total Active Components2979 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 7 (0.23%) 0 (0.00%)
# All-time Closing Lows 8 (0.27%) 0 (0.00%)

# Higher Closes 932 (31.29%) 0 (0.00%)
# Lower Closes 1956 (65.66%) 1 (100.00%)

Total Gains/Losses $-427.90 (-0.58%) $-0.29 (-0.45%)
Average True Range (3.47%) (0.88%)

* Results are cumulative for the period.

Price verification found 0 errors

Tuesday, February 02, 2010

Russell 3000 Daily Stats (02/02/10)

Key Figures Russell 3000 IWV
Total Active Components2979 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 13 (0.44%) 0 (0.00%)
# All-time Closing Lows 5 (0.17%) 0 (0.00%)

# Higher Closes 1816 (60.96%) 1 (100.00%)
# Lower Closes 1097 (36.82%) 0 (0.00%)

Total Gains/Losses $643.60 (0.88%) $0.78 (1.22%)
Average True Range (3.60%) (1.58%)

* Results are cumulative for the period.

Price verification found 0 errors

Monday, February 01, 2010

Russell 3000 Daily Stats (02/01/10)

Key Figures Russell 3000 IWV
Total Active Components2979 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 4 (0.13%) 0 (0.00%)
# All-time Closing Lows 2 (0.07%) 0 (0.00%)

# Higher Closes 2180 (73.18%) 1 (100.00%)
# Lower Closes 744 (24.97%) 0 (0.00%)

Total Gains/Losses $924.44 (1.29%) $1.01 (1.61%)
Average True Range (3.67%) (1.62%)

* Results are cumulative for the period.

Price verification found 0 errors

Sunday, January 31, 2010

TaylorTrade weekly Stats (01/25/10-01/29/10)

Key Figures TaylorTrade SPY
Active Components29 1
Entries this period0 0
Exits this period0 0
IPOs this period0 0
Inactive this period0 0
Missing in PriceDB0 0
# All-time Closing Highs 8 (3.20%) 0 (0.00%)
# All-time Closing Lows 0 (0.00%) 0 (0.00%)

# Higher Closes 96 (38.40%) 2 (40.00%)
# Lower Closes 153 (61.20%) 3 (60.00%)

Total Gains/Losses $-13.08 (-0.09%) $-1.82 (-0.33%)
Average True Range (3.16%) (1.70%)

* Results are cumulative for the period.

Russell 3000 Weekly Stats (01/25/10-01/29/10)

Key Figures Russell 3000 IWV
Total Active Components2979 1
Total New Listings this period0 0
Total Inactive this period1 0
# All-time Closing Highs 30 (0.20%) 0 (0.00%)
# All-time Closing Lows 23 (0.15%) 0 (0.00%)

# Higher Closes 5790 (38.87%) 2 (40.00%)
# Lower Closes 8795 (59.05%) 3 (60.00%)

Total Gains/Losses $-1569.99 (-0.43%) $-1.21 (-0.38%)
Average True Range (3.93%) (1.72%)

* Results are cumulative for the period.

Price verification found 0 errors

Friday, January 29, 2010

Russell 3000 Daily Stats (01/29/10)

Key Figures Russell 3000 IWV
Total Active Components2979 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 7 (0.23%) 0 (0.00%)
# All-time Closing Lows 8 (0.27%) 0 (0.00%)

# Higher Closes 893 (29.98%) 0 (0.00%)
# Lower Closes 2014 (67.61%) 1 (100.00%)

Total Gains/Losses $-719.60 (-0.99%) $-0.76 (-1.19%)
Average True Range (4.31%) (2.45%)

* Results are cumulative for the period.

Price verification found 0 errors

Thursday, January 28, 2010

Russell 3000 Daily Stats (01/28/10)

Key Figures Russell 3000 IWV
Total Active Components2979 1
Total New Listings this period0 0
Total Inactive this period0 0
# All-time Closing Highs 10 (0.34%) 0 (0.00%)
# All-time Closing Lows 5 (0.17%) 0 (0.00%)

# Higher Closes 493 (16.55%) 0 (0.00%)
# Lower Closes 2451 (82.28%) 1 (100.00%)

Total Gains/Losses $-982.74 (-1.33%) $-0.79 (-1.23%)
Average True Range (4.26%) (2.20%)

* Results are cumulative for the period.

Price verification found 0 errors