MATLAB Aided Option Replication

In reality markets are incomplete in the sense that perfect replication of contingent claims using only the underlying asset and a riskless bond is impossible. In other words, that is perfect risk transfer is not possible since some payoffs cannot be replicated by trading in marketed securities. From the work of Ross in [21], it is evident that whenever the payoff of every call or put option can be replicated then the securities market is complete. In addition, an important implication of the aforementioned work of Ross, is the existence of options that cannot be replicated by the primitive securities when markets are incomplete. In [7], the authors came to the conclusion that Ross’s result is, in fact, a negative result since it asserts that in an incomplete market one cannot expect to replicate the payoff of each option even if the underlying asset is traded. In the same paper, it is proved that if the number of securities is less than half the number of states of the world, then (generically) not a single option can be replicated by traded securities. In [10], the author extended the aforementioned result in [7], to accommodate cases where the condition on the number of primitive securities is not imposed. In particular, it is proved that if there exists no binary payoff vector in the asset span, then for each portfolio there exists a set of nontrivial exercise prices of full measure such that any option on the portfolio with an exercise price in this set is non-replicated. Furthermore, note that the results of Ross for two-date security markets with finitely many states holds for security markets with more than two dates, see [8, 9].


Introduction
In reality markets are incomplete in the sense that perfect replication of contingent claims using only the underlying asset and a riskless bond is impossible. In other words, that is perfect risk transfer is not possible since some payoffs cannot be replicated by trading in marketed securities. From the work of Ross in [21], it is evident that whenever the payoff of every call or put option can be replicated then the securities market is complete. In addition, an important implication of the aforementioned work of Ross, is the existence of options that cannot be replicated by the primitive securities when markets are incomplete. In [7], the authors came to the conclusion that Ross's result is, in fact, a negative result since it asserts that in an incomplete market one cannot expect to replicate the payoff of each option even if the underlying asset is traded. In the same paper, it is proved that if the number of securities is less than half the number of states of the world, then (generically) not a single option can be replicated by traded securities. In [10], the author extended the aforementioned result in [7], to accommodate cases where the condition on the number of primitive securities is not imposed. In particular, it is proved that if there exists no binary payoff vector in the asset span, then for each portfolio there exists a set of nontrivial exercise prices of full measure such that any option on the portfolio with an exercise price in this set is non-replicated. Furthermore, note that the results of Ross for two-date security markets with finitely many states holds for security markets with more than two dates, see [8,9].
It is well accepted that the lattice theoretic ideas are the most important technical contributions of the large literature on infinite-dimensional modern mathematical finance (for example lattice theoretic ideas in general equilibrium theory). However, ordered vector spaces that are not lattice ordered arise naturally in models of portfolio trading. Moreover, if available securities have smooth payoffs, then the portfolio space is never a vector lattice. It should be pointed out that since call and put options are vector lattice operations in the space of contingent claims, their replication by available securities requires a vector lattice structure in the portfolio space. There is a large literature on vector lattice theory related to mathematical economics; see for instance [1-7, 17-20, 22, 23]. computational terms, and then solve problems arising from mathematical economics such as portfolio insurance and option replication. A lot of work in this area has been done in [11, 12, 14? -16].
In this chapter, we focus to the option replication problem. We consider an incomplete market of primitive securities, meaning that some call and put options need not be marketed and our objective is to describe an efficient method for computing maximal submarkets that replicate any option. Even though, there are several important results on option replication they cannot provide a method for the determination of the replicated options. By using the theory of vector-lattices and positive bases it is provided a procedure in order to determine the set of securities with replicated options. In particular, it is shown that the union of all maximal replicated submarkets (i.e., submarkets Y, such that any option written on the elements of Y can be replicated and Y is as large as possible) defines a set of elements such that any option written on these elements is replicated.
In [11][12][13][14]16], it was shown that it is possible to construct computational methods in order to efficiently compute vector sublattices and lattice-subspaces of R m as well as in the general case of C [a, b]. In addition, these methods has been successfully applied in portfolio insurance and in completion of security markets.
Here we consider a two-period security market X with a finite number m of states and a finite number of primitive securities with payoffs in R m and we construct computational methods in order to determine maximal replicated submarkets of X by using the theory of vector sublattices and lattice-subspaces. Moreover, in the theory of security markets it is a usual practice to take call and put options with respect to the riskless bond 1 = (1, 1, ..., 1). Then, the completion F 1 (X) of X by options is the subspace of R m generated by all options written on the elements of X ∪ {1}. Since the payoff space is R m , which is a vector lattice, in the case where 1 ∈ X then F 1 (X) is exactly the vector sublattice generated by X. If, in addition, X is a vector sublattice of R m then F 1 (X) = X therefore any option is replicated, unfortunately this situation is extremely rare.
A recent article, [15], provided a computationally efficient method for computing maximal submarkets that replicate any option. In particular, by using computational methods and techniques from [11][12][13][14] in order to determine vector sublattices and their positive bases, it is presented a procedure in order to calculate the set of securities with replicated options. The aforementioned article emphasizes the most important interrelationship between the theory of vector lattices, positive bases, projection bases and the problem of option replication.
The material in this chapter is spread out in 5 sections. Section 2 is divided in two subsections; in the first the fundamental properties of lattice-subspaces and vector sublattices are presented, whereas in the second we introduce the basic results for vector sublattices, positive bases and projection bases of R k together with the solution to the problem of whether a finite collection of linearly independent, positive vectors of R k generates a lattice-subspace or a vector sublattice. In section 3, there are three subsections where it is discussed the theoretical background for option replication. Also, section 3 emphasis the most important interrelationship between positive bases, projection bases and the problem of option replication. Section 4 presents an algorithm for calculating maximal submarkets that replicate any option followed by the corresponding computational approach. Conclusions and research directions are provided in Section 5.
In this chapter, all the numerical tasks have been performed using the Matlab 7.8 (R2009a) environment on an Intel(R) Pentium(R) Dual CPU T2310 @ 1.46 GHz 1.47 GHz 32-bit system with 2 GB of RAM memory running on the Windows Vista Home Premium Operating System.

Basic results in the theory of positive bases and projection bases of R m
In this section, a brief introduction is provided to the theory of vector lattices of R m . Furthermore, we present some basic results related to the theory of positive bases and projection bases of R m .

Preliminaries and notation
Initially, we recall some definitions and notation from the vector lattice theory. Let R m = {x = ( The positive cone of R m is defined by R m + = {x ∈ R m |x(i) ≥ 0, for each i} and if we suppose that X is a vector subspace of R m then X ordered by the pointwise ordering is an ordered subspace of R m , with positive cone X + = X ∩ R m + . By {e 1 , e 2 , ..., e m } we shall denote the usual basis of R m . A point x ∈ R m is an upper bound, (resp. lower bound) of a subset S ⊆ R m if and only if y ≤ x (resp. x ≤ y), for all y ∈ S. For a two-point set S = {x, y}, we denote by x ∨ y (resp. x ∧ y) the supremum of S i.e., its least upper bound (resp. the infimum of S i.e., its greatest lower bound). Thus, x ∨ y (resp. x ∧ y) is the componentwise maximum (resp. minimum) of x and y defined by  An ordered subspace Z of R m is a vector sublattice or a Riesz subspace of R m if for any x, y ∈ Z the supremum and the infimum of the set {x, y} in R m belong to Z.
Assume that X is an ordered subspace of R m and B = {b 1 , b 2 , ..., b μ } is a basis for X. Then B is a positive basis of X if for each x ∈ X it holds: x is positive if and only if its coefficients in the basis B are positive. In other words, B is a positive basis of X if the positive cone X + of X has the form, Then, for any Recall that a nonzero element x 0 of X + is an extremal point of X + if, for any x ∈ X, 0 ≤ x ≤ x 0 implies x = λx 0 , for a real number λ. Since each element b i of the positive basis of X is an extremal point of X + , a positive basis of X is unique in the sense of positive multiples.
The existence of positive bases is not always ensured, but in the case where X is a vector sublattice of R m then X always has a positive basis. If B = {b 1 , b 2 , ..., b μ } is a positive basis for a vector sublattice X the lattice operations in X, namely x ∨ y for the supremum and x ∧ y for the infimum of the set {x, y} in X, are given by Suppose that L is a finite dimensional subspace of C(Ω) generated by a set {z 1 , z 2 , ..., z r } of linearly independent positive vectors of C(Ω). If Z is the sublattice of C(Ω) generated by L and {b 1 , ..., b μ } is a positive basis for Z (μ = dim(Z)) then, a projection basis {b 1 ,b 2 , ...,b r } of Z is a basis for L such that its elements are projections of the elements of the positive basis {b 1 , ..., b μ }. In our current work we consider that For an extensive presentation of vector sublattices as well as for notation not defined here we refer to [11-13, 15? , 16] and the references therein.

Theoretical background
In this section we present theoretical results for positive bases and projection bases in R m . Given a collection x 1 , x 2 , ..., x n of linearly independent, positive vectors of R m we define the function, and the function, for each i ∈ {1, 2, ..., m} with h(i) 1 = 0. We shall refer to β as the basic function of the vectors x 1 , x 2 , ..., x n . The set is the range of the basic function and the cardinal number, cardR(β), of R(β) is the number of different elements of R(β).
Suppose that Z denotes the sublattice of R m generated by X = [x 1 , x 2 , ..., x n ]. We shall denote by P 1 , P 2 , ..., P n , P n+1 , ..., P μ an enumeration of R(β) such that the first n vertices P 1 , P 2 , ..., P n are linearly independent and μ = dim(Z). Note that such an enumeration always exists. The notation, A T stands for the transpose of a matrix A. A procedure in order to construct the sublattice Z is given by the following theorem.
where A is the n × n matrix whose ith column is the vector P i , for each i = 1, 2, ..., n. It is clear that in such a case Z and X coincide.
is the vector sublattice generated by x 1 , x 2 , ..., x n and dim Z = μ.
where B is the μ × μ matrix with columns the vectors P 1 , P 2 , ..., P μ , defines a positive basis for Z.
The notion of the projection basis is important for our study. Furthermore, in the following, we are interested for a projection basis that corresponds to a positive basis. Let {z 1 , z 2 , ..., z r } be a set of linearly independent and positive vectors of R m then by using Theorem 1 we construct the sublattice Z of R m generated by these vectors. If dim(Z) = μ, by Theorem 1, a positive basis {b 1 , b 2 , ..., b μ } of Z can be determined. The basic result for calculating the projection basis that corresponds to the positive basis {b 1 , b 2 , ..., b μ } of Z is the following theorem.

Theorem 2.
Suppose that β is the basic function of the vectors {z 1 , z 2 , ..., z r } and P 1 , P 2 , ..., P r , P r+1 , ..., P μ is an enumeration of the range of β such that the first r vectors P 1 , P 2 , ..., P r are linearly independent and suppose also that z r+1 , ..., z μ are the new vectors constructed in Theorem 1. If L = [z 1 , z 2 , ..., z r ] is the subspace of R m generated by the vectors z 1 , z 2 , ..., z r then, .., b r } is a basis for L which is given by the formula where A is the r × r matrix whose ith column is the vector P i , for i = 1, 2, ..., r. This basis, Suppose that Z is the sublattice generated by a collection z 1 , z 2 , ..., z r of linearly independent, positive vectors of R m and {d 1 , d 2 , ..., d μ } is a positive basis for Z.
where A is the r × r matrix whose ith column is the vector P i , for i = 1, 2, ..., r then We calculate the partitions of {1, 2, 3} which are the following: Then δ 1 is not a proper partition since w 1 = ∑ i∈σ 1 b i = b 1 and b 1 is not a binary vector. Similarly, δ 2 is not a proper partition. On the other hand δ 3 is a proper partition since 1, 0, 1, 1) which is a binary vector and w 1 + w 2 = (1, 1, 1, 1, 1). Notice that δ 3 is strictly finer than δ 4 , hence δ 3 is a maximal proper partition of {1, 2, 3}.

Option replication
In this section we shall discuss the economic model of our study. Moreover, first we discuss an inductive method for calculating the completion of security markets. So, if 1 ∈ X then it is possible to determine a basic set of marketed securities i.e., a set of linearly independent and positive vectors of X and the sublattice of R m generated by a basic set of marketed securities is F 1 (X). Finally, F 1 (X) has a positive basis which is a partition of the unit. Under these observations we present an algorithmic procedure in order to determine maximal submarkets that replicate any option.

The economic model
In our economy there are two time periods, t = 0, 1, where t = 0 denotes the present and t = 1 denotes the future. We consider that at t = 1 we have a finite number of states indexed by s = 1, 2, ..., m, while at t = 0 the state is known to be s = 0.
Suppose that, agents trade x 1 , x 2 , ..., x n non-redundant securities in period t = 0, then the future payoffs of x 1 , x 2 , ..., x n are collected in a matrix which is called put-call parity.
If both c(x, α) > 0 and p(x, α) > 0, we say that the call option c(x, α) and the put option p(x, α) are non trivial and the exercise price α is a non trivial exercise price of x. If c(x, α) and p(x, α) belong to X then we say that c(x, α) and p(x, α) are replicated. If we suppose that 1 ∈ X and at least one of c(x, a), p(x, a) is replicated, then both of them are replicated since,

Completion of security markets
We shall discuss the problem of completion by options of a two-period security market in which the space of marketed securities is a subspace of R m . The present study involves vector sublattices generated by a subset B of R m of positive, linearly independent vectors. A computational solution to this problem is provided by using the SUBlat Matlab function from [16].
Let us assume that in the beginning of a time period there are n securities traded in a market. Let S = {1, ..., m} denote a finite set of states and x j ∈ R m + be the payoff vector of security j in m states. The payoffs x 1 , x 2 , ..., x n are assumed linearly independent so that there are no redundant securities. If θ = (θ 1 , θ 2 , ..., θ n ) ∈ R n is a non-zero portfolio then its payoff is the vector The set of payoffs of all portfolios is referred as the space of marketed securities and it is the linear span of the payoffs vectors x 1 , x 2 , ..., x n in R m which we shall denote it by X, i.e., For any x, u ∈ R m and any real number a the vector c u (x, a) = (x − au) + is the call option and p u (x, a) = (au − x) + is the put option of x with respect to the strike vector u and exercise price a.
Let U be a fixed subspace of R m which is called strike subspace and the elements of U are the strike vectors. Then, the completion by options of the subspace X with respect to U is the space F U (X) which is defined inductively as follows: denotes the set of call options written on the elements of X, denotes the set of call options written on the elements of X n−1 , The completion by options F U (X) of X with respect to U is the vector sublattice of R m generated by the subspace Y = X ∪ U. The details are presented in the next theorem, Theorem 3. In the above notation, we have

generated by Y, and
(iii) if U ⊆ X, then F U (X) is the sublattice of R m generated by X.
Any set {y 1 , y 2 , . . . , y r } of linearly independent positive vectors of R m such that F U (X) is the sublattice of R m generated by {y 1 , y 2 , . . . , y r } is a basic set of the market.

. , y r } of linearly independent vectors of A is a basic set of the market, where
The space of marketed securities X is complete by options with respect to U if X = F U (X). and that the strike subspace is the vector subspace U generated by the vector u = (1, 2, 2, 1, 1, 2, 1, 3, −1, −1, −1, −2).
Then, a maximal subset of linearly independent vectors of {x where X denotes a matrix whose rows are the vectors x 1 , x 2 , x 3 , u. We can determine the completion by options of X i.e., the space F U (X), with the SUBlat function from [16] by using the following code:

Computation of maximal submarkets that replicate any option
We consider a two-period security market X with a finite number m of states and a finite number of primitive securities with payoffs in R m and we construct computational methods in order to determine maximal submarkets of X that replicate any option by using the results provided in subsection 2.2. In particular, in the theory of security markets it is a usual practice to take call and put options with respect to the riskless bond 1 = (1, 1, ..., 1). Then, the completion F 1 (X) of X by options (see subsection 3.2) is the subspace of R m generated by all options written on the elements of X ∪ {1}. Since the payoff space is R m , which is a vector lattice, in the case where 1 ∈ X then F 1 (X) is exactly the vector sublattice generated by X. If, in addition, X is a vector sublattice of R m then F 1 (X) = X therefore any option is replicated.
A basic set of marketed securities (i.e., a set of linearly independent and positive vectors) of X always exist and the sublattice of R m generated by a basic set of marketed securities is F 1 (X). In addition, F 1 (X) has a positive basis which is a partition of the unit.
Let us assume that X is generated by a basic set of marketed securities, then from Theorem 1 it is possible to determine a positive basis {b 1 , b 2 The sublattice Z, generated by a basic set of marketed securities, is exactly F 1 (X) and F 1 (X) has a positive basis which is a partition of the unit, i.e., ∑ μ i=1 b i = 1. This is possible since the notion of a positive basis is unique in the sense of positive multiples therefore we are able to extract from the positive basis {b 1 , b 2 , ..., b μ } another positive basis {d 1 , d 2 , ..., d μ } of F 1 (X) which is a partition of the unit. Therefore, let us denote by {d 1 , d 2 , ..., d μ } a positive basis of F 1 (X) which is a partition of the unit. Then, by Theorem 2, if where A is the r × r matrix whose ith column is the vector P i , for i = 1, 2, ..., r then { d 1 , d 2 , ..., d r } is a projection basis of F 1 (X). The projection basis { d 1 , d 2 , ..., d r } is the projection basis of X corresponding to the basis {d 1 , d 2 , ..., d μ }. For Z = F 1 (X) proposition 1 takes the following form.

Proposition 2.
Suppose that {d i } is the basis of F 1 (X) given by equation (2)  Suppose that Y is a subspace of X, then if F 1 (Y) ⊆ X we say that Y is replicated. If, in addition, for any subspace Z of X with Y Z we have that X F 1 (Z) then Y is a maximal replicated subspace or a maximal replicated submarket of X. Note that, the replicated kernel of the market, i.e., the union of all maximal replicated subspaces of the market is the set of all elements x of X so that any option written on x is replicated.
The following theorem provides the development of a method in order to determine the set of securities with replicated options by using the theory of positive bases and projection bases. The set of maximal replicated submarkets of X is nonempty.

The computational method
We present the proposed computational method that enables us to determine maximal submarkets that replicate any option. Our numerical method is based on the introduction of the mrsubspace function, from [15], that allow us to perform fast testing for a variety of dimensions and subspaces.

Algorithm for calculating maximal submarkets that replicate any option
Recall that X is the security market generated by a collection {x 1 , x 2 , ..., x n } of linearly independent vectors (not necessarily positive) of R m . If 1 ∈ X then it is possible to determine a basic set of marketed securities i.e., a set of linearly independent and positive vectors of X. This is possible through the following easy proposition: The main steps of the underlying algorithmic procedure that enables us to determine maximal submarkets that replicate any option are the following: (1) Use proposition 3 in order to determine a basic set {y 1 , y 2 , ..., y n } of marketed securities.
(2) Use Equation (1) in order to determine the basic curve β of the vectors y i .
(4) Use Theorem 1 in order to construct the vector sublattice generated by y 1 , y 2 , ..., y n , which is exactly the completion by options F 1 (X) of X. Then, determine a positive basis {d 1 , d 2 , ..., d μ } for F 1 (X).   In [15], it is presented the translation followed by the implementation of the aforementioned algorithm in R m within a Matlab-based function named mrsubspace. Moreover, in the same paper, computational experiments assessing the effectiveness of this function and lead us to the conclusion that the mrsubspace function provides an important tool in order to investigate replicated subspaces.

The computational approach -Code features
We shall discuss the proposed computational method that enables us to determine maximal submarkets that replicate any option. The standard method used currently to determine the maximal replicated submarkets is based on a manual processing. From section 3, it is evident that the required number of verifications for this process can be of significant size even in a relatively low-dimensional space, thus rendering the problem too difficult to solve. Our numerical method is based on the introduction of the mrsubspace function, from [15] that allow us to perform fast testing for a variety of dimensions and subspaces.
The structure of the code ensures flexibility, meaning that it is convenient for applications as well as for research and educational purposes. The given security market X, generated by the linearly independent vectors x 1 , x 2 , ..., x n , must be given under a matrix notation with columns the vectors x 1 , x 2 , ..., x n . The mrsubspace function must be stored in a Matlab-accessible directory and then the input data, i.e., the matrix X, can be typed directly in the Matlab's environment. Under the following command, mrsubspace(X); the program solves the problem of option replication and prints out the maximal proper partitions as well as the corresponding maximal replicated subspaces. If X is a vector sublattice, then X = F 1 (X) and any option is replicated. In the case where the initial space X is not a vector sublattice, it is possible to produce the normalized positive basis and the corresponding projection basis with the following code, [Npb,Cprb] = mrsubspace(X) Inside the code there are several explanations that indicate the implemented part of the algorithm. A user proficient in Matlab can easily use the code and modify it if needed. Especially, the user can isolate a part of the code according to his/her special needs to solve different problems like • Determine a basic set of marketed securities.
• Find the completion F 1 (X) of X by options in R m or find the vector sublattice generated by a finite collection of linearly independent vectors of R m .
• Calculate a positive basis and a projection basis for a finite dimensional vector sublattice.
In the last part of the code, entitled Maximal proper partitions -Maximal replicated subspaces, the user can change the way that the mrsubspace function understands the values 0 and 1, according to his/her knowledge and needs.
Example 3. Consider the following 5 vectors x 1 , x 2 , ..., x 5 in R 10 , Note that 1 = x 5 − x 4 + x 1 . In order to determine the maximal replicated subspaces for the above collection of vectors we use the following simple code:

Conclusions
In this chapter, computational methods for option replication are presented based on vector lattice theory. It is well accepted that the lattice theoretic ideas are one of the most important technical contributions of the large literature on modern mathematical finance. In this chapter, we consider an incomplete market of primitive securities, meaning that some call and put options need not be marketed. Our objective is to describe an efficient method for computing maximal submarkets that replicate any option. Even though, there are several important results on option replication they cannot provide a method for the determination of the replicated options. By using the theory of vector-lattices and positive bases it is provided a procedure in order to determine the set of securities with replicated options. Moreover, we determine those subspaces of the marketed subspace that replicate any option by introducing a Matlab function, namely mrsubspace. The results of this work can give us an important tool in order to study the interesting problem of option replication of a two-period security market in which the space of marketed securities is a subspace of R m . This work is based on a recent work, [15], regarding computational methods for option replication.

Author details
Vasilios N. Katsikis General Department of Mathematics, Technological Education Institute of Piraeus, 12244 Athens, Greece