add support for comparing Price objects

This change introduces compare functionality for Prices: support for
equality comparison as well as less than checks are added. To derive the
remaining comparison operators (not equal, less or equal, greater, and
greater or equal), the total_ordering decorator as provided by the
functools module is used. Price objects can now be related to each
other and form a total ordering.
This change forms a first step towards better statistics calculation
based on prices that requires comparing said objects.
add findIntersections() function

This change adds a new statistics related function: findIntersections()
can be used to calculate the intersection points between two data sets
with equal time stamps. It is implemented to return a generator that
calculates all intersection points beginning with the most recent data
points. There is some maths involved to interpolate the intersection
points. A Maxima script was used to derive the final formula.
A unit test is added that verifies the results of the calculation. Also,
for better overview each statistics related test is put into its own
module, which means testStatistics.py (which contains functionality to
test the EMA calculation) is renamed to testStatisticsEma.py.
improve EMA calculation functionality

Putting closer attention on the EMA calculation functionality revealed
that it is not quite what we require: although we calculate the EMA for
a list, only the actual last value calculated is the truly expected one,
all other values are just intermediate results that could be thrown
away, strictly speaking.
This change honors this observation by introducing two functions:
calculateEmaValue() can be used to calculate a single EMA value based on
a given number of values. The second function, calculateEma() uses this
function to calculate the correct EMA values for a list of values.
add Makefile

Invoking tests should be fast and easy. This change adds a Makefile to
the root directory that takes care of the correct invocation of all
required tests when invoked using 'make'.
In general there might be stale tests lying around and so the decision
was made to explicitly list tests to be executed by default over having
the unit test module discover them dynamically. However, the 'testAll'
target takes care of this and will at the very least execute the full
program test with a longer run time.
MERGE W/ 9a626ca5
MERGE W/ c96a2086
MERGE W/ 717522e5
MERGE W/ dcfd5068
make history() method return low and high prices

Strategies implemented in the fxBot should be able to make use of all
information related to price developments that they can get. One such
information currently not exposed are the low and high prices for each
interval in the historic data.
This change adjusts the currency's history() method to return the low
and high prices in addition to the opening and closing prices for each
data point in time.
MERGE W/ e68f28ec
introduce graphitize tool for generating PDF graphs from data

This change introduces graphitize, a helper tool for generating PDF
graphics that visualize the development of prices over time. Along with
the act of drawing candlesticks with the opening and closing prices as
well as marks for the lowest and highest prices for the respective
interval, it is also able to display EMA 10 and EMA 20 trendlines as
well as the intersection points between these two lines.
This tool is not meant to be interactive in any way, its mere goal is to
produce a static PDF file that can be used to visualize the data from a
certain point in time to get a better understanding of what was going
on.
make use of matplotlib rc file in graphitize tool

It is possible that matplotlib is used in more places in the future
where graphs similar to those produced by graphitize are to be drawn.
To that end, and in order to remove stylistic references from the code
where possible, common style settings can be placed in a configuration
file that can be shared.
This change introduces such a configuration file and adjusts graphitize
to expect it to be provided along with its source code file.
add support for drawing multiple data sets

With this change graphitize accepts multiple input files and visualizes
them all, putting the output into a single file. The main hurdles that
had to be coped with here are the correct calculation of the candlestick
width which has to be specified as "fraction of a day". Apparently, this
is not completely true and an additional correction factor is required
(or perhaps my thinking/calculation is flawed).
The other bit worth mentioning is the creation and arrangement of
subplots -- one for every input file to visualize. A custom arragement
scheme was implemented because the default one did not produce the
anticipated result.
add support for trend approximation

This change introduces a new statistics related functionality to
find trends in data sets. The findUnidirectionalTrends() function finds
occurrences of consecutive price increases/decreases and reports them
back. This functionality abstracts from low level data handling and
allows clients to react once a certain number of increases/decreases
occurred.
first step towards profit/loss calculation
add support for calculating units available for a certain margin
print more details for TRAILING_STOP_FILLED event
TEMPORARY: print out full event information
tmp