Exemple #1
0
 public Carteira(FacadeBacktester facade, float capitalInicial, system.Config config, system.TradeSystem tradeSystem, MonteCarlo mc)
 {
     this.facade         = facade;
     this.capitalInicial = capitalInicial;
     this.capitalLiq     = capitalInicial;
     posicoesAbertas     = new Dictionary <Ativo, Posicao>();
     this.config         = config;
     posicoesFechadas    = new List <Posicao>();
     capitalPosicao      = 0;
     this.tradeSystem    = tradeSystem;
     estatistica         = new Estatistica(capitalInicial);
     capitalMes          = capitalInicial;
     this.monteCarlo     = mc;
 }
 public Carteira RunSingle(string name, ICaller caller, model.system.Config config, model.system.TradeSystem ts)
 {
     backTester = new BackTester(this, dh.periodos[0], config, ts);
     return(backTester.runMonteCarlo(caller, name));
 }
 public Carteira RunValidation(ICaller caller, model.system.Config config, model.system.TradeSystem ts, string name = "??")
 {
     backTester = new BackTester(this, dh.periodos[0], config, ts);
     return(backTester.runSingleBackTest(caller, new MonteCarlo(name)));
 }
 public Carteira Run(ICaller caller, model.system.Config config, model.system.TradeSystem ts, string name = "??")
 {
     backTester = new BackTester(this, dh.periodos[0], config, ts);
     backTester.runBackTest(caller, name);
     return(backTester.carteira);
 }