double[] xmin = new double[]{minBuy, minSell, 0.0};
double[] xmax = new double[]{maxBuy, maxSell, maxStop};
SimpleParticleSwarmOptimizer optimizer = new SimpleParticleSwarmOptimizer(fitness, xmin, xmax, generations);
return optimizer.learn();
}
public static double getMedianHighOpenSpread(String symbol, int days) throws Exception {
YahooQuoteFetcher yahooFetcher = new YahooQuoteFetcher();
String quoteStr = yahooFetcher.fetchQuotes(symbol, days, 60*60*24);