Search in sources :

Example 1 with PmamrBackAllocator

use of suite.trade.backalloc.strategy.PmamrBackAllocator in project suite by stupidsing.

the class BackAllocBackTestTest method testBackTest.

@Test
public void testBackTest() {
    BackAllocator backAllocator = new PmamrBackAllocator().backAllocator();
    Simulate sim = runner.backTest(backAllocator, period);
    SummarizeByStrategy<String> sbs = Summarize.of(cfg, Read.from(sim.trades)).summarize(trade -> trade.symbol);
    System.out.println(sbs.log);
    assertGrowth(out(sim));
}
Also used : MovingAvgMeanReversionBackAllocator(suite.trade.backalloc.strategy.MovingAvgMeanReversionBackAllocator) PmamrBackAllocator(suite.trade.backalloc.strategy.PmamrBackAllocator) Simulate(suite.trade.backalloc.BackAllocTester.Simulate) PmamrBackAllocator(suite.trade.backalloc.strategy.PmamrBackAllocator) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Simulate (suite.trade.backalloc.BackAllocTester.Simulate)1 MovingAvgMeanReversionBackAllocator (suite.trade.backalloc.strategy.MovingAvgMeanReversionBackAllocator)1 PmamrBackAllocator (suite.trade.backalloc.strategy.PmamrBackAllocator)1