Examples of YahooDownload


Examples of org.encog.app.quant.loader.yahoo.YahooDownload

public class TestYahooDownload extends TestCase {

  public void testYahooDownloadError() throws IOException {
    try {
      YahooDownload yahoo = new YahooDownload();
      yahoo.setPercision(2);
      // load a non-sense ticker, should throw error
      yahoo.loadAllData("sdfhusdhfuish", new File("test.txt"), CSVFormat.ENGLISH,
          new GregorianCalendar(2000, 00, 01).getTime(),
          new GregorianCalendar(2000, 00, 10).getTime());

      // bad!
      Assert.assertTrue(false);
View Full Code Here

Examples of org.encog.app.quant.loader.yahoo.YahooDownload

      // good!
    }
  }

  public void testYahooDownloadCSV() throws IOException {
    YahooDownload yahoo = new YahooDownload();
    yahoo.setPercision(2);
    yahoo.loadAllData("yhoo", new File("test.txt"), CSVFormat.ENGLISH,
        new GregorianCalendar(2000, 00, 01).getTime(),
        new GregorianCalendar(2000, 00, 10).getTime());
    BufferedReader tr = new BufferedReader(new FileReader("test.txt"));

    Assert.assertEquals(
View Full Code Here

Examples of org.encog.app.quant.loader.yahoo.YahooDownload

      Calendar begin = new GregorianCalendar(fromYear, fromMonth - 1,
          fromDay);
      Calendar end = new GregorianCalendar(toYear, toMonth - 1, toDay);

      try {
        final YahooDownload loader = new YahooDownload();

        if (end.getTimeInMillis() < begin.getTimeInMillis()) {
          EncogWorkBench.displayError("Dates",
              "Ending date should not be before begin date.");
          return;
        }

        File targetFile = new File(EncogWorkBench.getInstance()
            .getProjectDirectory(), name);

        EncogWorkBench.getInstance().getMainWindow().beginWait();
        loader.loadAllData(dialog.getTicker().getValue(),
            targetFile, CSVFormat.ENGLISH,
            begin.getTime(), end.getTime());

      } catch (QuantError e) {
        EncogWorkBench.displayError("Ticker Symbol",
View Full Code Here

Examples of org.encog.app.quant.loader.yahoo.YahooDownload

public class TestYahooDownload extends TestCase {

  public void testYahooDownloadError() throws IOException {
    try {
      YahooDownload yahoo = new YahooDownload();
      yahoo.setPercision(2);
      // load a non-sense ticker, should throw error
      yahoo.loadAllData("sdfhusdhfuish", new File("test.txt"), CSVFormat.ENGLISH,
          new GregorianCalendar(2000, 00, 01).getTime(),
          new GregorianCalendar(2000, 00, 10).getTime());

      // bad!
      Assert.assertTrue(false);
View Full Code Here

Examples of org.encog.app.quant.loader.yahoo.YahooDownload

      // good!
    }
  }

  public void testYahooDownloadCSV() throws IOException {
    YahooDownload yahoo = new YahooDownload();
    yahoo.setPercision(2);
    yahoo.loadAllData("yhoo", new File("test.txt"), CSVFormat.ENGLISH,
        new GregorianCalendar(2000, 00, 01).getTime(),
        new GregorianCalendar(2000, 00, 10).getTime());
    BufferedReader tr = new BufferedReader(new FileReader("test.txt"));

    Assert.assertEquals(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.