Nerd Stuff, on.inno, Random Inno

Don’t want to learn Perl, Python, Shell … Ok, try On.Inno

There are people on this planet earth, wonderful as it is, that don’t want to learn about the glue that holds all things together. And by glue I’m referring to the workhorse scripts that never really get the attention they deserve:

  • Perl
  • Python
  • Shell

One cannot truly say they have experienced a production infrastructure with at least typing one command from any of the above.

Well for those who are not ready for this level can jump to the next level. I have something for you called on.inno.

on.inno is a high level scripting programming language that has 2 logical operators (IF …ELSE) … that’s it.

It’s simple, more to come.



EXEC<,><!>This is a comment: embed any of thing here Perl| Pyton|Shell><,><,>1

EXECEND<,>echo if<,>if

Why did I create this simple language … I work in an environment that has different versions of OS’s (Linux, Windows, and Solaris), and not all of them have the same components. To save my self from having to try and say install Perl on all of them and simply drop some code there (ideal world) I simply created my own interpreted script to interface with the remote OS.

Random Inno

use Parallel::ForkManager

A very powerful and easy to use Perl multitasking module.

Used in every single code I now write, as it’s annoying to continuously  update code just to make it scale-able. In my scripts I usually like to “fork” things off especially say when manipulating data.

With this module it’s as easy as a foreach loop:

use Parallel::ForkManager;

use PiroLabs::Utils::DataCruncher;

my $max_threads = 10;

my @tasks = qw (x / + -);

$pm = new Parallel::ForkManager($max_threads);

foreach (@tasks){

$pm = new Parallel::ForkManager($max_threads);

my $pid = $pm->start and next;

my $dc = new DataCruncher([0 … 2000000], $_);





In the snippet above I want to perform multiplication, division, addition and subtraction all at the same time on some defined data set.

Next post I will show how to pass data from the child processes back to the parent.

raspberry pi

Raspberry PI: Static WiFi IP

Impressed as I was, the pi worked with the WiFi gizmo out of the box, once I setup the keys and SSID from the desktop. But really DHCP is not ideal especially if you want to use only the ssh server (don’t care much about the mouse and desktop fluffy stuff).

Ran into a roadblock trying to enable static IP, searched high and low but could but configure a static route for the USB Micro WiFi dongle (belkin).

Finally got it working by updating the default interfaces config, changed the default from dhcp to static and added the ip properties:

auto lo

iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet static

Hope this helps someone in the same boat.

Nerd Stuff, Random Inno

Raspberry PI … Finally

Got my raspberry pi recently, been waiting since early April. At first I did not do much with it but today after a few days i picked it up, loaded the Debian Linux (Raspbian “Wheezy”) and I can say it’s awesome.

The possibilities are limitless, with some using it as a media streaming device (XBMC) and others as a router. I intend to use mine as a mini trading black box as long as I can a decent JVM on it. The idea is to release some open source  code with the intention of teaching beginners guide to coding trading strategies.

Random Inno

Using SCSI or IDE as a VMWare virtual device adapter

For a while I noticed the performance of a virtual machine (2 cores, 2GB, Win Server 2K8 R2 64Bit) was very poor, while the autostart services always timed out. After starting services manually things eventuallystarted working although at a sluggish pace.

Fixed: changing the VMWare device adapter from IDE to SCSI, the performance has signifincantly improved.

Random Inno

Introducing PrincessTenko

With Hurricane Sandy, and also the time of the year, my God have I been busy working full time has never been so demanding.

Well with the sad news out of the way, I also bring some good news. PrincessTenko is a new trading strategy written to trade equities (long & short).

Can find more information about her trading portfolio & performance here: She is trading “paper” money and transaction costs have NOT been deducted yet for now (the delay is due to implementation style).

If you are trying to figure out why the strat is called PrincessTenko then head over to wikipedia for now.

Finally, please note that I’m working to fully automate PrincessTenko, as we speak 95% f the work has been completed. And for the tech heads out there here’s her specs:

  • TSQL & MS SQL Server database
  • Perl
  • Matlab
  • Java / C# (pending: to replace Matlab code which is the source for the manual bottle neck)

More details coming


Tools And Then More Tools

Recently started developing a stock screening system. I say system because unlike my spreadsheet based process this is a fully automated System.

1. Create the Asset Universe: Using criteria that I believe identifies performing stocks (statistically good assets exhibit for example trend / PE etc). The infrastructure that powers this is a perl scrapping tool + SQL Server to store all the data.

2. Analyse the Universe separating the real winners from the losers. Again here more analysis is performed such as predictive econometrics etc. Matlab is used for number crunching with Yahoo as the auxiliary quote source (historical mainly). Data is stored in SQL Server.

3. What to do with the final list of stocks … not decided yet but I can say that the performance (YTD) thus far is 20% above the FTSE 100.