# setOneWayTurnover

Set up one-way portfolio turnover constraints

## Syntax

``obj = setOneWayTurnover(obj,BuyTurnover)``
``obj = setOneWayTurnover(obj,BuyTurnover,SellTurnover,InitPort,NumAssets)``

## Description

example

````obj = setOneWayTurnover(obj,BuyTurnover)` sets up one-way portfolio turnover constraints for `Portfolio`, `PortfolioCVaR`, or `PortfolioMAD` objects. For details on the respective workflows when using these different objects, see Portfolio Object Workflow, PortfolioCVaR Object Workflow, and PortfolioMAD Object Workflow.```

example

````obj = setOneWayTurnover(obj,BuyTurnover,SellTurnover,InitPort,NumAssets)` sets up one-way portfolio turnover constraints for portfolio objects with additional options specified for `SellTurnover`, `InitPort`, and `NumAssets`.Given an initial portfolio in `InitPort` and an upper bound for portfolio turnover on purchases in `BuyTurnover` or sales in `SellTurnover`, the one-way turnover constraints require any portfolio `Port` to satisfy the following:1' * max{0, Port - InitPort} <= BuyTurnover 1' * max{0, InitPort - Port} <= SellTurnover NoteIf `Turnover` =`BuyTurnover` = `SellTurnover`, the constraint is not equivalent to:1' * | Port - InitPort | <= TurnoverTo set this constraint, use `setTurnover`. ```

## Examples

collapse all

Set one-way turnover constraints.

```p = Portfolio('AssetMean',[0.1, 0.2, 0.15], 'AssetCovar',... [ 0.005, -0.010, 0.004; -0.010, 0.040, -0.002; 0.004, -0.002, 0.023]); p = setBudget(p, 1, 1); p = setOneWayTurnover(p, 1.3, 0.3, 0); %130-30 portfolio plotFrontier(p);``` Set one-way turnover constraints.

```x0 = [ 0.12; 0.09; 0.08; 0.07; 0.1; 0.1; 0.15; 0.11; 0.08; 0.1 ]; p = PortfolioCVaR('InitPort', x0); p = setOneWayTurnover(p, 0.3, 0.2); disp(p.NumAssets);```
``` 10 ```
`disp(p.BuyTurnover)`
``` 0.3000 ```
`disp(p.SellTurnover)`
``` 0.2000 ```
`disp(p.InitPort);`
``` 0.1200 0.0900 0.0800 0.0700 0.1000 0.1000 0.1500 0.1100 0.0800 0.1000 ```

Set one-way turnover constraints.

```x0 = [ 0.12; 0.09; 0.08; 0.07; 0.1; 0.1; 0.15; 0.11; 0.08; 0.1 ]; p = PortfolioMAD('InitPort', x0); p = setOneWayTurnover(p, 0.3, 0.2); disp(p.NumAssets);```
``` 10 ```
`disp(p.BuyTurnover)`
``` 0.3000 ```
`disp(p.SellTurnover)`
``` 0.2000 ```
`disp(p.InitPort);`
``` 0.1200 0.0900 0.0800 0.0700 0.1000 0.1000 0.1500 0.1100 0.0800 0.1000 ```

## Input Arguments

collapse all

Object for portfolio, specified using `Portfolio`, `PortfolioCVaR`, or `PortfolioMAD` object. For more information on creating a portfolio object, see

Data Types: `object`

Turnover constraint on purchases, specified as a nonnegative and finite scalar for a `Portfolio`, `PortfolioCVaR`, or `PortfolioMAD` input object (`obj`).

Turnover constraint on sales, specified as a nonnegative and finite scalar for a `Portfolio`, `PortfolioCVaR`, or `PortfolioMAD` input object (`obj`).

Initial or current portfolio weights, specified as a finite vector with `NumAssets` > `0` elements for a `Portfolio`, `PortfolioCVaR`, `PortfolioMAD` input object (`obj`).

Note

If no `InitPort` is specified, that value is assumed to be `0`.

If `InitPort` is specified as a scalar and `NumAssets` exists, then `InitPort` undergoes scalar expansion.

Data Types: `double`

Number of assets in portfolio, specified as a scalar for a `Portfolio`, `PortfolioCVaR`, or `PortfolioMAD` input object (`obj`).

Note

If it is not possible to obtain a value for `NumAssets`, it is assumed that `NumAssets` is `1`.

Data Types: `double`

## Output Arguments

collapse all

Updated portfolio object, returned as a `Portfolio`, `PortfolioCVaR`, or `PortfolioMAD` object. For more information on creating a portfolio object, see

collapse all

### One-way Turnover Constraint

One-way turnover constraints ensure that estimated optimal portfolios differ from an initial portfolio by no more than specified amounts according to whether the differences are purchases or sales.

The constraints take the form

`${1}^{T}\mathrm{max}\left\{0,x-{x}_{0}\right\}\le {\tau }_{B}$`

`${1}^{T}\mathrm{max}\left\{0,{x}_{0}-x\right\}\le {\tau }_{S}$`

with

• `x` — The portfolio (NumAssets vector)

• `x0` — Initial portfolio (NumAssets vector)

• τB — Upper-bound for turnover constraint on purchases (scalar)

• τS — Upper-bound for turnover constraint on sales (scalar)

Specify one-way turnover constraints using the following properties in a supported portfolio object: `BuyTurnover` for τB, `SellTurnover` for τS, and `InitPort` for `x0`.

Note

The average turnover constraint (which is set using `setTurnover`) is not just the combination of the one-way turnover constraints with the same value for the constraint.

## Tips

You can also use dot notation to set up one-way portfolio turnover constraints.

`obj = obj.setOneWayTurnover(BuyTurnover,SellTurnover,InitPort,NumAssets)`

## Version History

Introduced in R2011a
{"ft_lang_label":"__label__en","ft_lang_prob":0.52405334,"math_prob":0.885536,"size":5327,"snap":"2023-14-2023-23","text_gpt3_token_len":1495,"char_repetition_ratio":0.23257561,"word_repetition_ratio":0.2425876,"special_character_ratio":0.25699267,"punctuation_ratio":0.19900498,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9538294,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-07T05:53:14Z\",\"WARC-Record-ID\":\"<urn:uuid:6243df36-d221-4bb4-8e72-596ece7093c9>\",\"Content-Length\":\"112597\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:85e0cbf6-98bf-41a8-9379-e08673065fe1>\",\"WARC-Concurrent-To\":\"<urn:uuid:27df95a9-1f87-4582-8c06-dca062901fc0>\",\"WARC-IP-Address\":\"104.86.80.92\",\"WARC-Target-URI\":\"https://de.mathworks.com/help/finance/portfolio.setonewayturnover.html\",\"WARC-Payload-Digest\":\"sha1:F646N4XJXZRWYFLYNPQ6LSGFN3MYSWQP\",\"WARC-Block-Digest\":\"sha1:G76N6BB2ZVZJCDWVJRQRFNGSRQ4EGZWV\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224653608.76_warc_CC-MAIN-20230607042751-20230607072751-00391.warc.gz\"}"}