I trade on the FOREX market. Currently I am attempting to use the FLANN library (Fast Library for Approximate Nearest Neighbors
) to find N similar situations to the current market state. I end up with a list of historic market points that are similar to my query point, and a value associated with each of these points that represents the "distance" away from my query point.
I evaluate my strategy's performance at those points, and (potentially) enter the market using the profit factor (gross gain/ gross loss) as my bet size.
However, since each of these points is a different distance away from my query point I should be weighing the profit/loss at these points differently.
Initially I thought that I would weigh them like this:
Weight = 1/Distance
The problem is that if 1 point is a close distance away from the query point (ex. dist = 10), and all other points are a larger distance away (ex. dist > 20000), then I am basing my bet entry size almost entirely on the 1 close point.
Currently I am attempting to normalize like this:
Weight = 1/log(1+Weight)
This gives me a more usable value, but it seems pretty arbitrary (why log and not ln?)
Does anyone have a better idea?