Policies

WORK IN PROGRESS

class cvxportfolio.SinglePeriodOpt(return_forecast, costs, constraints, solver=None, solver_opts=None)

Single-period optimization policy.

Implements the model developed in chapter 4 of our paper https://stanford.edu/~boyd/papers/cvx_portfolio.html

Methods

get_trades(portfolio, t=None)

Get optimal trade vector for given portfolio at time t.

Parameters:

portfolio : pd.Series

Current portfolio vector.

t : pd.timestamp

Timestamp for the optimization.

class cvxportfolio.MultiPeriodOpt(trading_times, terminal_weights, lookahead_periods=None, *args, **kwargs)

Methods

get_trades(portfolio, t=datetime.datetime(2018, 4, 21, 16, 22, 51, 519837))