Ejemplo n.º 1
0
    def __init__(self, parameters):
        PortfolioManager.__init__(self, parameters)
        # Database access for symbols retrieving
        self.feeds = DataFeed()

        # R stuff: R functions file and rpy interface
        self.r = robjects.r
        portfolio_opt_file = '/'.join((os.environ['QTRADE'], 'neuronquant/ai/opt_utils.R'))
        self.r('source("{}")'.format(portfolio_opt_file))
Ejemplo n.º 2
0
    def __init__(self, parameters):
        PortfolioManager.__init__(self, parameters)
        # Database access for symbols retrieving
        self.feeds = DataFeed()

        # R stuff: R functions file and rpy interface
        self.r = robjects.r
        portfolio_opt_file = '/'.join(
            (os.environ['QTRADE'], 'neuronquant/ai/opt_utils.R'))
        self.r('source("{}")'.format(portfolio_opt_file))
Ejemplo n.º 3
0
class TestPortfolio(TestCase):
    def setUp(self):
        setup_logger(self)
        parameters = {}
        self.manager = PortfolioManager(parameters)

    def tearDown(self):
        teardown_logger(self)

    #NOTE I need a portfolio object
    @timed(DEFAULT_TIMEOUT)
    def update_portfolio_universe(self):
        pass

    def signals_manipulation(self):
        pass

    def set_portfolio_properties(self):
        self.manager.setup_strategie({'test_max_weigth': 0.56, 'test_frequency': 45})
        assert self.manager._optimizer_parameters['test_max_weigth'] == 0.56
        assert self.manager._optimizer_parameters['test_frequency'] == 45
Ejemplo n.º 4
0
class TestPortfolio(TestCase):
    def setUp(self):
        setup_logger(self)
        parameters = {}
        self.manager = PortfolioManager(parameters)

    def tearDown(self):
        teardown_logger(self)

    #NOTE I need a portfolio object
    @timed(DEFAULT_TIMEOUT)
    def update_portfolio_universe(self):
        pass

    def signals_manipulation(self):
        pass

    def set_portfolio_properties(self):
        self.manager.setup_strategie({
            'test_max_weigth': 0.56,
            'test_frequency': 45
        })
        assert self.manager._optimizer_parameters['test_max_weigth'] == 0.56
        assert self.manager._optimizer_parameters['test_frequency'] == 45
Ejemplo n.º 5
0
 def setUp(self):
     setup_logger(self)
     parameters = {}
     self.manager = PortfolioManager(parameters)
Ejemplo n.º 6
0
 def setUp(self):
     setup_logger(self)
     parameters = {}
     self.manager = PortfolioManager(parameters)