Cost models

WORK IN PROGRESS

class cvxportfolio.HcostModel(borrow_costs, dividends=0.0)

A model for holding costs.

Attributes:
borrow_costs: A dataframe of borrow costs. dividends: A dataframe of dividends.

Methods

class cvxportfolio.TcostModel(half_spread, nonlin_coeff=0.0, sigma=0.0, volume=1.0, power=1.5)

A model for transaction costs.

(See figure 2.3 in the paper https://stanford.edu/~boyd/papers/pdf/cvx_portfolio.pdf)

Attributes:
volume: A dataframe of volumes. sigma: A dataframe of daily volatilities. half_spread: A dataframe of bid-ask spreads divided by 2. nonlin_coeff: A dataframe of coefficients for the nonlinear cost. power: The nonlinear tcost power.

Methods