Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 778 | blopes | 1 | package br.com.robo; |
| 2 | |||
| 3 | import br.com.robo.backtest.Backtester; |
||
| 4 | import br.com.robo.model.Candle; |
||
| 5 | import br.com.robo.sim.CandleGenerator; |
||
| 6 | import br.com.robo.strategy.MovingAverageCrossoverStrategy; |
||
| 7 | import br.com.robo.strategy.Strategy; |
||
| 8 | import br.com.robo.view.CandleChart; |
||
| 9 | |||
| 10 | import java.util.List; |
||
| 11 | |||
| 12 | public class MainBacktest { |
||
| 13 | |||
| 14 | public static void main(String[] args) { |
||
| 15 | System.out.println("TESTE 2"); |
||
| 16 | /* |
||
| 17 | // 1) Gera candles simulados |
||
| 18 | List<Candle> candles = CandleGenerator.gerarSerieSimulada(300, 20.0); |
||
| 19 | |||
| 20 | // 2) Define a estratégia |
||
| 21 | Strategy strategy = new MovingAverageCrossoverStrategy(9, 21); |
||
| 22 | |||
| 23 | // 3) Roda o backtest |
||
| 24 | double capitalInicial = 100_000.0; |
||
| 25 | Backtester.rodarBacktest(candles, strategy, capitalInicial); |
||
| 26 | |||
| 27 | // 4) Exibe o gráfico de candles |
||
| 28 | CandleChart.exibirCandles(candles, "Candles Simulados - MM9 x MM21"); |
||
| 29 | */ |
||
| 30 | } |
||
| 31 | } |