Description Usage Arguments Details Value Author(s) Examples

This package takes as input x values *x_1,…,x_n*, as well as lower *L_1,…,L_n*, and upper bounds *U_1,…,U_n*. It maximizes *∑ _{i=1}^{n}f_i, \, f_i\in \{0,1\}* such that there exists at least one convex increasing (decreasing) set of values *L_j≤ y_j≤ U_j, j\in C*, where *C* is the set of indices *i=1,…,n* for which *f_i=1*.

1 |

`x` |
a numeric vector containing a set of points. The elements of |

`lower` |
a numeric vector of the same length as |

`upper` |
a numeric vector of the same length as |

`increasing` |
a boolean value determining whether to look for an increasing or decreasing pattern. The default value is FALSE. |

`epsim` |
a non-negative value controlling the monotonicity conditions, |

`epsic` |
a positive value controlling the convexity condition. For |

`visual` |
a boolean value indicating whether a visual representation of the solution is desired. Here a solution is depicted for all values of x, with linearly interpolated y if |

The package `DIconvex`

is solved as a linear program facilitating `lpSolveAPI`

.
It lends itself to applications with financial options data. Given a dataset of call or put options, the function maximizes the number of data points such that there exists at least one set of arbitrage-free fundamental option prices within bid and ask spreads.

For this particular application, `x`

is the vector of strike prices, `lower`

represents the vector of bid prices and `upper`

represents the vector of ask prices.

a list containing:

a vector containing *f_1,…,f_n*.

a vector containing *y_j, \, j \in C*.

a single integer value containing the status code of the underlying linear program. For the interpretation of status codes please see `lpSolveAPI`

R documentation. The value 0 signifies success.

Liudmila Karagyaur <[email protected]>

Paul Schneider <[email protected]>

1 2 3 4 5 6 7 8 9 10 11 | ```
x = c(315, 320, 325, 330, 335, 340, 345, 350)
upper = c(0.5029714, 0.5633280, 0.6840411, 0.8751702, 3.0000000, 1.5692708, 2.3237279, 3.5207998)
lower = c(0.2514857, 0.4325554, 0.4325554, 0.6236845, 2.5000000, 1.1870125, 1.9414696, 3.1385415)
DIconvex(x, lower, upper, increasing = TRUE)
x = c(340, 345, 350, 355, 360, 365)
lower = c(2.7661994, 1.3177168, 1.5029454, 0.1207069, 0.1207069, 0.1207069)
upper = c(3.1383790, 1.5088361, 1.6236522, 0.3721796, 0.1810603, 0.2514727)
DIconvex(x, lower, upper, increasing = FALSE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.