cvxgrp/cvxportfolio

Feature request: add `market_data=None` option to `Policy.execute`

Opened this issue · 0 comments

This defeats the purpose of one of the design decisions of Cvxportfolio: Data management code should be the same, as far as possible, in the context of back-tests and live execution.

However, de-coupling live execution from market data management entirely adds flexibility to the end user, and in certain environments it might not even be possible to use Cvxportfolio's native MarketData servers when facing the market, or it might be too costly to build a custom object that implements the required interface.

It should be quite easy to develop. Only stumbling block is that sometimes past_returns is assumed to be there, but the pieces are all there to get around that. Of course, the user is responsible to provide all data used throughout the policy's DAG, but the required interfaces, in the constructors of each user-facing object, are all there.