Showing posts from February, 2013

Transform a spreadsheet into a localization xml file using python

Some time ago a customer at my work provided descriptions of some sort of article codes in the form of a spreadsheet. We needed to transform the information into a localization file in xml format. I don't really remember how I did this at that time. I believe I used some text editor and did some string replacements. I figured it would be a one time thing, so why automate. Now, last week a colleague started working on a new project for this client and it turns out he needs to build again new localization files.

So I figured a script that would automate the transformation would be nice to have, fun to write and good practice.

First we need to export the spreadsheet as a csv file (UTF-8 encoded) and call it input.csv. I use LibreOffice to do this.

We will run the python script from the same directory as the input file.
This will result in the output.xml file.

Related articlesHow to Open an XML File for DummiesPyspread: the non-traditional spreadsheetHow to use python to parse X…

Algo Trading with python

I currently back test trading strategies in Python using the Pandas and Matplotlib libraries. I mainly trade Forex and CFDs with Oanda. I am working on a framework that will allow me to back test and trade using the same event driven implementation. If you wanna stay informed on what I am working on then be sure to:subscribe to my maillist here. One of the practical goals in my education plan is:
Develop programming skills that will aid in my trading I believe trading to be more art then science. Still back testing rule based strategies is necessary, but it is a lot of work if you do this manually.  And that's where programming comes in handy. Also monitoring markets and signal creation is something that I would want to automate.

So last Friday I registered for Jev Kuznetsov's Trading with python course. I have been keeping an eye on Jev's blog for some time know, as he seems to be doing exactly what I intend to be doing. And that is: back testing trading strategies algorit…