2007 Feb 08 - Thu
Perl based Code Colorer
In another article, I was looking at various batch oriented code colorization routines.
In looking for Perl Modules for another take, I found that there is a Perl module that will
do such a job, inline. It can be found at Colorer Library with another similar CPAN module at Syntax Hightlight Universal. I think that second supports about 200
different languages.
[/Personal/SoftwareDevelopment/HTML]
permanent link
Cisco Callmanager Call Detail Records (CDR) with Perl
It is possible to obtain Cisco Callmanager Call Detail Records through Perl. However,
there are a few prepatory steps to make it work.
Because Cisco recommends that Callmanager not be a member of a domain, it isn't possible to use flow through authentication to
access the SQL Database server when on a host other than Callmanager. Cisco therefore suggests that SQL Authentication be
changed to 'Mixed Mode'. This can be accomplished by starting sQL Enterprise Manager on the Callmanager Server containing the
CDRs (there should only be one server in the cluster with CDR responsibilites), right click on the server name and select
properties, select the security tab, and choose 'SQL Server and Windows' for authentication. Callmanager will need to be
restarted.
To connect to the database tables, one could code the sa username and password into the queries, but that probably isn't a
very good thing. Instead, I'd suggest creating a new login, call it cdr_reader, and assign it to the CDR database with public
and db_owner roles.
Perl DBD drivers for Sybase can be used for connecting to the SQL 2000 database tables in Callmanager 3.3 and 4.X. For those
who aren't using Debian, steps outlined at
Linux Journal
and FreeTDS: Tabular Data Stream.
For Debian users, obtaining the package is as simple as running 'apt-get install libdbd-sybase-perl' from unstable or testing.
As of the time of this writing, I don't think Stable has the most recent and appropriate version.
I then modified the example from a
Perl HowTo slightly to give
it a try:
#!/usr/bin/perl
#-- open database
use DBI;
my $dbh = DBI->connect('DBI:Sybase:server=10.10.10.10','cdr_reader','password') or die $DBI::errstr;
$dbh->do("use CDR");
#-- sample query
my $rows = $dbh->selectrow_array("SELECT COUNT(*) FROM CallDetailRecord");
print "CDR has $rows records\n" if ( defined $rows );
That turned out to be quite straightforward. I'll publish another article with some perl queries and summaries I've used.
[/Cisco/Callmanager]
permanent link
Some Ideas for Algorithmic Trading
When I mentioned to someone that I do trading development with SmartQuant's
QuantDeveloper, they said they've encountered similar tools with
names such
as KDB and Apama.
Upon further research, KDB is a tick database developed by ksxystems. It is designed for
recording high frequency ticks, as well as manipulating the data efficiently. I'm wondering
what sort of price tag is associated with it.
Apama is a Buy Side Algorithmic trading tool by Progress Software. They have an Algorithmic
Trading Resource Center. On that page, I found a one page article on 10 Innovative Algorithmic Trading Techniques by John Bates. Here are the
top ten techniques:
- Making your own "secret sauce"
- Gaining "first mover"
- Algorithmic trading beyond equities
- Concurrent access to multiple liquidity pools
- Cross-asset Trading
- Combining news analysis into algorithms
- Real-time market data capture
- Backtesting and Tuning
- Digital Forensics
- Managing Trading Risk
[/Trading/AutomatedTrading]
permanent link
Trading Site of the Day -- KQuant: Pointers to Who's Who and What's What
K|Quant is a nice, eye pleasing site
introducing one to the world of Quantitative Finance. Stereotypically, it is Rocket
Scientists, also known as Physicists, who are known to be comfortable in this type of
work.
However, the site's maintainer, Rico Blaser, does a great job of introducing the niche
field to the aspiring quant. He has a page describing some good books for getting
introduced to the mathematics of the field. He also has some good links to the
pages of
well known researchers, authors, and personalities of the field.
The one drawback is that it doesn't appear to be updated very frequently. On the other
hand, it is a good source of basic information.
[/Trading/SiteOfTheDay/D200702]
permanent link
Darvas Selections for 2007/02/08
Here are the selections for Thursday. These lists have the Darvas stop calculated in the
second column.
|
Start: 2007-01-07 High: 2007-02-01 EOD: 2007-02-07
| Symbol | Stop |
| AA | 32.29
| | ACF | 25.60
| | ACN | 37.98
| | AGU | 34.51
| | AL | 50.00
| | ANF | 80.46
| | ARBA | 9.42
| | BA | 89.73
| | BAX | 49.98
| | BC | 30.49
| | BMET | 42.08
| | BNI | 75.70
| | CECO | 28.13
| | CEM | 11.78
| | CEN | 30.38
| | CGV | 39.99
| | CIT | 58.63
| | CONR | 33.30
| | CPWR | 8.88
| | CRM | 44.32
| | D | 85.53
| | DE | 100.95
| | DHI | 29.38
| | DO | 79.34
| | EFA | 74.51
| | ETR | 96.32
| | FRX | 56.54
| | GGB | 17.97
| | GILD | 71.92
| | HLT | 37.31
| | HLTH | 14.02
| | HRB | 24.26
| | HYSL | 42.44
| | IJR | 68.48
| | ITT | 60.26
| | ITW | 50.29
| | JCP | 84.09
| | KR | 25.99
| | LEH | 84.13
| | LLL | 83.25
| | LYO | 31.30
| | MAT | 25.33
| | MCO | 72.60
| | MET | 62.87
| | MNST | 51.39
| | NIHD | 73.64
| | OI | 23.11
| | ONNN | 9.35
| | PRU | 90.02
| | PX | 63.18
| | RCL | 45.01
| | RGC | 22.44
| | RYL | 57.30
| | SLE | 17.30
| | SNV | 32.10
| | SUNW | 6.25
| | SVU | 37.74
| | SWK | 57.26
| | SYK | 62.07
| | TIN | 48.29
| | TMX | 30.93
| | TSN | 18.15
| | TV | 28.65
| | TYC | 32.32
| | UBS | 63.33
| | UIS | 8.50
| | UNP | 99.09
| | WPI | 28.01
| | WSM | 35.65
| | XLI | 35.96
| | XRX | 17.30
|
|
Start: 2007-01-07 High: 2007-02-02 EOD: 2007-02-07
| Symbol | Stop |
| ABB | 18.62
| | ACN | 37.98
| | ADCT | 15.98
| | AEP | 43.48
| | AMP | 59.35
| | ANF | 80.46
| | ARBA | 9.42
| | AVP | 36.89
| | BC | 30.49
| | BNI | 75.70
| | BUD | 50.65
| | CA | 25.77
| | CAR | 26.76
| | CEM | 11.78
| | CEN | 30.38
| | CGV | 39.99
| | CHKP | 24.43
| | CIT | 58.63
| | CMS | 17.12
| | COH | 47.03
| | CPWR | 8.88
| | CRM | 44.32
| | CROX | 57.32
| | CX | 36.37
| | D | 85.53
| | DE | 100.95
| | DHI | 29.38
| | ETN | 78.23
| | ETR | 96.32
| | FRX | 56.54
| | GMST | 3.98
| | GR | 48.39
| | HAS | 27.91
| | HCR | 53.08
| | HLT | 37.31
| | HLTH | 14.02
| | HYSL | 42.44
| | IJR | 68.48
| | IR | 43.26
| | JCP | 84.09
| | KEY | 38.97
| | KR | 25.99
| | LEH | 84.13
| | LLL | 83.25
| | MAT | 25.33
| | MCO | 72.60
| | MET | 62.87
| | MIR | 34.61
| | MNST | 51.39
| | NKE | 100.35
| | NOC | 73.57
| | NTY | 52.32
| | NYB | 16.94
| | ONNN | 9.35
| | PCAR | 69.72
| | PLCM | 32.57
| | PRU | 90.02
| | PWR | 20.60
| | RAD | 6.24
| | RCL | 45.01
| | RGC | 22.44
| | RRI | 15.89
| | RTN | 53.22
| | RYL | 57.30
| | SCUR | 8.84
| | SID | 35.80
| | SLE | 17.30
| | SNV | 32.10
| | SPF | 29.27
| | SSTI | 5.28
| | SVU | 37.74
| | SWK | 57.26
| | T | 37.22
| | TIN | 48.29
| | TSN | 18.15
| | TYC | 32.32
| | UIS | 8.50
| | WSM | 35.65
| | XLI | 35.96
| | XLY | 39.72
|
|
[/Trading/Darvas/D200702]
permanent link
Darvas Results at EOD 2007/02/07
In comparison, the Dow Jones Industrial Index opened at 12656, had a high of 12700, had a
low of 12630, and closed up at 12666.
If Low is green, then it stayed above the stop level. If Close is green, the symbol closed up for the day.
Start: 2007-01-06 High: 2007-01-31 EOD: 2007-02-06
| Symbol | Open | High | Low | Close | Stop | O->H | O->C |
| ACF | 27.68 | 27.77 | 27.55 | 27.65 | 25.60 | 0.09 | -0.03
| | AGU | 35.45 | 36.05 | 35.43 | 35.78 | 34.51 | 0.60 | 0.33
| | AL | 51.23 | 51.69 | 50.32 | 50.66 | 50.00 | 0.46 | -0.57
| | APA | 69.72 | 70.20 | 68.95 | 69.20 | 70.73 | 0.48 | -0.52
| | BMET | 42.25 | 42.49 | 42.17 | 42.45 | 42.08 | 0.24 | 0.20
| | CECO | 29.08 | 29.25 | 28.97 | 29.01 | 28.13 | 0.17 | -0.07
| | CEN | 30.69 | 30.95 | 30.62 | 30.76 | 30.38 | 0.26 | 0.07
| | CHRW | 51.76 | 53.38 | 51.67 | 52.85 | 50.82 | 1.62 | 1.09
| | CIT | 61.18 | 61.59 | 60.94 | 61.36 | 58.63 | 0.41 | 0.18
| | CMX | 60.65 | 61.73 | 60.56 | 61.60 | 61.16 | 1.08 | 0.95
| | CPWR | 9.06 | 9.18 | 9.03 | 9.14 | 8.88 | 0.12 | 0.08
| | EL | 46.60 | 46.68 | 45.87 | 45.87 | 45.19 | 0.08 | -0.73
| | GGB | 17.95 | 17.95 | 17.50 | 17.65 | 17.97 | 0.00 | -0.30
| | GGP | 63.57 | 66.73 | 62.95 | 66.39 | 63.53 | 3.16 | 2.82
| | GTI | 7.99 | 8.15 | 7.91 | 8.09 | 7.77 | 0.16 | 0.10
| | HCP | 41.20 | 41.88 | 41.10 | 41.88 | 39.81 | 0.68 | 0.68
| | HLTH | 14.13 | 14.40 | 14.13 | 14.37 | 14.02 | 0.27 | 0.24
| | HYSL | 43.00 | 43.07 | 42.31 | 42.50 | 42.44 | 0.07 | -0.50
| | IR | 42.65 | 43.71 | 42.54 | 43.63 | 43.26 | 1.06 | 0.98
| | ITW | 52.00 | 52.09 | 51.80 | 52.00 | 50.29 | 0.09 | 0.00
| | KR | 25.62 | 26.23 | 25.58 | 26.14 | 25.57 | 0.61 | 0.52
| | LYO | 31.14 | 31.36 | 30.59 | 30.89 | 31.30 | 0.22 | -0.25
| | NCR | 47.10 | 47.30 | 46.98 | 47.25 | 46.25 | 0.20 | 0.15
| | NIHD | 74.05 | 74.68 | 73.53 | 74.52 | 73.64 | 0.63 | 0.47
| | PPC | 30.96 | 31.11 | 30.52 | 30.75 | 31.16 | 0.15 | -0.21
| | PRU | 89.65 | 90.37 | 89.65 | 90.37 | 90.02 | 0.72 | 0.72
| | RGC | 22.84 | 22.88 | 22.61 | 22.74 | 22.44 | 0.04 | -0.10
| | SPG | 118.89 | 123.96 | 117.90 | 123.78 | 118.66 | 5.07 | 4.89
| | SUNW | 6.57 | 6.62 | 6.51 | 6.59 | 6.25 | 0.05 | 0.02
| | SVU | 38.61 | 38.69 | 38.28 | 38.52 | 37.74 | 0.08 | -0.09
| | SWK | 58.35 | 58.41 | 57.66 | 58.09 | 57.26 | 0.06 | -0.26
| | SYK | 62.15 | 62.42 | 61.70 | 62.40 | 62.07 | 0.27 | 0.25
| | T | 37.44 | 37.61 | 36.88 | 37.16 | 37.22 | 0.17 | -0.28
| | TIN | 49.76 | 49.96 | 49.43 | 49.88 | 48.29 | 0.20 | 0.12
| | TMX | 31.15 | 31.20 | 30.75 | 31.08 | 30.93 | 0.05 | -0.07
| | TV | 28.96 | 29.11 | 28.81 | 28.96 | 28.65 | 0.15 | 0.00
| | UIS | 8.92 | 9.07 | 8.90 | 9.06 | 8.50 | 0.15 | 0.14
| | UNP | 100.35 | 102.19 | 99.93 | 100.15 | 99.09 | 1.84 | -0.20
| | 1642.40 | | | | | 21.76 | 10.82
|
Start: 2007-01-06 High: 2007-02-01 EOD: 2007-02-06
| Symbol | Open | High | Low | Close | Stop | O->H | O->C |
| AA | 32.85 | 32.86 | 32.07 | 32.15 | 32.29 | 0.01 | -0.70
| | ACF | 27.68 | 27.77 | 27.55 | 27.65 | 25.60 | 0.09 | -0.03
| | ACN | 38.50 | 39.10 | 38.44 | 39.10 | 37.98 | 0.60 | 0.60
| | AGU | 35.45 | 36.05 | 35.43 | 35.78 | 34.51 | 0.60 | 0.33
| | AL | 51.23 | 51.69 | 50.32 | 50.66 | 50.00 | 0.46 | -0.57
| | ANF | 80.67 | 81.59 | 79.92 | 80.24 | 80.46 | 0.92 | -0.43
| | ARBA | 9.30 | 9.45 | 9.21 | 9.26 | 9.42 | 0.15 | -0.04
| | BA | 90.59 | 91.20 | 89.70 | 90.35 | 89.73 | 0.61 | -0.24
| | BAX | 49.46 | 49.66 | 49.40 | 49.65 | 49.98 | 0.20 | 0.19
| | BC | 34.21 | 34.21 | 33.75 | 33.86 | 30.49 | 0.00 | -0.35
| | BMET | 42.25 | 42.49 | 42.17 | 42.45 | 42.08 | 0.24 | 0.20
| | BNI | 80.31 | 81.30 | 79.62 | 79.90 | 75.70 | 0.99 | -0.41
| | CECO | 29.08 | 29.25 | 28.97 | 29.01 | 28.13 | 0.17 | -0.07
| | CEM | 11.82 | 11.89 | 11.73 | 11.77 | 11.78 | 0.07 | -0.05
| | CEN | 30.69 | 30.95 | 30.62 | 30.76 | 30.38 | 0.26 | 0.07
| | CGV | 40.07 | 40.14 | 39.63 | 39.99 | 39.99 | 0.07 | -0.08
| | CIT | 61.18 | 61.59 | 60.94 | 61.36 | 58.63 | 0.41 | 0.18
| | CPWR | 9.06 | 9.18 | 9.03 | 9.14 | 8.88 | 0.12 | 0.08
| | CRM | 47.20 | 48.15 | 47.06 | 47.69 | 44.32 | 0.95 | 0.49
| | D | 87.15 | 87.30 | 86.78 | 86.99 | 85.53 | 0.15 | -0.16
| | DE | 104.70 | 104.94 | 103.41 | 103.50 | 100.95 | 0.24 | -1.20
| | DHI | 30.18 | 30.18 | 29.47 | 29.64 | 29.38 | 0.00 | -0.54
| | DO | 84.47 | 84.89 | 83.05 | 84.47 | 79.34 | 0.42 | 0.00
| | EFA | 75.18 | 75.45 | 75.03 | 75.26 | 74.51 | 0.27 | 0.08
| | ETR | 97.39 | 98.04 | 96.92 | 97.92 | 96.32 | 0.65 | 0.53
| | FRX | 55.95 | 56.30 | 55.07 | 55.40 | 56.54 | 0.35 | -0.55
| | GGB | 17.95 | 17.95 | 17.50 | 17.65 | 17.97 | 0.00 | -0.30
| | GILD | 71.12 | 73.25 | 70.93 | 72.24 | 69.51 | 2.13 | 1.12
| | HLT | 37.49 | 37.65 | 36.97 | 37.52 | 36.68 | 0.16 | 0.03
| | HLTH | 14.13 | 14.40 | 14.13 | 14.37 | 14.02 | 0.27 | 0.24
| | HRB | 24.85 | 24.95 | 24.73 | 24.84 | 24.26 | 0.10 | -0.01
| | HYSL | 43.00 | 43.07 | 42.31 | 42.50 | 42.44 | 0.07 | -0.50
| | IJR | 68.56 | 68.88 | 68.27 | 68.88 | 66.81 | 0.32 | 0.32
| | ITT | 60.18 | 60.18 | 59.14 | 59.97 | 60.26 | 0.00 | -0.21
| | ITW | 52.00 | 52.09 | 51.80 | 52.00 | 50.29 | 0.09 | 0.00
| | JCP | 85.00 | 85.68 | 84.21 | 84.42 | 84.09 | 0.68 | -0.58
| | KR | 25.62 | 26.23 | 25.58 | 26.14 | 25.57 | 0.61 | 0.52
| | LEH | 85.95 | 86.18 | 85.20 | 85.70 | 84.13 | 0.23 | -0.25
| | LLL | 86.35 | 87.75 | 86.31 | 87.06 | 83.25 | 1.40 | 0.71
| | LYO | 31.14 | 31.36 | 30.59 | 30.89 | 31.30 | 0.22 | -0.25
| | MAT | 25.40 | 25.88 | 25.40 | 25.82 | 25.33 | 0.48 | 0.42
| | MCO | 72.61 | 74.00 | 72.12 | 73.95 | 72.60 | 1.39 | 1.34
| | MET | 63.65 | 64.31 | 63.50 | 64.21 | 62.87 | 0.66 | 0.56
| | MNST | 51.59 | 52.80 | 51.59 | 52.74 | 51.39 | 1.21 | 1.15
| | NIHD | 74.05 | 74.68 | 73.53 | 74.52 | 73.64 | 0.63 | 0.47
| | OI | 23.85 | 23.85 | 22.93 | 23.14 | 23.11 | 0.00 | -0.71
| | ONNN | 9.66 | 9.73 | 9.52 | 9.72 | 9.35 | 0.07 | 0.06
| | PRU | 89.65 | 90.37 | 89.65 | 90.37 | 90.02 | 0.72 | 0.72
| | PX | 63.29 | 63.65 | 63.20 | 63.40 | 63.18 | 0.36 | 0.11
| | RCL | 42.13 | 42.33 | 41.30 | 41.59 | 45.01 | 0.20 | -0.54
| | RGC | 22.84 | 22.88 | 22.61 | 22.74 | 22.44 | 0.04 | -0.10
| | RYL | 58.70 | 58.90 | 57.56 | 57.97 | 57.30 | 0.20 | -0.73
| | SLE | 17.27 | 17.29 | 16.83 | 17.00 | 17.30 | 0.02 | -0.27
| | SNV | 32.54 | 32.78 | 32.53 | 32.65 | 32.10 | 0.24 | 0.11
| | SUNW | 6.57 | 6.62 | 6.51 | 6.59 | 6.25 | 0.05 | 0.02
| | SVU | 38.61 | 38.69 | 38.28 | 38.52 | 37.74 | 0.08 | -0.09
| | SWK | 58.35 | 58.41 | 57.66 | 58.09 | 57.26 | 0.06 | -0.26
| | SYK | 62.15 | 62.42 | 61.70 | 62.40 | 62.07 | 0.27 | 0.25
| | TIN | 49.76 | 49.96 | 49.43 | 49.88 | 48.29 | 0.20 | 0.12
| | TMX | 31.15 | 31.20 | 30.75 | 31.08 | 30.93 | 0.05 | -0.07
| | TSN | 18.23 | 18.40 | 18.11 | 18.15 | 18.15 | 0.17 | -0.08
| | TV | 28.96 | 29.11 | 28.81 | 28.96 | 28.65 | 0.15 | 0.00
| | TYC | 32.34 | 32.34 | 31.65 | 31.97 | 32.32 | 0.00 | -0.37
| | UBS | 63.43 | 63.92 | 63.31 | 63.63 | 63.33 | 0.49 | 0.20
| | UIS | 8.92 | 9.07 | 8.90 | 9.06 | 8.50 | 0.15 | 0.14
| | UNP | 100.35 | 102.19 | 99.93 | 100.15 | 99.09 | 1.84 | -0.20
| | WPI | 27.85 | 28.19 | 27.74 | 28.08 | 27.69 | 0.34 | 0.23
| | WSM | 35.50 | 35.50 | 34.92 | 35.05 | 35.65 | 0.00 | -0.45
| | XLI | 36.35 | 36.35 | 36.19 | 36.24 | 35.96 | 0.00 | -0.11
| | XRX | 17.27 | 17.38 | 17.27 | 17.33 | 16.12 | 0.11 | 0.06
| | 3032.42 | | | | | 25.46 | 0.15
|
[/Trading/Darvas/D200702]
permanent link
|