calc_profit 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/test/TestLog.rb ADDED
@@ -0,0 +1,19 @@
1
+ require 'test/unit'
2
+ require 'Section16/Log' unless defined? $log
3
+
4
+ class TestLog < Test::Unit::TestCase
5
+ include Log
6
+ def test_log
7
+ lf = "/var/tmp/ded/junk"
8
+ File.delete(lf) if File.exists?(lf)
9
+ l = Log::openlog(lf)
10
+ assert_equal(Logger, l.class, "Log file should be a Logger object")
11
+ l.info("AAAAAAAAAAAAAAAAAXXXXXXXXXXXXXXX")
12
+ l.close
13
+ File.open(lf) do |f|
14
+ f.gets # Skip header
15
+ assert(f.gets.include?("AAAAAXXXXX"),
16
+ "Log file should contain 'AAAAAXXXXX'")
17
+ end
18
+ end
19
+ end
data/test/TestName.rb ADDED
@@ -0,0 +1,110 @@
1
+ require 'test/unit'
2
+ require 'Section16/Name'
3
+
4
+ class TestDate < Test::Unit::TestCase
5
+
6
+ def test_easy
7
+ n = Name.new('DOHERTY, DANIEL E')
8
+ assert_equal('Doherty', n.last, "Bad name parsing")
9
+ assert_equal('Daniel', n.first, "Bad name parsing")
10
+ assert_equal('E.', n.middle, "Bad name parsing")
11
+ end
12
+
13
+ def test_hard
14
+ # Hard names from the wild
15
+ n = Name.new('Viterbi Group LLC')
16
+ assert(n.is_entity, 'Should be entity')
17
+
18
+ n = Name.new('D AREZZO DAVID W')
19
+ assert_equal("D'Arezzo", n.last, "Bad last name parse")
20
+ assert_equal("David", n.first, "Bad first name parse")
21
+ assert_equal("W.", n.middle, "Bad middle name parse")
22
+
23
+ n = Name.new('MCKEOUGH W DARCY')
24
+ assert_equal("McKeough", n.last, "Bad last name parse")
25
+ assert_equal("W.", n.first, "Bad first name parse")
26
+ assert_equal("Darcy", n.middle, "Bad middle name parse")
27
+
28
+ n = Name.new('MCCOMIC TAMMY')
29
+ assert_equal("McComic", n.last, "Bad last name parse")
30
+ assert_equal("Tammy", n.first, "Bad first name parse")
31
+ assert_equal("", n.middle, "Bad middle name parse")
32
+
33
+ n = Name.new('ODonnell Kathleen M')
34
+ assert_equal("O'Donnell", n.last, "Bad last name parse")
35
+ assert_equal("Kathleen", n.first, "Bad first name parse")
36
+ assert_equal("M.", n.middle, "Bad middle name parse")
37
+
38
+ n = Name.new('MCSWEENY JOSEPH M')
39
+ assert_equal("McSweeny", n.last, "Bad last name parse")
40
+ assert_equal("Joseph", n.first, "Bad first name parse")
41
+ assert_equal("M.", n.middle, "Bad middle name parse")
42
+
43
+ n = Name.new('FV PEH L P')
44
+ assert(n.is_entity, 'Should be entity')
45
+ assert_equal("", n.last, "Bad last name parse")
46
+ assert_equal("", n.first, "Bad first name parse")
47
+ assert_equal("", n.middle, "Bad middle name parse")
48
+
49
+ n = Name.new('Scholler G Scott')
50
+ assert_equal("Scholler", n.last, "Bad last name parse")
51
+ assert_equal("G.", n.first, "Bad first name parse")
52
+ assert_equal("Scott", n.middle, "Bad middle name parse")
53
+
54
+ n = Name.new('ASCHER STEPHEN Y JR')
55
+ assert_equal("Ascher", n.last, "Bad last name parse")
56
+ assert_equal("Stephen", n.first, "Bad first name parse")
57
+ assert_equal("Y.", n.middle, "Bad middle name parse")
58
+ assert_equal("Jr.", n.suffix, "Bad suffix parse")
59
+
60
+ n = Name.new('J BRUCE ROBINSON')
61
+ assert_equal("Robinson", n.last, "Bad last name parse")
62
+ assert_equal("J.", n.first, "Bad first name parse")
63
+ assert_equal("Bruce", n.middle, "Bad middle name parse")
64
+
65
+ n = Name.new('ERROL GINSBERG & ANNETTE R MICHELSON FAM TR DAT 10/13/1999')
66
+ assert(n.is_entity, 'Should be entity')
67
+ assert_equal("", n.last, "Bad last name parse")
68
+ assert_equal("", n.first, "Bad first name parse")
69
+ assert_equal("", n.middle, "Bad middle name parse")
70
+
71
+ n = Name.new('HUTTON DONALD B JR')
72
+ assert_equal("Hutton", n.last, "Bad last name parse")
73
+ assert_equal("Donald", n.first, "Bad first name parse")
74
+ assert_equal("B.", n.middle, "Bad middle name parse")
75
+ assert_equal("Jr.", n.suffix, "Bad suffix parse")
76
+
77
+ n = Name.new('KEIFER JOSEPH III')
78
+ assert_equal("Keifer", n.last, "Bad last name parse")
79
+ assert_equal("Joseph", n.first, "Bad first name parse")
80
+ assert_equal("", n.middle, "Bad middle name parse")
81
+ assert_equal("III", n.suffix, "Bad suffix parse")
82
+
83
+ n = Name.new('OLAN KENNETH W')
84
+ assert_equal("Olan", n.last, "Bad last name parse")
85
+ assert_equal("Kenneth", n.first, "Bad first name parse")
86
+ assert_equal("W.", n.middle, "Bad middle name parse")
87
+
88
+ n = Name.new('GIOVANNI AGNELLI E C S A A')
89
+ assert_equal("Giovanni", n.last, "Bad last name parse")
90
+ assert_equal("Agnelli", n.first, "Bad first name parse")
91
+ assert_equal("E.", n.middle, "Bad middle name parse")
92
+ assert_equal("", n.suffix, "Bad suffix parse")
93
+
94
+ n = Name.new('COPELAND TERRY M PHD')
95
+ assert_equal("Copeland", n.last, "Bad last name parse")
96
+ assert_equal("Terry", n.first, "Bad first name parse")
97
+ assert_equal("M.", n.middle, "Bad middle name parse")
98
+ assert_equal("PhD", n.suffix, "Bad suffix parse")
99
+
100
+ n = Name.new('ONEILL THOMAS P')
101
+ assert_equal("O'Neill", n.last, "Bad last name parse")
102
+ assert_equal("Thomas", n.first, "Bad first name parse")
103
+ assert_equal("P.", n.middle, "Bad middle name parse")
104
+
105
+ n = Name.new('O LEARY HAZEL')
106
+ assert_equal("O'Leary", n.last, "Bad last name parse")
107
+ assert_equal("Hazel", n.first, "Bad first name parse")
108
+ assert_equal("", n.middle, "Bad middle name parse")
109
+ end
110
+ end
@@ -0,0 +1,38 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'Section16/Retriever' # unless defined?(Retriever::EDG_HOST)
5
+
6
+ class TestRetriever < Test::Unit::TestCase
7
+ DIR = '/home/ded/tmp/TestRetrieve/'
8
+ TDATE = Date.today - 25
9
+ while TDATE.fed_holiday? or TDATE.nyse_holiday?
10
+ TDATE -= 1
11
+ end
12
+
13
+ def test_getfilings
14
+ dir = '/home/ded/tmp/Section16/'
15
+ tdate = Date.today - 25
16
+ while tdate.fed_holiday? or tdate.nyse_holiday?
17
+ tdate -= 1
18
+ end
19
+ r = Retriever.new(tdate, dir)
20
+ r.get_filings
21
+ assert(test(?r, r.filings_tar_path), "Don't see tar file")
22
+ end
23
+
24
+ # Build names we expect to see
25
+ R = Retriever.new(TDATE, DIR)
26
+
27
+ def test_getprices
28
+ R.get_prices
29
+ R.prices_paths.each_value { |path|
30
+ assert(test(?r, path), "Don't see #{path} file")
31
+ }
32
+ end
33
+
34
+ def test_getfilings
35
+ R.get_filings
36
+ assert(test(?r, R.filings_tar_path), "Don't see tar file")
37
+ end
38
+ end
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'Section16/String' # unless defined?(Retriever::EDG_HOST)
5
+
6
+ class TestString < Test::Unit::TestCase
7
+
8
+ def test_quote
9
+ assert_equal('\\&\\&\\%\\%\\$\\$', '&&%%$$'.tex_quote)
10
+ end
11
+
12
+ end
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'Section16/texstring' # unless defined?(Retriever::EDG_HOST)
5
+
6
+ class TestTeXString < Test::Unit::TestCase
7
+
8
+ def test_quote
9
+ assert_equal('\\&\\&\\%\\%\\$\\$', '&&%%$$'.tex_quote)
10
+ end
11
+
12
+ end
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'Section16/Transaction' # unless defined?(Retriever::EDG_HOST)
5
+
6
+ class TestTransaction < Test::Unit::TestCase
7
+
8
+ #T1 = Transaction.new('p', '2005-05-01', 35, 100, 'AT&T%+$')
9
+ T1 = Transaction.new('p', '2005-05-01', 35, 100)
10
+ T2 = Transaction.new('s', '2005-01-07', 45, 500)
11
+ T3 = Transaction.new('p', '2005-05-01', 35, 300)
12
+ T4 = Transaction.new('p', '2005-07-07', 32, 100)
13
+ T5 = Transaction.new('p', '2004-07-07', 32, 100)
14
+ T6 = Transaction.new('s', '2005-05-30', 55, 50)
15
+
16
+ TG = TransactionGroup.new
17
+ TG << T1
18
+ TG << T2
19
+ TG << T3
20
+ TG << T4
21
+ TG << T5
22
+ TG << T6
23
+
24
+ def test_simple
25
+ assert(T1.purchase?, "T1 should be a purchase.")
26
+ assert(T2.sale?, "T2 should be a sale.")
27
+ assert_equal('\\textbf{000}&&2005-05-01&P&35.0000&100\\\\', T1.tex_row)
28
+ end
29
+
30
+ def test_profit
31
+ assert(!TG.matched)
32
+ assert(TG.match)
33
+ assert(TG.matched)
34
+ assert_equal(5150, TG.profit)
35
+ end
36
+
37
+ def test_tables
38
+ puts "Begin test_table: TG.T1.ref = #{TestTransaction::T1.ref}\n"
39
+ assert_equal('\\begin{longtable}{llccrr}
40
+ \\hline\\\\[0.5ex]
41
+ \\textbf{Ref}&\\textbf{Info}&\\textbf{Date}&\\textbf{Code}&\\textbf{Price}&\\textbf{Shares}\\\\
42
+ \\hline\\\\[0.5ex]
43
+ \\endhead
44
+ &\\\\
45
+ \\endlastfoot
46
+ \\textbf{000}&&2004-07-07&P&32.0000&100\\\\
47
+ \\textbf{000}&&2005-05-01&P&35.0000&100\\\\
48
+ \\textbf{000}&&2005-05-01&P&35.0000&300\\\\
49
+ \\textbf{000}&&2005-07-07&P&32.0000&100\\\\
50
+ \\textbf{000}&&2005-01-07&S&45.0000&500\\\\
51
+ \\textbf{000}&&2005-05-30&S&55.0000&50\\\\
52
+ \\end{longtable}
53
+ ', TG.transaction_table)
54
+ TG.match_table
55
+ end
56
+ end
data/test/Trans.csv ADDED
@@ -0,0 +1,92 @@
1
+ Ref,Date,Code,RawShares,Shares,Price,Info
2
+ 1,05/02/2006,P,5000,5000,8.6000,2006-08-09-1-I
3
+ 2,05/03/2006,P,5000,5000,8.4200,2006-08-09-1-I
4
+ 3,05/04/2006,P,5000,5000,8.4000,2006-08-09-1-I
5
+ 4,05/10/2006,P,8600,8600,8.0200,2006-08-09-1-D
6
+ 5,05/12/2006,P,10000,10000,7.2500,2006-08-09-1-D
7
+ 6,05/12/2006,P,2000,2000,6.7400,2006-08-09-1-I
8
+ 7,05/16/2006,P,5000,5000,7.0000,2006-08-09-1-D
9
+ 8,05/17/2006,P,5000,5000,6.7000,2006-08-09-1-D
10
+ 9,05/17/2006,P,2000,2000,6.7400,2006-08-09-1-I
11
+ 10,05/19/2006,P,1000,1000,7.2500,2006-08-09-1-I
12
+ 11,05/19/2006,P,1000,1000,7.2500,2006-08-09-1-I
13
+ 12,05/31/2006,P,2000,2000,7.9200,2006-08-09-1-I
14
+ 13,06/05/2006,P,1000,1000,7.9200,2006-08-09-1-I
15
+ 14,06/15/2006,P,5000,5000,6.9800,2006-08-09-1-I
16
+ 15,06/16/2006,P,1000,1000,6.9300,2006-08-09-1-I
17
+ 16,06/16/2006,P,1000,1000,6.9400,2006-08-09-1-I
18
+ 17,06/29/2006,P,4000,4000,7.0000,2006-08-09-1-I
19
+ 18,07/14/2006,P,2000,2000,6.2000,2006-08-09-1-D
20
+ 19,08/03/2006,P,1400,1400,4.3900,2006-08-09-1-D
21
+ 20,08/07/2006,P,1100,1100,4.5900,2006-08-09-1-D
22
+ 21,08/08/2006,P,16000,16000,4.7000,2006-08-21-1-D
23
+ 22,08/08/2006,S,16000,16000,4.7000,2006-08-21-1-I
24
+ 23,08/15/2006,P,16000,16000,4.8000,2006-08-21-1-D
25
+ 24,08/15/2006,S,16000,16000,4.8000,2006-08-21-1-I
26
+ 25,08/16/2006,P,2100,2100,5.2900,2006-08-21-1-I
27
+ 26,08/17/2006,P,2900,2900,5.7000,2006-08-21-1-I
28
+ 27,08/23/2006,P,8000,8000,5.2400,2006-08-25-1-D
29
+ 28,08/23/2006,S,8000,8000,5.2400,2006-08-29-1-I
30
+ 29,08/28/2006,P,1000,1000,5.4000,2006-08-29-1-D
31
+ 30,08/29/2006,P,2000,2000,5.4000,2006-08-30-1-D
32
+ 31,08/29/2006,S,2000,2000,5.4000,2006-08-30-1-I
33
+ 32,09/05/2006,P,2700,2700,5.7500,2006-09-06-1-I
34
+ 33,09/11/2006,P,4000,4000,5.7200,2006-09-15-1-D
35
+ 34,09/11/2006,S,4000,4000,5.7200,2006-09-15-1-I
36
+ 35,09/12/2006,P,3000,3000,5.4800,2006-09-15-2-I
37
+ 36,09/13/2006,P,1700,1700,5.4100,2006-09-15-2-I
38
+ 37,09/20/2006,P,7500,7500,5.4900,2006-09-21-1-I
39
+ 38,12/07/2006,S,6000,6000,7.8900,2006-12-11-1-I
40
+ 39,12/11/2006,S,100,100,8.0000,2006-12-11-1-I
41
+ 40,01/29/2007,P,2500,2500,12.1000,2007-04-27-1-I
42
+ 41,01/31/2007,P,2500,2500,13.7000,2007-04-27-1-I
43
+ 42,02/02/2007,P,4000,4000,15.1500,2007-04-27-1-I
44
+ 43,02/06/2007,P,5000,5000,14.9500,2007-04-27-1-I
45
+ 44,02/07/2007,P,400,400,15.0000,2007-04-27-1-I
46
+ 45,02/08/2007,P,4600,4600,15.0000,2007-04-27-1-I
47
+ 46,02/12/2007,P,3500,3500,14.9100,2007-04-27-1-I
48
+ 47,02/13/2007,P,1500,1500,14.6500,2007-04-27-1-D
49
+ 48,02/14/2007,P,2000,2000,14.4900,2007-04-27-1-D
50
+ 49,02/15/2007,P,3000,3000,14.3000,2007-04-27-1-I
51
+ 50,02/21/2007,P,8500,8500,14.6500,2007-04-27-1-D
52
+ 51,02/21/2007,S,8500,8500,14.6500,2007-04-27-1-I
53
+ 52,02/22/2007,P,1500,1500,14.8800,2007-04-27-1-I
54
+ 53,02/23/2007,P,3000,3000,14.9700,2007-04-27-1-I
55
+ 54,02/23/2007,P,5000,5000,14.9700,2007-04-27-1-I
56
+ 55,02/27/2007,P,5200,5200,13.8800,2007-04-27-1-I
57
+ 56,02/28/2007,P,6700,6700,13.0000,2007-04-27-1-D
58
+ 57,02/28/2007,P,800,800,13.0000,2007-04-27-1-I
59
+ 58,02/28/2007,P,8400,8400,13.0000,2007-04-27-1-I
60
+ 59,03/01/2007,P,2500,2500,12.2500,2007-04-27-1-D
61
+ 60,03/05/2007,P,1800,1800,11.9700,2007-04-27-1-D
62
+ 61,03/06/2007,P,500,500,12.1300,2007-04-27-1-D
63
+ 62,03/07/2007,P,3000,3000,12.3700,2007-04-27-1-D
64
+ 63,03/08/2007,P,2000,2000,12.6000,2007-04-27-1-I
65
+ 64,03/09/2007,P,7700,7700,12.8100,2007-04-27-1-I
66
+ 65,03/12/2007,P,4200,4200,12.4600,2007-04-27-1-I
67
+ 66,03/13/2007,P,800,800,12.2500,2007-04-27-1-I
68
+ 67,03/19/2007,P,2000,2000,14.5500,2007-04-27-2-I
69
+ 68,03/19/2007,P,5000,5000,14.5500,2007-04-27-2-I
70
+ 69,03/19/2007,P,2000,2000,14.3300,2007-04-27-2-I
71
+ 70,03/20/2007,P,1000,1000,14.4600,2007-04-27-2-I
72
+ 71,03/20/2007,P,1500,1500,14.4600,2007-04-27-2-I
73
+ 72,03/21/2007,P,3900,3900,16.9000,2007-04-27-2-I
74
+ 73,03/23/2007,P,8000,8000,14.9700,2007-04-27-1-D
75
+ 74,03/27/2007,P,1000,1000,16.9300,2007-04-27-2-I
76
+ 75,03/28/2007,P,1000,1000,16.5000,2007-04-27-2-D
77
+ 76,03/29/2007,P,1000,1000,16.2500,2007-04-27-2-D
78
+ 77,04/04/2007,P,200,200,17.8600,2007-04-27-2-I
79
+ 78,04/04/2007,P,2000,2000,19.5000,2007-04-27-2-I
80
+ 79,04/04/2007,P,3000,3000,19.1300,2007-04-27-2-I
81
+ 80,04/05/2007,P,1000,1000,19.1500,2007-04-27-2-I
82
+ 81,04/10/2007,P,2000,2000,20.7500,2007-04-27-2-I
83
+ 82,04/11/2007,P,1000,1000,20.5000,2007-04-27-2-I
84
+ 83,04/12/2007,P,600,600,21.5000,2007-04-27-2-I
85
+ 84,04/12/2007,P,1000,1000,21.4500,2007-04-27-2-I
86
+ 85,04/13/2007,P,2100,2100,21.5000,2007-04-27-2-I
87
+ 86,04/16/2007,P,500,500,22.6000,2007-04-27-2-I
88
+ 87,04/17/2007,P,3500,3500,23.5500,2007-04-27-2-D
89
+ 88,04/17/2007,S,3500,3500,23.5500,2007-04-27-2-I
90
+ 89,04/23/2007,P,5000,5000,23.4500,2007-04-27-2-I
91
+ 90,04/24/2007,P,5000,5000,24.3000,2007-04-27-2-I
92
+ 91,04/25/2007,S,10000,10000,25.7000,2007-04-27-2-I
@@ -0,0 +1,37 @@
1
+ \documentclass[12pt,sign]{dedletter}
2
+
3
+ \usepackage{longtable}
4
+ \usepackage{lscape}
5
+ \include{tables-tm}
6
+
7
+ \begin{document}
8
+
9
+ \begin{letter}{Issuer Corp.\\
10
+ 1234 Main Street\\
11
+ Anywhere, USA 66666}
12
+
13
+ \opening{Dear Board:}
14
+
15
+ Look at how much Violator, Inc., has traded in short-swing profits. I have
16
+ given my calculation in Schedules~A and ~B attached.
17
+
18
+ Please pay me a fee.
19
+
20
+ \closing{Sincerely,}
21
+
22
+ \end{letter}
23
+
24
+ \schedule{TransactionTable}
25
+
26
+ \TransTable
27
+
28
+ \clearpage
29
+ \begin{landscape}
30
+ \schedule{Match Table}
31
+
32
+ \begin{footnotesize}
33
+ \MatchTable
34
+ \end{footnotesize}
35
+
36
+ \end{landscape}
37
+ \end{document}
data/test/tabdemo.tex ADDED
@@ -0,0 +1,37 @@
1
+ \documentclass[12pt,sign]{dedletter}
2
+
3
+ \usepackage{longtable}
4
+ \usepackage{lscape}
5
+ \include{tables}
6
+
7
+ \begin{document}
8
+
9
+ \begin{letter}{Issuer Corp.\\
10
+ 1234 Main Street\\
11
+ Anywhere, USA 66666}
12
+
13
+ \opening{Dear Board:}
14
+
15
+ Look at how much Violator, Inc., has traded in short-swing profits. I have
16
+ given my calculation in Schedules~A and ~B attached.
17
+
18
+ Please pay me a fee.
19
+
20
+ \closing{Sincerely,}
21
+
22
+ \end{letter}
23
+
24
+ \schedule{TransactionTable}
25
+
26
+ \TransTable
27
+
28
+ \clearpage
29
+ \begin{landscape}
30
+ \schedule{Match Table}
31
+
32
+ \begin{footnotesize}
33
+ \MatchTable
34
+ \end{footnotesize}
35
+
36
+ \end{landscape}
37
+ \end{document}
@@ -0,0 +1,235 @@
1
+ \providecommand{\RawTransTable}{}
2
+ \renewcommand{\RawTransTable}{\begin{longtable}{llccrr}
3
+ \hline\\[0.5ex]
4
+ \textbf{Ref}&\textbf{Info}&\textbf{Date}&\textbf{Code}&\textbf{Price}&\textbf{Unadj Shares}\\
5
+ \hline\\[0.5ex]
6
+ \endhead
7
+ &\\
8
+ \endlastfoot
9
+ \textbf{0001}&2006-08-09-1-I&2006-05-02&P&8.6000&5,000\\
10
+ \textbf{0002}&2006-08-09-1-I&2006-05-03&P&8.4200&5,000\\
11
+ \textbf{0003}&2006-08-09-1-I&2006-05-04&P&8.4000&5,000\\
12
+ \textbf{0004}&2006-08-09-1-D&2006-05-10&P&8.0200&8,600\\
13
+ \textbf{0005}&2006-08-09-1-D&2006-05-12&P&7.2500&10,000\\
14
+ \textbf{0006}&2006-08-09-1-I&2006-05-12&P&6.7400&2,000\\
15
+ \textbf{0007}&2006-08-09-1-D&2006-05-16&P&7.0000&5,000\\
16
+ \textbf{0008}&2006-08-09-1-D&2006-05-17&P&6.7000&5,000\\
17
+ \textbf{0009}&2006-08-09-1-I&2006-05-17&P&6.7400&2,000\\
18
+ \textbf{0010}&2006-08-09-1-I&2006-05-19&P&7.2500&1,000\\
19
+ \textbf{0011}&2006-08-09-1-I&2006-05-19&P&7.2500&1,000\\
20
+ \textbf{0012}&2006-08-09-1-I&2006-05-31&P&7.9200&2,000\\
21
+ \textbf{0013}&2006-08-09-1-I&2006-06-05&P&7.9200&1,000\\
22
+ \textbf{0014}&2006-08-09-1-I&2006-06-15&P&6.9800&5,000\\
23
+ \textbf{0015}&2006-08-09-1-I&2006-06-16&P&6.9300&1,000\\
24
+ \textbf{0016}&2006-08-09-1-I&2006-06-16&P&6.9400&1,000\\
25
+ \textbf{0017}&2006-08-09-1-I&2006-06-29&P&7.0000&4,000\\
26
+ \textbf{0018}&2006-08-09-1-D&2006-07-14&P&6.2000&2,000\\
27
+ \textbf{0019}&2006-08-09-1-D&2006-08-03&P&4.3900&1,400\\
28
+ \textbf{0020}&2006-08-09-1-D&2006-08-07&P&4.5900&1,100\\
29
+ \textbf{0021}&2006-08-21-1-D&2006-08-08&P&4.7000&16,000\\
30
+ \textbf{0022}&2006-08-21-1-I&2006-08-08&S&4.7000&16,000\\
31
+ \textbf{0023}&2006-08-21-1-D&2006-08-15&P&4.8000&16,000\\
32
+ \textbf{0024}&2006-08-21-1-I&2006-08-15&S&4.8000&16,000\\
33
+ \textbf{0025}&2006-08-21-1-I&2006-08-16&P&5.2900&2,100\\
34
+ \textbf{0026}&2006-08-21-1-I&2006-08-17&P&5.7000&2,900\\
35
+ \textbf{0027}&2006-08-25-1-D&2006-08-23&P&5.2400&8,000\\
36
+ \textbf{0028}&2006-08-29-1-I&2006-08-23&S&5.2400&8,000\\
37
+ \textbf{0029}&2006-08-29-1-D&2006-08-28&P&5.4000&1,000\\
38
+ \textbf{0030}&2006-08-30-1-D&2006-08-29&P&5.4000&2,000\\
39
+ \textbf{0031}&2006-08-30-1-I&2006-08-29&S&5.4000&2,000\\
40
+ \textbf{0032}&2006-09-06-1-I&2006-09-05&P&5.7500&2,700\\
41
+ \textbf{0033}&2006-09-15-1-D&2006-09-11&P&5.7200&4,000\\
42
+ \textbf{0034}&2006-09-15-1-I&2006-09-11&S&5.7200&4,000\\
43
+ \textbf{0035}&2006-09-15-2-I&2006-09-12&P&5.4800&3,000\\
44
+ \textbf{0036}&2006-09-15-2-I&2006-09-13&P&5.4100&1,700\\
45
+ \textbf{0037}&2006-09-21-1-I&2006-09-20&P&5.4900&7,500\\
46
+ \textbf{0038}&2006-12-11-1-I&2006-12-07&S&7.8900&6,000\\
47
+ \textbf{0039}&2006-12-11-1-I&2006-12-11&S&8.0000&100\\
48
+ \textbf{0040}&2007-04-27-1-I&2007-01-29&P&12.1000&2,500\\
49
+ \textbf{0041}&2007-04-27-1-I&2007-01-31&P&13.7000&2,500\\
50
+ \textbf{0042}&2007-04-27-1-I&2007-02-02&P&15.1500&4,000\\
51
+ \textbf{0043}&2007-04-27-1-I&2007-02-06&P&14.9500&5,000\\
52
+ \textbf{0044}&2007-04-27-1-I&2007-02-07&P&15.0000&400\\
53
+ \textbf{0045}&2007-04-27-1-I&2007-02-08&P&15.0000&4,600\\
54
+ \textbf{0046}&2007-04-27-1-I&2007-02-12&P&14.9100&3,500\\
55
+ \textbf{0047}&2007-04-27-1-D&2007-02-13&P&14.6500&1,500\\
56
+ \textbf{0048}&2007-04-27-1-D&2007-02-14&P&14.4900&2,000\\
57
+ \textbf{0049}&2007-04-27-1-I&2007-02-15&P&14.3000&3,000\\
58
+ \textbf{0050}&2007-04-27-1-D&2007-02-21&P&14.6500&8,500\\
59
+ \textbf{0051}&2007-04-27-1-I&2007-02-21&S&14.6500&8,500\\
60
+ \textbf{0052}&2007-04-27-1-I&2007-02-22&P&14.8800&1,500\\
61
+ \textbf{0053}&2007-04-27-1-I&2007-02-23&P&14.9700&3,000\\
62
+ \textbf{0054}&2007-04-27-1-I&2007-02-23&P&14.9700&5,000\\
63
+ \textbf{0055}&2007-04-27-1-I&2007-02-27&P&13.8800&5,200\\
64
+ \textbf{0056}&2007-04-27-1-D&2007-02-28&P&13.0000&6,700\\
65
+ \textbf{0057}&2007-04-27-1-I&2007-02-28&P&13.0000&800\\
66
+ \textbf{0058}&2007-04-27-1-I&2007-02-28&P&13.0000&8,400\\
67
+ \textbf{0059}&2007-04-27-1-D&2007-03-01&P&12.2500&2,500\\
68
+ \textbf{0060}&2007-04-27-1-D&2007-03-05&P&11.9700&1,800\\
69
+ \textbf{0061}&2007-04-27-1-D&2007-03-06&P&12.1300&500\\
70
+ \textbf{0062}&2007-04-27-1-D&2007-03-07&P&12.3700&3,000\\
71
+ \textbf{0063}&2007-04-27-1-I&2007-03-08&P&12.6000&2,000\\
72
+ \textbf{0064}&2007-04-27-1-I&2007-03-09&P&12.8100&7,700\\
73
+ \textbf{0065}&2007-04-27-1-I&2007-03-12&P&12.4600&4,200\\
74
+ \textbf{0066}&2007-04-27-1-I&2007-03-13&P&12.2500&800\\
75
+ \textbf{0067}&2007-04-27-2-I&2007-03-19&P&14.5500&2,000\\
76
+ \textbf{0068}&2007-04-27-2-I&2007-03-19&P&14.5500&5,000\\
77
+ \textbf{0069}&2007-04-27-2-I&2007-03-19&P&14.3300&2,000\\
78
+ \textbf{0070}&2007-04-27-2-I&2007-03-20&P&14.4600&1,000\\
79
+ \textbf{0071}&2007-04-27-2-I&2007-03-20&P&14.4600&1,500\\
80
+ \textbf{0072}&2007-04-27-2-I&2007-03-21&P&16.9000&3,900\\
81
+ \textbf{0073}&2007-04-27-1-D&2007-03-23&P&14.9700&8,000\\
82
+ \textbf{0074}&2007-04-27-2-I&2007-03-27&P&16.9300&1,000\\
83
+ \textbf{0075}&2007-04-27-2-D&2007-03-28&P&16.5000&1,000\\
84
+ \textbf{0076}&2007-04-27-2-D&2007-03-29&P&16.2500&1,000\\
85
+ \textbf{0077}&2007-04-27-2-I&2007-04-04&P&17.8600&200\\
86
+ \textbf{0078}&2007-04-27-2-I&2007-04-04&P&19.5000&2,000\\
87
+ \textbf{0079}&2007-04-27-2-I&2007-04-04&P&19.1300&3,000\\
88
+ \textbf{0080}&2007-04-27-2-I&2007-04-05&P&19.1500&1,000\\
89
+ \textbf{0081}&2007-04-27-2-I&2007-04-10&P&20.7500&2,000\\
90
+ \textbf{0082}&2007-04-27-2-I&2007-04-11&P&20.5000&1,000\\
91
+ \textbf{0083}&2007-04-27-2-I&2007-04-12&P&21.5000&600\\
92
+ \textbf{0084}&2007-04-27-2-I&2007-04-12&P&21.4500&1,000\\
93
+ \textbf{0085}&2007-04-27-2-I&2007-04-13&P&21.5000&2,100\\
94
+ \textbf{0086}&2007-04-27-2-I&2007-04-16&P&22.6000&500\\
95
+ \textbf{0087}&2007-04-27-2-D&2007-04-17&P&23.5500&3,500\\
96
+ \textbf{0088}&2007-04-27-2-I&2007-04-17&S&23.5500&3,500\\
97
+ \textbf{0089}&2007-04-27-2-I&2007-04-23&P&23.4500&5,000\\
98
+ \textbf{0090}&2007-04-27-2-I&2007-04-24&P&24.3000&5,000\\
99
+ \textbf{0091}&2007-04-27-2-I&2007-04-25&S&25.7000&10,000\\
100
+ \end{longtable}
101
+ }
102
+ \providecommand{\TransTable}{}
103
+ \renewcommand{\TransTable}{\begin{longtable}{llccrr}
104
+ \hline\\[0.5ex]
105
+ \textbf{Ref}&\textbf{Info}&\textbf{Date}&\textbf{Code}&\textbf{Price}&\textbf{Shares}\\
106
+ \hline\\[0.5ex]
107
+ \endhead
108
+ &\\
109
+ \endlastfoot
110
+ \textbf{0001}&2006-08-09-1-I&2006-05-02&P&8.6000&5,000\\
111
+ \textbf{0002}&2006-08-09-1-I&2006-05-03&P&8.4200&5,000\\
112
+ \textbf{0003}&2006-08-09-1-I&2006-05-04&P&8.4000&5,000\\
113
+ \textbf{0004}&2006-08-09-1-D&2006-05-10&P&8.0200&8,600\\
114
+ \textbf{0005}&2006-08-09-1-D&2006-05-12&P&7.2500&10,000\\
115
+ \textbf{0006}&2006-08-09-1-I&2006-05-12&P&6.7400&2,000\\
116
+ \textbf{0007}&2006-08-09-1-D&2006-05-16&P&7.0000&5,000\\
117
+ \textbf{0008}&2006-08-09-1-D&2006-05-17&P&6.7000&5,000\\
118
+ \textbf{0009}&2006-08-09-1-I&2006-05-17&P&6.7400&2,000\\
119
+ \textbf{0010}&2006-08-09-1-I&2006-05-19&P&7.2500&1,000\\
120
+ \textbf{0011}&2006-08-09-1-I&2006-05-19&P&7.2500&1,000\\
121
+ \textbf{0012}&2006-08-09-1-I&2006-05-31&P&7.9200&2,000\\
122
+ \textbf{0013}&2006-08-09-1-I&2006-06-05&P&7.9200&1,000\\
123
+ \textbf{0014}&2006-08-09-1-I&2006-06-15&P&6.9800&5,000\\
124
+ \textbf{0015}&2006-08-09-1-I&2006-06-16&P&6.9300&1,000\\
125
+ \textbf{0016}&2006-08-09-1-I&2006-06-16&P&6.9400&1,000\\
126
+ \textbf{0017}&2006-08-09-1-I&2006-06-29&P&7.0000&4,000\\
127
+ \textbf{0018}&2006-08-09-1-D&2006-07-14&P&6.2000&2,000\\
128
+ \textbf{0019}&2006-08-09-1-D&2006-08-03&P&4.3900&1,400\\
129
+ \textbf{0020}&2006-08-09-1-D&2006-08-07&P&4.5900&1,100\\
130
+ \textbf{0021}&2006-08-21-1-D&2006-08-08&P&4.7000&16,000\\
131
+ \textbf{0022}&2006-08-21-1-I&2006-08-08&S&4.7000&16,000\\
132
+ \textbf{0023}&2006-08-21-1-D&2006-08-15&P&4.8000&16,000\\
133
+ \textbf{0024}&2006-08-21-1-I&2006-08-15&S&4.8000&16,000\\
134
+ \textbf{0025}&2006-08-21-1-I&2006-08-16&P&5.2900&2,100\\
135
+ \textbf{0026}&2006-08-21-1-I&2006-08-17&P&5.7000&2,900\\
136
+ \textbf{0027}&2006-08-25-1-D&2006-08-23&P&5.2400&8,000\\
137
+ \textbf{0028}&2006-08-29-1-I&2006-08-23&S&5.2400&8,000\\
138
+ \textbf{0029}&2006-08-29-1-D&2006-08-28&P&5.4000&1,000\\
139
+ \textbf{0030}&2006-08-30-1-D&2006-08-29&P&5.4000&2,000\\
140
+ \textbf{0031}&2006-08-30-1-I&2006-08-29&S&5.4000&2,000\\
141
+ \textbf{0032}&2006-09-06-1-I&2006-09-05&P&5.7500&2,700\\
142
+ \textbf{0033}&2006-09-15-1-D&2006-09-11&P&5.7200&4,000\\
143
+ \textbf{0034}&2006-09-15-1-I&2006-09-11&S&5.7200&4,000\\
144
+ \textbf{0035}&2006-09-15-2-I&2006-09-12&P&5.4800&3,000\\
145
+ \textbf{0036}&2006-09-15-2-I&2006-09-13&P&5.4100&1,700\\
146
+ \textbf{0037}&2006-09-21-1-I&2006-09-20&P&5.4900&7,500\\
147
+ \textbf{0038}&2006-12-11-1-I&2006-12-07&S&7.8900&6,000\\
148
+ \textbf{0039}&2006-12-11-1-I&2006-12-11&S&8.0000&100\\
149
+ \textbf{0040}&2007-04-27-1-I&2007-01-29&P&12.1000&2,500\\
150
+ \textbf{0041}&2007-04-27-1-I&2007-01-31&P&13.7000&2,500\\
151
+ \textbf{0042}&2007-04-27-1-I&2007-02-02&P&15.1500&4,000\\
152
+ \textbf{0043}&2007-04-27-1-I&2007-02-06&P&14.9500&5,000\\
153
+ \textbf{0044}&2007-04-27-1-I&2007-02-07&P&15.0000&400\\
154
+ \textbf{0045}&2007-04-27-1-I&2007-02-08&P&15.0000&4,600\\
155
+ \textbf{0046}&2007-04-27-1-I&2007-02-12&P&14.9100&3,500\\
156
+ \textbf{0047}&2007-04-27-1-D&2007-02-13&P&14.6500&1,500\\
157
+ \textbf{0048}&2007-04-27-1-D&2007-02-14&P&14.4900&2,000\\
158
+ \textbf{0049}&2007-04-27-1-I&2007-02-15&P&14.3000&3,000\\
159
+ \textbf{0050}&2007-04-27-1-D&2007-02-21&P&14.6500&8,500\\
160
+ \textbf{0051}&2007-04-27-1-I&2007-02-21&S&14.6500&8,500\\
161
+ \textbf{0052}&2007-04-27-1-I&2007-02-22&P&14.8800&1,500\\
162
+ \textbf{0053}&2007-04-27-1-I&2007-02-23&P&14.9700&3,000\\
163
+ \textbf{0054}&2007-04-27-1-I&2007-02-23&P&14.9700&5,000\\
164
+ \textbf{0055}&2007-04-27-1-I&2007-02-27&P&13.8800&5,200\\
165
+ \textbf{0056}&2007-04-27-1-D&2007-02-28&P&13.0000&6,700\\
166
+ \textbf{0057}&2007-04-27-1-I&2007-02-28&P&13.0000&800\\
167
+ \textbf{0058}&2007-04-27-1-I&2007-02-28&P&13.0000&8,400\\
168
+ \textbf{0059}&2007-04-27-1-D&2007-03-01&P&12.2500&2,500\\
169
+ \textbf{0060}&2007-04-27-1-D&2007-03-05&P&11.9700&1,800\\
170
+ \textbf{0061}&2007-04-27-1-D&2007-03-06&P&12.1300&500\\
171
+ \textbf{0062}&2007-04-27-1-D&2007-03-07&P&12.3700&3,000\\
172
+ \textbf{0063}&2007-04-27-1-I&2007-03-08&P&12.6000&2,000\\
173
+ \textbf{0064}&2007-04-27-1-I&2007-03-09&P&12.8100&7,700\\
174
+ \textbf{0065}&2007-04-27-1-I&2007-03-12&P&12.4600&4,200\\
175
+ \textbf{0066}&2007-04-27-1-I&2007-03-13&P&12.2500&800\\
176
+ \textbf{0067}&2007-04-27-2-I&2007-03-19&P&14.5500&2,000\\
177
+ \textbf{0068}&2007-04-27-2-I&2007-03-19&P&14.5500&5,000\\
178
+ \textbf{0069}&2007-04-27-2-I&2007-03-19&P&14.3300&2,000\\
179
+ \textbf{0070}&2007-04-27-2-I&2007-03-20&P&14.4600&1,000\\
180
+ \textbf{0071}&2007-04-27-2-I&2007-03-20&P&14.4600&1,500\\
181
+ \textbf{0072}&2007-04-27-2-I&2007-03-21&P&16.9000&3,900\\
182
+ \textbf{0073}&2007-04-27-1-D&2007-03-23&P&14.9700&8,000\\
183
+ \textbf{0074}&2007-04-27-2-I&2007-03-27&P&16.9300&1,000\\
184
+ \textbf{0075}&2007-04-27-2-D&2007-03-28&P&16.5000&1,000\\
185
+ \textbf{0076}&2007-04-27-2-D&2007-03-29&P&16.2500&1,000\\
186
+ \textbf{0077}&2007-04-27-2-I&2007-04-04&P&17.8600&200\\
187
+ \textbf{0078}&2007-04-27-2-I&2007-04-04&P&19.5000&2,000\\
188
+ \textbf{0079}&2007-04-27-2-I&2007-04-04&P&19.1300&3,000\\
189
+ \textbf{0080}&2007-04-27-2-I&2007-04-05&P&19.1500&1,000\\
190
+ \textbf{0081}&2007-04-27-2-I&2007-04-10&P&20.7500&2,000\\
191
+ \textbf{0082}&2007-04-27-2-I&2007-04-11&P&20.5000&1,000\\
192
+ \textbf{0083}&2007-04-27-2-I&2007-04-12&P&21.5000&600\\
193
+ \textbf{0084}&2007-04-27-2-I&2007-04-12&P&21.4500&1,000\\
194
+ \textbf{0085}&2007-04-27-2-I&2007-04-13&P&21.5000&2,100\\
195
+ \textbf{0086}&2007-04-27-2-I&2007-04-16&P&22.6000&500\\
196
+ \textbf{0087}&2007-04-27-2-D&2007-04-17&P&23.5500&3,500\\
197
+ \textbf{0088}&2007-04-27-2-I&2007-04-17&S&23.5500&3,500\\
198
+ \textbf{0089}&2007-04-27-2-I&2007-04-23&P&23.4500&5,000\\
199
+ \textbf{0090}&2007-04-27-2-I&2007-04-24&P&24.3000&5,000\\
200
+ \textbf{0091}&2007-04-27-2-I&2007-04-25&S&25.7000&10,000\\
201
+ \end{longtable}
202
+ }
203
+ \providecommand{\MatchTable}{}
204
+ \renewcommand{\MatchTable}{\begin{longtable}{llccrrllccrrr}
205
+ \hline\\[0.5ex]
206
+ \multicolumn{6}{c}{\textbf{Purchases}}&
207
+ \multicolumn{6}{c}{\textbf{Sales}}\\
208
+ \textbf{Ref}&\textbf{Info}&\textbf{Date}&\textbf{Code}&\textbf{Price}&\textbf{Shares}
209
+ &\textbf{Ref}&\textbf{Info}&\textbf{Date}&\textbf{Code}&\textbf{Price}&\textbf{Shares}
210
+ &\textbf{Profit}\\
211
+ \hline\\[0.5ex]
212
+ \endhead
213
+ &\\
214
+ \multicolumn{3}{l}{\qquad\textbf{Totals:}}&&&\textbf{42,100.}&&&&&&\textbf{42,100.}&\textbf{\$283,695.00}\\
215
+ \endlastfoot
216
+ \textbf{0040}&2007-04-27-1-I&2007-01-29&P&12.1000&800&\textbf{0091}&2007-04-27-2-I&2007-04-25&S&25.7000&800&\textbf{10,880.00}\\
217
+ \textbf{0061}&2007-04-27-1-D&2007-03-06&P&12.1300&500&\textbf{0091}&2007-04-27-2-I&2007-04-25&S&25.7000&500&\textbf{6,785.00}\\
218
+ \textbf{0066}&2007-04-27-1-I&2007-03-13&P&12.2500&800&\textbf{0091}&2007-04-27-2-I&2007-04-25&S&25.7000&800&\textbf{10,760.00}\\
219
+ \textbf{0059}&2007-04-27-1-D&2007-03-01&P&12.2500&2,500&\textbf{0091}&2007-04-27-2-I&2007-04-25&S&25.7000&2,500&\textbf{33,625.00}\\
220
+ \textbf{0062}&2007-04-27-1-D&2007-03-07&P&12.3700&3,000&\textbf{0091}&2007-04-27-2-I&2007-04-25&S&25.7000&3,000&\textbf{39,990.00}\\
221
+ \textbf{0065}&2007-04-27-1-I&2007-03-12&P&12.4600&2,400&\textbf{0091}&2007-04-27-2-I&2007-04-25&S&25.7000&2,400&\textbf{31,776.00}\\
222
+ \textbf{0060}&2007-04-27-1-D&2007-03-05&P&11.9700&1,800&\textbf{0088}&2007-04-27-2-I&2007-04-17&S&23.5500&1,800&\textbf{20,844.00}\\
223
+ \textbf{0040}&2007-04-27-1-I&2007-01-29&P&12.1000&1,700&\textbf{0088}&2007-04-27-2-I&2007-04-17&S&23.5500&1,700&\textbf{19,465.00}\\
224
+ \textbf{0027}&2006-08-25-1-D&2006-08-23&P&5.2400&8,000&\textbf{0051}&2007-04-27-1-I&2007-02-21&S&14.6500&8,000&\textbf{75,280.00}\\
225
+ \textbf{0029}&2006-08-29-1-D&2006-08-28&P&5.4000&500&\textbf{0051}&2007-04-27-1-I&2007-02-21&S&14.6500&500&\textbf{4,625.00}\\
226
+ \textbf{0023}&2006-08-21-1-D&2006-08-15&P&4.8000&100&\textbf{0039}&2006-12-11-1-I&2006-12-11&S&8.0000&100&\textbf{320.00}\\
227
+ \textbf{0021}&2006-08-21-1-D&2006-08-08&P&4.7000&6,000&\textbf{0038}&2006-12-11-1-I&2006-12-07&S&7.8900&6,000&\textbf{19,140.00}\\
228
+ \textbf{0020}&2006-08-09-1-D&2006-08-07&P&4.5900&1,100&\textbf{0034}&2006-09-15-1-I&2006-09-11&S&5.7200&1,100&\textbf{1,243.00}\\
229
+ \textbf{0021}&2006-08-21-1-D&2006-08-08&P&4.7000&2,900&\textbf{0034}&2006-09-15-1-I&2006-09-11&S&5.7200&2,900&\textbf{2,958.00}\\
230
+ \textbf{0021}&2006-08-21-1-D&2006-08-08&P&4.7000&2,000&\textbf{0031}&2006-08-30-1-I&2006-08-29&S&5.4000&2,000&\textbf{1,400.00}\\
231
+ \textbf{0019}&2006-08-09-1-D&2006-08-03&P&4.3900&1,400&\textbf{0028}&2006-08-29-1-I&2006-08-23&S&5.2400&1,400&\textbf{1,190.00}\\
232
+ \textbf{0021}&2006-08-21-1-D&2006-08-08&P&4.7000&5,100&\textbf{0028}&2006-08-29-1-I&2006-08-23&S&5.2400&5,100&\textbf{2,754.00}\\
233
+ \textbf{0023}&2006-08-21-1-D&2006-08-15&P&4.8000&1,500&\textbf{0028}&2006-08-29-1-I&2006-08-23&S&5.2400&1,500&\textbf{660.00}\\
234
+ \end{longtable}
235
+ }