Package org.encog.app.quant.indicators

Examples of org.encog.app.quant.indicators.ProcessIndicators


    }

    public void testIndicatorsHeaders() throws IOException
    {
        generateTestFileHeadings(true);
        ProcessIndicators norm = new ProcessIndicators();
        norm.analyze(INPUT_NAME, true, CSVFormat.ENGLISH);
        norm.addColumn(new MovingAverage(3, true));
        norm.addColumn(new BestClose(3,true));
        norm.getColumns().get(0).setOutput(true);
        norm.process(OUTPUT_NAME);

        BufferedReader tr = new BufferedReader(new FileReader(OUTPUT_NAME));

        Assert.assertEquals("\"date\",\"close\",\"MovAvg\",\"PredictBestClose\"", tr.readLine());
        Assert.assertEquals("20100103,3,2,6", tr.readLine());
View Full Code Here


    }

    public void TestIndicatorsNoHeaders() throws IOException
    {
        generateTestFileHeadings(false);
        ProcessIndicators norm = new ProcessIndicators();
        norm.analyze(INPUT_NAME, false, CSVFormat.ENGLISH);
        norm.addColumn(new MovingAverage(3, true));
        norm.addColumn(new BestClose(3, true));
        norm.getColumns().get(0).setOutput( true );
        norm.renameColumn(1, "close");
        norm.process(OUTPUT_NAME);

        BufferedReader tr = new BufferedReader(new FileReader(OUTPUT_NAME));

        Assert.assertEquals("20100103,3,2,6", tr.readLine());
        Assert.assertEquals("20100104,4,3,7", tr.readLine());
View Full Code Here

    }

    public void testIndicatorsHeaders() throws IOException
    {
        generateTestFileHeadings(true);
        ProcessIndicators norm = new ProcessIndicators();
        norm.analyze(INPUT_NAME, true, CSVFormat.ENGLISH);
        norm.addColumn(new MovingAverage(3, true));
        norm.addColumn(new BestClose(3,true));
        norm.getColumns().get(0).setOutput(true);
        norm.process(OUTPUT_NAME);

        BufferedReader tr = new BufferedReader(new FileReader(OUTPUT_NAME));

        Assert.assertEquals("\"date\",\"close\",\"MovAvg\",\"PredictBestClose\"", tr.readLine());
        Assert.assertEquals("20100103,3,2,6", tr.readLine());
View Full Code Here

    }

    public void TestIndicatorsNoHeaders() throws IOException
    {
        generateTestFileHeadings(false);
        ProcessIndicators norm = new ProcessIndicators();
        norm.analyze(INPUT_NAME, false, CSVFormat.ENGLISH);
        norm.addColumn(new MovingAverage(3, true));
        norm.addColumn(new BestClose(3, true));
        norm.getColumns().get(0).setOutput( true );
        norm.renameColumn(1, "close");
        norm.process(OUTPUT_NAME);

        BufferedReader tr = new BufferedReader(new FileReader(OUTPUT_NAME));

        Assert.assertEquals("20100103,3,2,6", tr.readLine());
        Assert.assertEquals("20100104,4,3,7", tr.readLine());
View Full Code Here

TOP

Related Classes of org.encog.app.quant.indicators.ProcessIndicators

Copyright © 2018 www.massapicom. 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.