SYSTEM, METHOD, AND COMPUTER PROGRAM PRODUCT FOR USE OF LATTICES IN VALUING OPTIONS

Abstract: A system, method, and computer program product of pricing options which involve more than one underlying asset. The method employs a lattice approach by extending current trinomial techniques to higher dimensions, while achieving a maximum economy of nodes. Such economy produces computational advantages in terms of faster execution speed and the utilization of less memory resources. The method valuates options under a general form (i.e., Brownian motion) where parameters may depend on time and price, and accounts for drift and volatility parameters.

Description: SYSTEM, METHOD, AND COMPUTER PROGRAM PRODUCT FOR USE OF LATTICES IN VALUING OPTIONS Background of the Invention Field of the Invention The present invention relates generally to the valuation of financial instruments and more particularly to numerical methods for valuing stock options. Related Art Within the financial arts, an "option" is widely known as a contract that represents the right to buy or sell a specified amount of an underlying security at a specified price within a specified time. Once the contract is executed, the purchaser acquires a right, and the seller assumes an obligation. The underlying security (i.e., the subject of the option contract) can be, for example, stocks, bonds, futures, interests in real estate, commodities, etc. It is also not uncommon for the option to be underlain with more than one security (e.g. , an option on a "basket" of different stocks). An option is termed a "call" option if the contract gives the purchaser a right to buy the security at the specified price within the specified time. Alternatively, an option is termed a "put" option if the contract gives the purchaser a right to sell the security at the specified price within the specified time. The option contract's specified price is termed the "strike price, " while the option contract's specified time is termed the "maturity date. " In the case of a call stock option, the purchaser is guaranteed, at maturity, the ability to purchase the specified stock at the strike price. Thus, if the stock's market price at maturity were to be higher than the strike price, the seller (i.e. , the party who sold the stock option) would have to pay the difference. If the seller notices, at maturity, that the stock price in the open market is lower than the strike, the option will simply be allowed to expire unexercised. Alternatively, a put stock option guarantees the option holder the ability, at maturity, to sell the stock at the strike price, thus insuring against a future fall in the stock's price. Within the world financial markets, it is important to mention one more distinction among options— there are American options and European options . An American option allows the holder to exercise the contract's rights anytime before the maturity date, whereas a European option can only be exercised at the maturity date. American-type options are those most popularly traded. Given the above discussion, one can see how an option may serve as a form of insurance. The seller of the option (also referred to as the writer of the option) plays the role of the insurer and will ask for a premium to cover its liability. Thus, a problem arises as to exactly how to price an option. The option pricing problem is that of determining a rational price for the option. That is, determining the premium that a rational buyer (i.e. , not one hoping to deceive the insurance company) and a rational seller (i.e. , not one ready to take inconsiderate amount of risk) are prepared to agree upon. The comparison of options pricing with insurance policy pricing suggests that the main concerns are estimating the probability of the stock's market price, at maturity, ending up higher or lower than the strike price, and by how much. The problem is further compounded by the fact that there may exist no consensus over such a probability among the parties, and that risk averse investors may value the option much more that those who are not risk averse. A breakthrough in the problem of options pricing came from the development of a mathematical formula that showed how the rational price of an option could be made independent from any subjective elements— the estimated probability of the stock settling higher or lower, and the utility functions of the investors (i.e. , their attitudes towards risk). That mathematical formula, as is now well-known in the relevant art(s), is the Black-Scholes equation. The Black-Scholes equation and model was first introduced in F. Black and M. Scholes, The Pricing of Options and Corporate Liabilities , Journal of Political Economy, 81 (May-June 1973), 637-59. The Black-Scholes formula for determining the price of a call option, C, using the five parameters essential to the pricing of an option: (1) the strike price K; (2) the time to expiration t, (3) the underlying commodity price S; (4) the volatility of the commodity σ ("sigma"); and (5) the prevailing risk-free interest rate r (the risk-free rate is the rate the safest bank deposit would earn or typically the rate of a U.S. government T-bill), is shown in EQUATION (1): (1) C = S* N(d\) - Ke ~ (rt) * N(d 2 ) As will be apparent to one skilled in the relevant art(s), e is the exponential function— the inverse of the natural logarithm ln-that is equal to, up to four significant decimal places, 2.7183. The variables d and d 2 within EQUATION (1) are expressed as shown in EQUATIONS (2 A) and (2B), respectively: The function "N( )" is the cumulative standard normal distribution function, which is well known in the relevant art(s). Having presented the Black-Scholes formula for a call option, EQUATION (3) describes the expression for the price P of a put option: (3) P = C- S + Ke ~ ( rt Inherent in the Black-Scholes formulation is the assumption that the writer of the option (e.g., the call seller) will hedge his liability by buying a certain amount of the stock(s) underlying the option prior to any price rally. This assures the writer will be able to simply hand over the stock(s) to the buyer at the maturity of the contract. The difficulty of course is that the option seller cannot foretell the movement of the stock during the life of the option contract. The seller will naturally like to avoid holding stock(s) that no other party— least of all the option buyer- would desire to purchase should the share prices plummet at maturity. Thus, the writer must constantly monitor the evolution of the shares, gradually getting rid of the initial hedge if prices are seen to go down, or gradually building up the hedge if prices are seen to go up. This scheme is often termed a "replication strategy" or "dynamic hedge program. " Therefore, the option seller should account for the replication strategy when setting the price of the option (i.e. , ask for an amount of money that the strategy is expected to cost). As suggested above, of the many factors that impact the price of a stock option, the most relevant is the degree of agitation of the share along its trajectory, which is called its "volatility," σ. Trajectory, as used herein, refers to a plot of a stock's market price over time. That is, the degree to which the stocks price goes up or down over the course of its trading is most relevant rather than the actual up or down direction of the trajectory, or equivalently, the prior chances that a trajectory has to go up or down. In other words, the actual direction has no impact on the option price. Mathematically this is expressed as follows: Let S be the stock price and dS its variation over an infinitesimal period of time. The infinitesimal percentage return of the stock will then be dS/S. One cannot tell with certainty how the return of the stock is going to behave over time. One can only tell where one expects the return to be over the next infinitesimal period of time, it being understood that a certain noise, or indeterministic factor, is bound to spoil one's expectation. In other words, the temporal evolution of the return will include two parts: a deterministic part, called the "drift" that represents one's expectation about the future infinitesimal movement, and an indeterministic part that represents the amount of error that one will be found to have committed in reality. The return can then be expressed using EQUATION (4): dS (4) — = μdt + σdZ ώ where μdt is the expected return over the infinitesimal period of time, and σdz is the infinitesimal error. Return can be thought of as a moving object (e.g. , a rocket), whose instantaneous projected speed is μ, and whose fluctuation around its projected trajectory is accounted for by σdz. The main issue in theoretically modeling such a trajectory will be one of modeling the error term. As is usually the case when the sources of error and uncertainty are many, and they are many in the case of stocks and financial markets in general, the assumption one makes is that those errors are normally distributed. In other words, the assumption behind the Black-Scholes model is that return will be distributed, over the next infinitesimal period of time, according to a "bell curve, " with mean μdt and standard deviation σ shown in FIG. 1. The evolution of the return of the stock, when modeled in this fashion is termed Brownian motion (i.e. , a phenomenon of constant erratic motion which may be mathematically modeled) by those skilled in the relevant art(s). The greater the volatility parameter, σ, the greater the dispersion of the return around its expected value, the greater the jaggedness of the corresponding overall trajectory, and thus, the greater the difficulty to track the share price. Also, the instantaneous expected return (or drift) parameter, μ, governs the overall trend of the trajectory. Thus, the greater the drift, the higher prices should be expected to go. Conversely, the smaller the drift (it could of course turn negative), the lower prices should be expected to go. When investors expect a share to perform well, (i.e., when they assign a greater probability to its trajectory going up rather than down), it is the drift parameter, μ , that they are predicting. The Black-Scholes formulation has shown is that μ is irrelevant to the option pricing problem. Only the volatility, σ, which measures the more or less orderly way in which the share will follow the investors' expectations, will affect the option price. The mathematical reasoning for this is given below. Because the state variables are the stock price S and time t, one would expect the option price C to be function of S and t as shown above in EQUATION (1). This relationship is given more simply by the expression C(S, t). When a function has a stochastic variable following the above Brownian motion as one of its state variables, Ito's rule for stochastic differentiation states that the differential of C is given by EQUATION (5): ,„ ,dC δC 1 2 o2 δ 2 C P 5C ,„ dC = ( + μS + -σ S — )dt + σS dZ (5) dt dS 2 dS 2 dS The Black-Scholes hedge assumption then amounts to noting that if a certain amount, Δ, of the share were held with the option as a hedge against adverse movements of the share, the resulting portfolio: π = C + ΔS will admit of the following differential of EQUATION (6): (6) dϊl = dC + ΔdS Hence, EQUATION (7), owing to the expression of dS given by the Brownian motion: dπ = (— + μS — + -σ 2 S 2 ^ + ASμ)dt + (σS — + AσS)dZ (7) dt dS 2 dS dS The Black-Scholes formulation then notes that if Δ were chosen equal to , the dS indeterministic component of dπ. would vanish, and EQUATION (7) would simply be expressed as EQUATION (8) (the term involving μ, has also dropped off): _ ,dC 1 2 . 2 a 2 c, . dπ = ( + -σ S — -)dt (8) dt 2 OS 2 No indeterministic noise would consequently threaten the growth of portfolio EL In other words, π would become a riskless portfolio. A simple arbitrage argument then establishes that E_ would then have to grow at the riskless rate of interest r (the interest rate that the safest bank deposit would earn). Otherwise, supposing that II grows at a rate greater than r one could borrow money at the rate r, invest it in the riskless portfolio IT, and earn the riskless difference. Else, if II grows at a rate smaller than r, one could short sell the portfolio π, deposit the proceeds in the bank account earning r, and also make a riskless profit. Consequently the following must be true: dπ - rHdt hence EQUATION (9): ^ = rC + n\S = rC - r — S (9) dt 2 5S 2 dS Finally, C(S, t) must verify the following differential EQUATION (10): dC dC _ 1 2 c2 d 2 C __ + r S + -σ S — - = rC (10) dt dS 2 dS 2 The Black and Scholes option pricing formula is an analytical solution of the partial differential EQUATION (10). S and t are the state variables (i.e. , it is with respect to them that the partial differentiation is taken), and σ and r are the sole parameters. No trace is left of the expected return μ and its underlying probability or utility estimations. The option pricing problem, however, admits of a probabilistic interpretation. Because the Black and Scholes argument has established that the option price does not depend on the investors' subjective preferences, estimations of probability, and/or attitudes towards risk, the option price will, in particular, be the price that would have obtained had such preferences and attitudes to risk never existed in the first place. In other words, if all the investors were neutral to risk (a hypothetical world which is labeled the "risk-neutral world" in the relevant art(s)), the option price would nevertheless be the same. The only difference between such a risk neutral world and the actual world, would be that investors would not expect the shares to grow at a rate higher than their risk-free rate investments (e.g. , a safe bank deposit). Because these investors are indifferent to risk, they would not ask for a premium for holding a risky share. Hence the evolution of the return of the shares in the risk-neutral world will be simply given by the following stochastic process of EQUATION (11): dS . .„ — = rdt + σdZ (11) S In view of such a process, one would only need to estimate the value of <7 to be able to draw realizations of the Brownian paths such as the ones drawn above, for the interest rate r is known. Every such realization will produce a different "hit" S r (i.e. , a different final stock price) at the maturity of the option. Remembering that the call option pays at maturity the difference between S - and the strike price, K if S r is greater than K, else zero, and noting that (S ; - K) + the payoff (i.e. , (S - K) + - max(S / - K ,0) ), one may compute the expected value of the option payoff using EQUATION (12): E(payoff) = ∑ prob palh (S, - K) + (12) all paths where the summation is taken over all the paths that the Brownian motion of EQUATION (11) can generate. Stochastic calculus establishes that the solution of the partial differential EQUATION (10) above (i.e., the price of the option), can be represented as the discounted expected value of the option payoff under the Brownian motion of EQUATION (13): C = e- r ∑prob pa , h (S 7 - K) + (13) af/ paths Thus, there are two different methods of computing the price of an option, either solve the partial differential EQUATION (10), or compute expected values under all possible paths using EQUATION (13). Difficulties, however, prevent the option pricing problem from being as simple as it first seems. The Black-Scholes analytical solution is valid only when the interest rate r and the volatility parameter σ are constant. One may be interested in pricing options under a more general Brownian motion such as EQUATION (14): — = r(S,t)dt + σ(S,t)dZ (14) S where the parameters now themselves depend on time and the stock price. A great deal of the literature in the relevant art(s) that followed Black and Scholes' 1973 paper has studied the option pricing problem under these more general assumptions. No analytical solutions, however, are generally available when the stochastic process is given by EQUATION (14), so one has to resort to a numerical resolution of the partial differential EQUATION (10). Alternatively, one can attempt to compute expected values. The only difficulty in that case is that the number of paths generated by a Brownian motion is infinite. Thus, one cannot practically take summations over all paths. One may choose to select a finite number of representative paths to perform the summation— a process known as "discretization" of the stochastic process. Thus, two different schools of option researchers exist. Those who would rather numerically solve the partial differential EQUATION (10), and those who would rather seek a discretization of the driving stochastic process— known as the "tree" or "lattice" approach. The tree or lattice approach, however, is better suited to the option pricing problem because it can accommodate not only European options easily (like the Black-Scholes model), but can easily handle American options as well. Therefore, what is needed is a system, method, and computer program product that solves the option pricing problem while accounting for drift and volatility parameters of the most general form (i.e. , EQUATION (14)). The system, method, and computer program product should use the lattice approach and handle the case where the number of dimensions is greater than one (i.e., when there is more than one stochastic process underlying the option). The system, method, and computer program product should also seek the most economical and efficient lattice discretization and thus, achieve the maximum economy in terms of computing time and resources. Summary of the Invention The present invention is a system, method, and computer program product for use of lattices in valuing options. More specifically, the method prices the current value of an option consisting of a plurality of underlying assets (i . e . , a basket option) . The method includes the steps of receiving inputs indicative of the spot value of the underlying assets and the diffusion parameters. The diffusion parameters include the correlation, p, of each asset to each other asset within the basket, and the volatility, σ, of each of the plurality of assets. Then, inputs indicative of the risk free interest rate, r; the drift function, μ(X, t), and the probability parameter, p are received. The method further includes receiving inputs indicative of the desired time slices and the maturity date of the option. Then a lattice is constructed using the constant parameters, wherein the lattice is comprised of an elementary lattice cell structure for each of the time slices. Once the lattice is constructed, it is traversed, in a backwards fashion, in order to calculate the value of the option from said date of maturity to the present. One advantage of the present invention is that it can calculate the price of any contingent claim that is underlain by two or three driving Brownian motions (i.e., the pricing of spread and basket options), the pricing of options and convertible bonds under stochastic interest rates, the pricing of interest rate derivatives when two or three stochastic factors govern the evolution of the yield curve, etc. Another advantage of the present invention is that it can be used as a tool in managing a portfolio of multi-factor options, and assessing (at all times and in all market conditions) the value of the options. The present invention can also assists in the hedging and re-hedging (at all times) of a portfolio. That is, buying and selling orders of the underlying shares or other liquid market instruments can be generated in order to achieve neutrality with respect to adverse market movements. Another advantage of the present invention is that it can assists in the assessment of risks of options held in a portfolio by providing an evaluation of hypothetical losses (or gains) that the portfolio incurs on sudden (or gradual) market and volatility shifts. Yet another advantage of the present invention is that, more generally, it serves any purpose that would require the discretization of two or three-dimensional Brownian motions with general drift and volatility parameters (e.g. , physicists interested in the random motion of a particle in 3D space can utilize the lattices of the present invention as an efficient illustration of that motion, etc.). Further features and advantages of the invention as well as the structure and operation of various embodiments of the present invention are described in detail below with reference to the accompanying drawings. Brief Description of the Figures The features and advantages of the present invention will become more apparent from the detailed description set forth below when taken in conjunction with the drawings in which like reference numbers indicate identical or functionally similar elements. Additionally, the left-most digit of a reference number identifies the drawing in which the reference number first appears. FIG. 1 is a diagram illustrating a standard bell curve; FIG. 2 is a diagram illustrating a Cox tree showing the constant size paths representing up and down movements of a stock price; FIG. 3 is a binomial lattice showing the constant size paths representing up and down movements of a stock price; FIG. 4 is a binomial lattice showing the evolution of the stock price over a single time interval; FIG. 5 is a binomial lattice showing the corresponding binomial fork of a stock price is the discounted expected value of its two terminal values; FIG. 6 is a tree illustrating the call price of a stock option payoff at maturity; FIG. 7 is a trinomial tree illustrating variable drift and volatility parameters; FIG. 8 is a trinomial Hull and White lattice illustrating the permutations for a basket option containing two assets; FIG. 9 is a flowchart representing the lattice creation process according to an embodiment of the present invention; FIG. 10 is a flowchart representing the lattice traversal process according to an embodiment of the present invention; FIG. 11 is a diagram of an integer hexagon produced according to an embodiment of the present invention; FIG. 12 is a diagram of an physical hexagon produced according to an embodiment of the present invention; FIG. 13 is a diagram of a rhombic dodecahedral lattice produced according to an embodiment of the present invention; FIG. 14 is a block diagram of an example computer system useful for implementing the present invention; FIG. 15 is a rhombic dodecahedron produced according to an embodiment of the present invention; and FIG. 16 is a the nucleus of the rhombic dodecahedron (Lord Kelvin's solid) produced according to an embodiment of the present invention. Detailed Description of the Preferred Embodiments TABLE OF CONTENTS I. Overview II. The Lattice Approach A. The Binomial Lattice B. The Trinomial Lattice III. The Model: Pi's Extension of the Lattice Approach IV. Example of System Operation - Lattice Creation V. Example of System Operation - Lattice Traversal VI. Details of Lattice Geometry - Two Dimensional Case A. Inputs B. Determination of the Geometry of the Elementary Cell C. Building of the Lattice D. Traversing the Lattice VII. Details of Lattice Geometry - Three Dimensional Case A. Inputs B. Determination of the Geometry of the Elementary Cell C. Building of the Lattice D. Traversing the Lattice VIII. Computational Efficiency of the Present Invention IX. Example Implementations X. Conclusion /. Overview The present invention is directed to a system, method, and computer program product for use of lattices in valuing options. For example, the method allows the pricing of options where more than one asset is involved (i.e. , a basket option). In an embodiment, the present invention is provided as a tool to users (either individuals or members of a trading firm) interested in valuing such options. In an alternate embodiment of the present invention, a trading organization may provide a brokerage desk that facilitates option trades for clients as well as providing an interactive World- Wide Web site accessible via the global Internet for pricing model and trade execution services. Such an infrastructure may be an organized exchange for options. The present invention is described in terms of the above example. This is for convenience only and is not intended to limit the application of the present invention. In fact, after reading the following description, it will be apparent to one skilled in the relevant art(s) how to implement the following invention in alternative embodiments (e.g. , valuing other financial instruments or, more generally, illustrating any Brownian motion). //. The Tree and Lattice Approach A. The Binomial Lattice The first, simplest lattice was devised by Cox, Ross and Rubinstein as described in J.C. Cox et al. , Option Pricing: A Simplified Approach, Journal of Financial Economics, 7, (October 1979), 229-63. It assumes that the drift parameter, μ, and volatility parameter, σ, are constant, and therefore only improves the Black-Scholes formulation with respect to the pricing of American options. The Cox tree further assumes that the stock is allowed to move infinite intervals of time, and selects among all possible paths only those that can be represented as an arbitrary concatenation of up and down movements of constant size as shown in FIG. 2. If the life span of the option is sliced into n equal time intervals, there will be a total of 2" such possible "discrete" paths. Supposing that the probability of an elementary up movement is/? and that of an elementary down movement is (1- p), the probability of any one path is given by EQUATION (15): (15) π(path) = π P k (\ - p)"- k where k is the number of up jumps taking place over the whole path. This suggests that the option price, computed as the discounted expected value of its payoff, will have to be a sum of 2" terms as shown in EQUATION (16): (16) c = e-" ∑πp k (i - P y- k (s l - κy This calculation, however, turns out to be much simpler. If one were to draw the grid underlying all possible paths, one would obtain a lattice, called a 'binomial lattice" as shown in FIG. 3. Owing to the regularity and symmetry of the lattice, the final possible values of the stock will be known beforehand, and so would the possible option payoffs. Computing the option price will then proceed recursively in the following fashion. Calling u and d, respectively, the sizes of the elementary up and down movements, the evolution of the stock price over a single time interval can be pictured as shown in FIG. 4. Requiring that the binomial lattice be an approximation of the Brownian motion with drift parameter μ and volatility parameter σcan be shown to impose EQUATIONS (17) and (18): (17) p + (1 - p) d = e rι " (18) pu 2 + (\ - p)d 2 = σ 2 dt + e 2r ' where dt is the size of the finite time interval. EQUATIONS (17) and (18) are called, respectively, the first moment and second moment equations. Assuming that d = 1 I u, this yields the approximate solution to EQUATIONS (17) and (18): u = e σ Jl d = e ~σJ ' e rΛ - d P - d Because the option price C in the corresponding binomial fork is the discounted expected value of its two terminal values as shown in FIG. 5, this yields EQUATION (19): (19) C = e- « " [pC u + (\ - p)C tl ] In order to compute the call price in the full-blown lattice, one has to express the option payoff at maturity as shown in FIG. 6 and then roll back towards the origin of the lattice, computing the option value at each node as the discounted expected value of the corresponding binomial fork. As the total number of nodes of a binomial lattice is: (n + l)(n + 2) 2 and the value at each node is only the sum of two terms, the summation is far less than the dreaded summation of 2" terms as in EQUATION (16). Despite its simplicity, the binomial lattice has drawbacks. The expressions of u, d, and p above are only approximate. The exact values are functions of both the drift and the volatility. So one could not accurately discretize a Brownian motion with varying drift and volatility coefficients without altering the values u, and/? throughout the lattice. This would alter its simple structure. B. The Trinomial Lattice One alternative, when the drift and volatility parameters are required to be variable, is the trinomial lattice. The trinomial lattice, as its name suggest, has three branches emanating from each node. Calling u, d, and m, respectively, the sizes of the elementary up, down, and middle movements, the evolution of the stock price over a single time interval can be shown in FIG. 7 (compare to FlG. 4). Thus, the transition probabilities are now /?,,, p d , and /? m , where p m = 1 - This provides an extra degree of freedom which allows u and d to remain constant throughout the lattice, while the probabilities solve the first and second moment equations and account for the varying character of the drift and volatility parameters: = e σ J ' d = - X u dt \2σ l c- ~ )+- (See Hull, John, Options, Futures, and Other Derivative Securities, Third Edition, Prentice Hall (Englewood Cliffs, N.J), 1997, ISBN 0138874980, p. 360. In Hull and White, Branching Out, RISK, July 1994, the use of trinomial lattices was first promoted. Moreover, they were the first to solve the problem of negative probabilities (p d can turn negative if μ is sufficiently large) by the alternative branching technique which the present invention addresses. Also, when more than one stochastic variable is underlying the option, Hull and White simply suggested to take the tensor product lattice, which is not the most efficient. For example, consider an option on a basket of two stocks S and W. Hull and White recommends that for each node of the lattice, nine nodes be generated to represent the permutations of each stock going up, down, or remaining the same (i.e. , middle). Thus, the Hull and White lattice, in this instance, requires nine probabilities to be calculated at each node. This is illustrated in FIG. 8. ///. The Model: Present Invention's Extension of the Lattice Approach The present invention extends Hull and White's trinomial technique to obtain the most economical and efficient lattice discretization for higher dimensional Brownian motions of the most general form (i.e. , EQUATION (14)). Consider TABLE 1, below, which highlights the present invention's efficient computation: TABLE 1 Thus, the present invention will produce a hexagonal structure (six nodes plus the middle for a total of seven nodes) in computing the option price of a basket containing two assets. Accordingly, the present invention will produce a rhomba-dodecahedron (fourteen nodes plus the middle for a total of fifteen nodes) in computing the option price of a basket containing three assets. The present invention aims to use a simpler tree than 3" and assures the probabilities are positive regardless of the drift, μ. IV. Example of System Operation - Lattice Creation Referring to FIG. 9, a flowchart representing the lattice creation process 900 of the present invention is shown. More specifically, lattice creation process 900 illustrates the case where the present invention is used to price an option on a basket containing multiple assets (e.g. stocks S t and S 2 -the two asset row of TABLE 1). Lattice creation process 900 begins at step 902 with control passing immediately to step 904. In step 904, lattice creation process 900 receives inputs representing the spot value of the assets S, and S 2 . In step 906, the maturity date, T, of the basket option is entered. In an embodiment of the present invention, the maturity date is specified in terms (or a fraction) of a year (i.e. , for a six month maturity date, T = 0.5). In step 908, the prevailing risk-free interest rate, r, is entered. In step 910, the respective volatility of the underlying assets are entered (e.g. , σ x and σ 2 for Sj and S 2 , respectively). Also, the correlation, p, between each two pairs of assets are entered. These three inputs are collectively known as the "diffusion parameters. " In step 912, the number of time slices, N, the life span of the option is sliced into equal time intervals is entered. As will be apparent to one skilled in the relevant art(s), the greater the value of N, the more accurate the discretization (i.e., greater the accuracy of the present invention), but with the associated increase in computation time and resources. Moreover, as N approaches infinity, the accuracy of the output price of the present invention approaches the accuracy of the Black-Scholes model. In step 914, the value of elementary time step, Δt is calculated, which is TIN. In steps 916, the drift function, μ(X, t), is entered, and in step 918, the probability parameter, /?, is entered. In step 920, the lattice specified in TABLE 1 is generated using a recursive procedure going forward. For example, in the case of an option basket of two underlying assets, the lattice generated in step 920 would be an initial node (the "origin" or "root") which generates an initial hexagon. Each node of the initial hexagon would then recursively spawn another hexagon Ntimes (i.e., the number of time slices entered). Each of the seven nodes generated by the probability distribution function (e.g., see EQUATION (31) as explained in detail below). Lattice creation process then ends as indicated by step 922. V. Example of System Operation - Lattice Traversal Referring to FlG. 10, a flowchart representing the lattice traversal process 1000 of the present invention is shown. More specifically, lattice traversal process 1000 illustrates the case where the present invention is used to price an option on a basket containing multiple assets (e.g. stocks Sj and S 2 ). That is, process 1000 traverses the lattice created by process 900 explained above with reference to FIG. 9. Lattice traversal process 1000 begins at step 1002 with control passing immediately to step 1004. Once the lattice is created as shown in FIG. 10, there exist a record, for each time slice, of the nodes which constitute that time slice. Thus, in step 1004, the value at maturity of the option (time slice t = N) is calculated. Next, the value of the option at every time slice (t = N-l, -2, . . . , 0) can be calculated using the following steps 1008-1026 as indicated by step 1006. In step 1008, the spacial coordinates for each of the nodes of a time slice's lattice structure (e.g. , the seven nodes of the hexagon for a basket option of two assets) is obtained. In step 1010, the value of the assets (e.g. , S t and S 2 ) are calculated at each of the nodes. In step 1012, the drift vector, μ, is calculated at each node using the drift function inputted in step 916 of lattice creation process 900. In step 1014, the coordinates of the children of each node is obtained. In step 1016, the stored value of the option at each of the children nodes is read. In step 1018, the probabilities for each node are calculated. In step 1020, the option price, C, is calculated for the time slice. In step 1022, the price is stored. This process repeats until no more time slices are left to traverse as indicated by step 1006. Once all time slices have been traversed and the root node is reached, in step 1024, (time slice t = 0), the price, C, for the original node is calculated. In step 1026, the current price of the option is outputted and process 1000 ends as indicated by step 1028. As will be apparent to one skilled in the relevant art(s), the present invention provides a computational advantage in that when the value at time slice t = n-2 is calculated, the values for time slice t = n may be discarded as they are no longer needed. Thus, when the values for t = n-4 are calculated, the values for t = n-2 are no longer needed, and so forth. VI. Details of Lattice Geometry - Two Dimensional Case Having generally described the lattice creation process 900 and lattice traversal process 1000 above, a more detailed description is now given for the case where pricing a basket option which includes two underlying assets is desired. Further, example C + + programming language source code that implements the lattice creation process 900 and lattice traversal process 1000, as described in detail below for the two-dimensional case, is shown in APPENDIX A. Inputs The first consideration is the two underlying stochastic variables representing each asset in the basket, x x and x 2 (e.g. , stocks S, and S 2 presented above with reference to FIGS. 9 and 10). These two variables form one underlying stochastic vector: ( x ,,, λ X = x 2 j The stochastic processes in the risk-neutral world are: -& ! = μ (X,f)dt + σ λ dz λ dx 2 = μ^X. dt + σ 2 dz with correlation p between dz, and dz 2 . The volatility parameters, σ γ and σ 2 , and the correlation coefficient, p, are constant, but the drift vector: depends on both the state X and time t. The initial state at time t = 0 is: The present invention aims to price, at time t = 0, a contingent claim C (i.e. a derivative instrument whose payoff is contingent upon the underlying vector X), of time to maturity T and payoff at maturity P(X). The price at time t=0, is denoted by C(X 0 , 0). If the derivative instrument is an American-type option, its time t, state X, price C(X,t) must verify: C(X,t)≥I(X) This is because the function "I( )" is the lower bound of the American-type option. Typically, in the simplest case, this is the intrinsic value of the option (i.e. , (S - K), or for convertible bonds, (R * S), where R is the conversion ratio). Optimality in exercising options requires that one check, while traversing the lattice, to ensure that the stored value of the option is always greater than the intrinsic value. If this were not the case, the holder would simply exercise the option, and retain the greater (intrinsic) exercise value.. Thus, as described below, the greater of the two values is always stored while traversing the lattice. Hence, exercising the option is optimal in those nodes where the computed value, C, replaces the lower bound. As shown in FIG. 9, inputs of the lattice building process 900 are: (a) the diffusion parameters, p, σ x σ 2 ; (b) the complete drift function: (c) the initial value of the underlying state vector, X 0 ; (d) the value of the short interest rate r (or the interest rate term structure - yield curve or forward curve); (e) the number of time steps, N, one wishes to take; and (f) the probability parameter p. As will be appreciated by one skilled in the relevant art(s), the short rate, r, will not be an input if it is itself one of the underlying stochastic variables (i.e., if the instrument is a convertible bound). B. Determination of the Geometry of the Elementary Cell In the two-dimensional (i.e. , two stochastic variables) case, the elementary cell is a centered hexagon (see TABLE 1 above). However, it must be geometrically deformed in order to reflect the diffusion matrix: The transformation matrix A is: where: Σ = PΛP* (The symbol "*" denotes the transpose of a matrix.) That is, the matrix: Λ = 0 is the matrix of eigenvalues of Σ, and P the matrix of eigenvectors, which are computed by standard techniques. The present invention's lattice (i.e. , the set of states or nodes: ( - \ X \ XJ retained for the discretization) is a deformed hexagonal lattice. However, a straight computational lattice, E, is defined where coordinates of the nodes have integer values and correspond one to one to the real "physical" nodes: through the transformation: In the computational plane, the hexagon is as shown in FIG. 11. The hexagon of FIG. 11 has vertices having the following integer co-ordinates: The "integer hexagon" of FIG. 11 is then transformed into the typical "physical hexagon" shown in FIG. 12 using the following matrix: .0 fiβ The "physical hexagon" shown in FIG. 12 is then further transformed by matrix A to reflect the diffusion parameters. C. Building of the Lattice The building of the lattice (i.e., step 920 of process 900) is a recursive procedure running forward in time. It starts with the origin (or root): and progressively "marks," for each time slice n (O≤n≤N), the nodes of the computational lattice E which will belong to this time slice. It is the drift function that governs this process. The recursive mechanism can be described by the following five-step process. If nodes of time slice n - 1 are given by EQUATION (20): (20) E.^ ^, ) ^ where K π _, is the number of nodes (i.e. , seven), the following steps are performed: First, for each node, E n _ χ , its physical correspondent X n _ is found by utilizing EQUATION (21): (This means the root X 0 has the computational correspondent E 0 = loj Second, the drift vector at X k _ x , is computed using EQUATION (22): Third, the drift vector directs, by use of EQUATION (23), to a point Z n k _ x somewhere in the physical plane: (23) Z^^ X^ + μ Fourth, the node of the lattice that is "closest" to Z n _ must then be determined. This closest node is termed the "target node", Y n _ x . The target node is the candidate node for occupying the center of the cell of descendants of X n _ x . This means once the target node is determined, the other six children nodes of X n _ x will be determined as well, as vertices of the hexagon surrounding Y n _ , . The determining criterion is the point where the drift points to, Z n _ x , and lies in the nucleus of the target cell (i.e. Y n _ x must the be the center of the hexagon in whose nucleus ( - \ Z /7 _, lies). Calling the physical coordinates of Z n _ , its coordinates in the computational z plane are given by EQUATION (24): These will not generally be integer values. However, the four nodes of the computational lattice ( a \ (i.e. , with integer coordinates) which will surround are desired. These four nodes are given \ e by EQUATION (25): int^e,) int(e,) + 1 int(e,) int(e,) + 1 (25) (/, f 2 f /.) = . int(e 2 ) int(e 2 ) in.(e,)+ 1 int(e 2 ) + 1 where int^) is the integer value of e . The target node, Y k _ , , will be the one among these four nodes that is closest to Z k _ . As used herein, "closest" means nearest in terms of Euclidian distance as measured in the intermediary plane where the hexagonal cell is the traditional straight hexagon as depicted in FIG. 12. This is not the physical plane, nor is it the computational plane. Rather, this distance is measured in the plane which is the image by H of the computational plane E. In other words, the f among the four candidates above such that the Euclidian distance given by EQUATION (26) is minimal is chosen: (26) H{e) - H{f) The selected will then represent the coordinates in the computational plane of the sought after target node Y n _ x . As for the six other children, their coordinates in the computational plane will be given by EQUATION (27): 1 0 - 1 - 1 0 Iλ (27) + 0 1 1 0 - 1 - 1, Fifth, the above procedure is repeated for each one of E n _ , and discarding repetitions, will produce the list of the nodes of the computational lattice which will constitute time slice n: E « = { E n ) , < * < * . = U { seven children ofE k _ x } D. Traversing the Lattice Once the building the lattice is completed, a record for each time slice of the nodes constituting it will exist. More specifically, the complete list of nodes of the last time slice N is available: First, the payoff of the derivative instrument is then computed at this last time slice t = N. For each one of the nodes, its physical coordinates are determined by using the EQUATION (21): X N k = X 0 + AHE N k and the corresponding payoff is computed by ) • This is the value of the derivative instrument which will be stored in time slice t = N at node E N . Rolling back in the tree will then inductively take place as follows. Assuming values of the derivative instrument have been computed and stored at all nodes E k of time slice n, step back to time slice n-l . Stored in a record is the list of nodes given by EQUATION (20): For each one of these nodes E n _ (whose physical equivalent is X n _ x ), its seven children nodes are found in the same fashion as when building the lattice (in particular, node Y k _ χ occupying the center of the descendent cell is found). The children will have to figure among the |^„ } as this is what building the lattice during process 900 is meant to insure. Next, the values \ C n ' J of the derivative instrument that have been previously stored in these seven nodes are retrieved. The drift μ n _ x is cut by the displacement between X k _ x and Y k _ , as shown in EQUATION (28): All of the above steps are performed in the physical plane. ( ) Next, the residual drift on the transformed basis is decomposed to obtain Ω by using EQUATION (29): V (29) - A ~ X i k p ; The value of the derivative instrument which is to be stored in time slice n-l at node E n _ x is first evaluated by EQUATION (30): (30) C = e '-" ∑ p,C n \<ι≤l where r n _ x is the instantaneous interest rate prevailing at node X n _ in time slice n-l (if the short rate is among the underlying stochastic variables, r n _ will be one of the components of X k _ x , otherwise it is uniform within the same time slice and equal to the forward rate as given by the initial input of the forward curve), p, J < are the guaranteed positive risk-neutral probabilities (i.e. the probabilities that ensure that first and second moment equations of the risk-neutral stochastic processes given above are matched at each node). If the seven children nodes are listed in the same order as the coordinates of the hexagon above, the probabilities are given by EQUATION (31)(a) - (31)(g): (31)(a) ^' _ p 1 2 1 α_ β (31)(b) 2 _ 6 + 3 ^ + 3 α 6 + 2 3 /? α 2 β 2 α (31)(d) A = 6 + 2 - -g- 3 and the probability associated with the center of the descendent cell is given by EQUATION (3D(g): (31)(g) Vl = (l - p) - (c + (?) Finally, if the derivative instrument is American, C Λ _, is compared to I X n _Λ and the greater of the two is stored. This backward recursion will eventually lead to the root X Q and the time 0, present state, value C (X 0 ,0) of the derivative instrument, which is the price of the claim which is contingent on the underlying vector Z 0 sought after. It is worthy to note that if the procedure is left as described above, the seven children of all the nodes in the lattice will be determined twice— once on the way up while building the lattice and recording the nodes of the different time slices, and once on the way back while computing and storing values of the instrument. Thus, in an embodiment of the present invention, an economy can be realized on the way up if the forward build up of the lattice is limited to the boundaries of the successive time slices. In other words, in order to determine and record the nodes of the successive time slices, it is sufficient to determine and record the boundary nodes. (In general, children of boundary nodes will lie on the boundaries of the following time slice). In sum, the philosophy behind the present invention is to determine, for each node in a time slice, the seven children nodes in the following time slice, such that the first and second moment equations are matched, and the probabilities are positive. The lattice is first deformed (by the transformation matrix A) to match the first and second moment equations (EQUATIONS (17) and (18), respectively), with zero drift and the ground probability distribution. In this case, each node gets the hexagonal cell surrounding it (i.e. , the natural descendant cell as children. Then the probabilities are modified to match the moment equations with non-zero drift. The greater the drift, the greater the modification of the probabilities. However, these probabilities may turn negative. If the drift remains inside the "nucleus," then the probabilities are positive with the children cell being the natural descendant cell. If the drift is to be greater, then one has to select another descendant cell. This is designated as the cell inside whose nucleus this "abusive" drift lands. The creation process is prepared to modify the probabilities assigned to the natural cell in order to match this drift, but those probabilities were going to be negative. By having an alternative cell, the probabilities can be computed otherwise. This is accomplished by utilizing the alternative cell as though it were a natural descendant cell. That is, as far as the probabilities are concerned, the process proceeds as if the father node were transported to the center of the alternative cell. In other words, the process proceeds as if the drift was the vector joining the center of the alternative cell to the point of impact of the old drift. This is termed "cutting the drift. " The probabilities are then computed. At the end of the process, however, the "real" father node is still where it was— its children are vertices of the alternative cell (which is farther away than its natural descendant), and the probabilities are as computed. VII. Details of Lattice Geometry - Three Dimensional Case Having generally described the lattice creation process 900 and lattice traversal process 1000 above, a more detailed description is now given for the case where pricing a basket option which includes three underlying assets is desired. Inputs First, three underlying stochastic variables representing each asset in the basket are considered: x l 5 x 2 and x 3 . This comprises one underlying stochastic vector X: The stochastic processes in the risk-neutral world are then given by: dx x - μ (X,t)dt + σ x dz x dx 2 = μ 2 [X, t)dt + σ 2 dz 2 dx 3 - μ 3 {X,t)dt + σ 3 dz With correlation coefficients: p n between dz x and dz 2 /?i 3 between dz and dz 3 p 23 between dz 2 and dz 3 The volatility parameters are: σ σ 2 σ 3 and the correlation coefficient are constant, but the drift vector is given by: The drift Vector μ depends on both the state X and time t. The initial state at time zero (0) is: The present invention aims to price, at time t = 0, a contingent claim C (i.e. a derivative instrument whose payoff is contingent upon the underlying vector X), of time to maturity T and payoff at maturity P(X). The price at time t=0, is denoted by C(X 0 , 0). If the derivative instrument is an American-type option, its time t, state X, price C(X,t) must verify: C(X,t)≥I(X) Therefore, the inputs of the lattice building process are: (a) the diffusion parameters: Pv σ > (b) The complete drift function: (c) the initial value X 0 of the underlying state vector; (d) the value of the short interest rate r (or the interest rate term structure - yield curve or forward curve); (e) the number of time steps None wishes to take; and (f) the probability parameters: p χ and . Once Ν is fixed, the elementary time step is: T_ Δr = N B. Determination of the Geometry of the Elementary Cell The elementary cell is a centered rhombic dodecahedron. However, it must be geometrically deformed in order to reflect the diffusion matrix: Σ = p n σ σ, σ \ Pi3 σ ι σ 3 Δt p i3 o- χ σ 3 p 23 σ 2 σ 3 σ The transformation matrix is: where Σ = PΛP* That is: is the matrix of eigenvalues of S, and P the matrix of eigenvectors, which are computed by standard techniques as will be apparent to one skilled in the relevant art(s). The "*" is for the transpose of a matrix. The lattice, that is the set of states (or nodes): is a deformed rhombic dodecahedral lattice. It is the aim to retain it for the discretization. However, we define a straight computational lattice E where coordinates of the nodes have integer values and correspond one to one to the real, "physical" nodes: through the transformation: Indeed, in the computational plane, the rhombic dodecahedron is represented as shown in FIG.15, with its vertices having the following integer coordinates: 2 0 0 1 1 • 1 1 0 -2 0 0 • 1 -1 1 -1 o 1 H, άϋάeca.- 0 2 0 1 -1 1 1 0 0 -2 0 ■ 1 1 -1 -1 0 0 0 2 1 1 1 -1 0 0 0 -2 ■ 1 -1 -1 1 0 and being numbered: (1 2 3 4 5 6 7 8 1' 2 * 3' 4' 5' 6' T 8') One will note that, in an embodiment of the present invention, the center node has been counted twice for symmetry reasons. Building of the Lattice The building of the lattice is a recursive procedure running forward in time. It starts with the origin (or root): and progressively "marks", for each time slice n ( 0 < n __ N), the nodes of the computational lattice E which will belong to this time slice. It is the drift function that will of course govern this process. The recursive mechanism is the following: If nodes of time slice n - 1 are: E n- ,l = { (.£ n * -,l} ) \<k≤K„. λ where K n ., is their number, the following steps (a)-(d) are performed: (a) for each node E n _ χ , find its physical correspondent X n _ x by computing: (This means the root_ 0 has the computational correspondent ^ = o •) (b) Compute the drift vector at X n _ x by computing: (c) The drift vector sends us to a point Z n _ x somewhere in the physical plane: 7 k _ yk k .-1 ~~ Λ »-l + "n- l and the aim becomes to determine the node of the lattice that is "closest" (as explained herein) to Z n k - .1 . This is called the "targ σ et" node. Y k _ is the candidate node for occupying the center of the cell of descendants of X n k _ . Meaning, once we determine Y n _ , the fourteen other children nodes of X n k _ will be determined as well, as vertices of the rhombic dodecahedron surrounding Y k _ x . The determining criterion is that the point where the drift sends us, Z , , lie in the nucleus of the target cell. The nucleus of the rhombic dodecahedron is the solid called Lord Kelvin's solid and shown in FIG. 16. That is, Y n ] must the be the center of the rhombic dodecahedron in whose nucleus Z n _, lies. Calling the physical coordinates of Z k , its coordinates in the computational plane are: These will not generally be integer values, so Y k _ χ will be the one among the nodes of the computational space which is closest to Z n _, . "Closest" here means "closest in terms of Euclidian distance" as measured in computational space. The selected minimizer/will then represent the coordinates in the computational plane of the target node Y_ χ . As for the fourteen other children, their coordinates in the computational plane will be given by: (d) Repeating this procedure for each one of E k _ , and discarding repetitions, will give us the list of the nodes of the computational lattice which will constitute time slice n: E « = ≤/ = U {fifteen children of E k _ x ] D. Traversing the Lattice When building of the lattice is completed, a record for each time slice of the nodes constituting the lattice is obtained. In particular, the complete list of nodes of the last time slice N is now available: The payoff of the derivative instrument is then computed at this last time slice. For each one of the nodes, find its physical coordinates through: X N ~ X 0 + AE N and compute the corresponding payoff ) ■ This is the value of the derivative instrument which will be stored in time slice N at node E N . Rolling back in the tree will then inductively takes place as follows. First, assuming values of the derivative instrument have been computed and stored at all nodes E n of time slice n, step back to time slice n - l . In the list of nodes, the following is already stored: 'n- l = #-,} \≤k≤ K„ Thus, for each one of the nodes E k _, in the list of nodes (whose physical equivalent is X k _, ), find its fifteen children nodes in the same fashion as while building the lattice (in particular find node Y n occupying the center of the descendent cell). The children will have to figure among the { (. E " k ) \ ]≤k≤ K„ (this is what building ° the lattice is meant to insure) '. Retrieve the values ( C n ' J of the derivative instrument that have been previously stored in these seven nodes. Next, the drift μ n k is cut by the displacement between X n k _ and Y k _ x : (all this is done in the physical plane). β Then, decompose the residual drift on the transformed basis to get γ ) , where: The value of the derivative instrument which is to be stored in time slice n - 1 at node E n- ,l is first evaluated as: where r k _ t is the instantaneous interest rate prevailing at node X k _, in time slice n-l. (If the short rate is among the underlying stochastic variables, r A _, will be one of the components of X n k _ , otherwise it is uniform within the same time slice and equal to the forward rate as given by the initial input of the forward curve.) p ι J are the guaranteed positive, risk-neutral probabilities (i.e., the probabilities that ensure that first and second moment equations of the risk-neutral stochastic processes given above are matched at each node). If the fifteen children nodes are listed in the same order as the coordinates of the rhombic dodecahedron above, computing the probabilities proceeds in two stages. It is first assumed that has all three positive components and that γ ≥ ≥β. The sums of probabilities assigned to symmetrical nodes are then expressed as follows (i.e., π =p +p-): π χ -- . + λa 2 + θ(β 2 + r 2 ) 3 π 2 -. + λβ 2 + θ(a 2 3 + r 2 ) π 2 -- -E± + λγ 2 + θ(a 2 3 π 4 = - -+ τjθc 2 2 + , β o2 2 + , χ ..2 2 \)+ , φ(aβ+ aγ + βγ) π 5 = - -+ η(a 2 + β 2 + γ 2 )+ φ(-aβ+ aγ - βγ) o π 6 = + al + β 2 + r 2 ) + <p(-aβ- <*r + βy) 0 π η = — ^-÷ ?(a 2 + β 2 + γ 2 )+ φ(aβ- aγ - βγ) π 8 = p 3 ° + p(a 2 + β 2 + γ 2 ) (π 8 is the probability attached to the center.); where: θ=-η φ= i P=-η-τ and observing the following constraints: η: Pi 80 5 J_ 0≤ P 2 ° 16 PΪ = I-PΪ-PΪ>-∞* the individual probabilities will then be expressed by: p t = — + y ; and p t = —- ω, where: ω = aa ω 2 - aβ ω 3 - aγ ω 4 = b( a + β+γ) ω s - b(a- β+ γ) ω 6 = b(-a + β+γ) ω 7 = b(a + β- γ) and 1 2a + 4b = - 2 The strategy of the present invention then consists in fixing the remaining parameters, for instance: η = ι P η = 15 32 A° = τV A° = £ a = 0 , so that b - . The above which gives a temporary expression of the individual probabilities. If they are all positive, then the lattice traversal process is complete. Otherwise, to finalize the expression of probabilities (i.e., in order to make sure the probabilities are positive), each probability must be shifted by an amount φ which is computed as follows: - if, for / e{4,5,6}, one of the p is negative, set: dp] = p (i.e., bring the negative probability back to zero) dp, = p, (i.e., maintain constant the sums of conjugate probabilities) Otherwise, dp = dp . = 0 Then, set: dp 7 = - p 7 dp η = p 7 and finally, calculate: -φ 4 - dp s + dp 6 - dp 7 dp, = 2 -dp 4 + dp 5 - dp (ι - dp η dp 2 = 2 -dp 4 - dp 5 - dp (t + dp 7 dp = ; and [dp = -dp . The probability at the center node is left untouched. In the event that our first assumption is not true (i.e., are not positive and that the expression γ > a ≥ βis not true), it is recalled that the vertices of the rhombic dodecahedron (with the center node counted twice) and they are now numbered in the following fashion: 2 0 0 1 1 -1 1 0 -2 0 0 -1 -1 1 -1 o 1 άodeco.- H 0 2 0 1 -1 1 1 0 0 -2 0 -1 1 -1 -1 0 0 0 2 1 1 1 -1 0 0 0 -2 -1 -1 -1 1 0 And we now number them in the following fashion: (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16) Now, prob is defined to be the array of probabilities as assigned to the vertices in this order (splitting in two the probability for the two twin-center nodes). Then the following eight transformations are defined (using pseudo-code) as follows: salpha(prob); sbeta(prob); let probtemp=prob; let probtemp=prob; then reshuffle thus: then reshuffle thus: prob [ 1 ]=probtemp[9] ; prob[l]=probtemp[l]; prob[2]=probtemp[2] ; prob [2]=probtemp [10]; prob [3 ] =probtemp [3 ] ; prob[3]=probtemp[3]; prob [4] =probtemp [6] ; prob [4]=probtemp [5 ] ; prob[5]=probtemp[15]; prob [5 ] =probtemp [4] ; prob [6] =probtemp [4] ; prob [6] =probtemp [15]; prob[7]=probtemp[13]; prob [7] =probtemp [14]; prob [9] =probtemp [ 1 ] ; prob [9] =probtemp [9] ; prob[10]=probtemp[10]; prob [10] =probtemp [2] ; prob[l l]=probtemp[l 1]; prob [11] =probtemp [11] prob[ 12]=probtemp[l 4]; prob[12]=probtemp[13] prob [ 13 ]=probtemp[7] ; prob [13] =probtemp [12] prob[14]=probtemp[12]; prob [14] =probtemp [7] ; prob[l 5]=probtemp[5]; prob[15]=probtemp[6]; return(prob); return(prob); sgam(prob); salbeta(prob); let probtemp=prob; let probtemp=prob; then reshuffle thus: then reshuffle thus: prob[l]=probtemp[l]; prob[l ]=probtemp[2]; prob[2]=probtemp[2] ; prob[2]=probtemp[l ]; prob[3]=probtemp[l 1]; prob [3 ] =probtemp [3 ] ; prob [4] =probtemp [7] ; prob [4] =probtemp [4] ; prob [5 ] =probtemp [14]; prob [5 ] =probtemp [6] ; prob [6] =probtemp [13]; prob [6] =probtemp [5 ] ; prob [7] =probtemp [4] ; prob [7] =probtemp [7] ; prob [9]=probtemp [9] ; prob [9] =probtemp [10]; prob [10] =probtemp [10]; prob [ 10]=probtemp [9] ; prob[l l]=probtemp[3]; prob[l l]=probtemp[l 1] prob[12]=probtemp[15]; prob[ 12]-probtemp[l 2] prob[l 3]=probtemp[6]; prob [13] =probtemp [14] prob [ 14]=probtemp [5 ] ; prob [ 14] =probtemp [13] prob[15]=probtemp[12]; prob[15]=probtemp[15] return(prob); return(prob); sbetagam(prob); salgam(prob); let probtemp=prob; let probtemp=prob; then reshuffle thus: then reshuffle thus: prob [ 1 ]=probtemp [ 1 ] pr ob [ 1 ] =pr obtemp [3 ] ; prob[2]=probtemp[3] prob [2] =probtemp [2] ; prob [3 ]=probtemp [2] prob [3 ] =probtemp [ 1 ] ; prob [4]=probtemp [4] prob[4]=probtemp[4] ; prob[5]=probtemp[7] prob [5 ] =probtemp [5 ] ; prob [6]=probtemp [6] prob[6]=probtemp[7] ; prob [7]=probtemp [5] prob [7] =probtemp [6] ; prob [9] =probtemp [9] prob[9]=probtemp[l 1]; prob [ 10]=probtemp [11] prob[10]=probtemp[10] prob[l l]=probtemp[10] prob[l l]=probtemp[9]; prob [ 12]=probtemp[ 12] prob[l 2]=probtemp[l 2] prob[l 3]=probtemp[l 5] prob[13]=probtemp[13] prob [14] =probtemp [14] prob[ 14]=probtemp[ 15] prob [15] =probtemp [13] prob[15]=probtemp[14] return(prob); return(prob); rotpos(prob); rotneg(prob); let probtemp=prob; let probtemp=prob; then reshuffle thus: then reshuffle thus: prob[l]=probtemp[2]; prob[ 1 ]=probtemp[3] ; prob [2] =probtemp [3 ] ; prob[2]=probtemp [ 1 ] ; prob[3]=probtemp[l]; prob [3 ]=probtemp [2] ; prob[4]=probtemp[4]; prob[4]=probtemp[4] ; prob [5]=probtemp [7] ; prob [5 ]=probtemp [6] ; prob[6]=probtemp[5]; prob[6]=probtemp[7]; prob [7]=probtemp [6] ; prob [7]=probtemp [5 ] ; prob [9]=probtemp [10]; prob[9]=probtemp[l 1]; prob [ 10]=probtemp [1 1]; prob [10] =probtemp [9] ; prob[l l]=probtemp[9]; prob [11] =probtemp [10] prob[l 2]=probtemp[ 12] prob [12] =probtemp [12] prob [13] =probtemp [15] prob [13] =probtemp [14] prob [14] =probtemp [13] prob [14] =probtemp [15] prob [15] =probtemp [14] prob [15] =probtemp [13] return(prob); return(prob); The above eight transformations allow probabilities within the same array to be permutated. Now, any one of the components can be negative, and thus must be so marked. Thus, a marker-variable is initialized, case = 0, and the following logic is performed: - if α < 0, set α = -α and case=case+l ; - if β < 0, set β = -β and case=case+10; - if γ < 0, set γ = -γ and case=case+100; This allows a fall back to the case of three positive components, and the marker- variable indicates how this was achieved. For instance, if case exits with the value 101 : this indicates that the sign of alpha and gamma were changed. Likewise, a value of 111 indicates the sign of alpha, beta and gamma were changed, and so forth. Therefore, the above results in three positive components which fall into one of the following six cases, which are processed as follows: Case 1 If (α > β >γ), then permute the three components in order to fall back to the case where γ > α > β. In other words, set γ = α; = β; and β = γ: The process for computing the guaranteed positive individual probabilities, as given above, can then be applied. However, reassignment of the probabilities to a permutation of the nodes of the rhombic dodecahedron is required. This is done as follows: if case==0; prob=rotneg(prob); elseif case==l ; prob=salpha(rotneg(prob)) ; elseif case== 10; prob=sbeta(rotneg(prob)) ; elseif case== 100; prob=sgam(rotneg(prob)) ; elseif case==l l ; prob=salpha(sbeta(rotneg(prob))) ; elseif case==l 01 ; prob=salpha(sgam(rotneg(prob))) ; elseif case==l 10; prob=sbeta(sgam(rotneg(prob))) ; elseif case==l 1 1 ; prob=salpha(sbeta(sgam(rotneg(prob)))); endif. 2. Case 2 If (α > γ > β), then set γ = α; and α = γ. The array of probabilities is computed and then: if case==0; prob=salgam(prob); elseif case==l ; prob=salpha(salgam(prob)) ; elseif case== 10; prob=sbeta(salgam(prob)); elseif case== 100; prob=sgam(salgam(prob)) ; elseif case==l l ; prob=salpha(sbeta(salgam(prob))) ; elseif case==l 01 ; prob=salpha(sgam(salgam(prob))); elseif case==l 10; prob=sbeta(sgam(salgam(prob))) ; elseif case==l 1 1 ; prob=salpha(sbeta(sgam(salgam(prob)))) ; endif. Case 3 If (β __ α __ γ), then set γ = β; and β = γ: The array of probabilities is computed, and then: if case==0; prob=sbetagam(prob); elseif case==l; prob=salpha(sbetagam(prob)) ; elseif case== 10; prob=sbeta(sbetagam(prob)); elseif case== 100; prob=sgam(sbetagam(prob)); elseif case==l l; prob=salpha(sbeta(sbetagam(prob))); elseif case==l 01; prob=salpha(sgam(sbetagam(prob))); elseif case== 110; prob=sbeta(sgam(sbetagam(prob))) ; elseif case==l 11; prob=salpha(sbeta(sgam(sbetagam(prob)))); endif. 4. Case 4 If (β > γ ≥a), then set γ = β; α = γ; and β = α. The array of probabilities is computed, and then: if case==0; prob=rotpos(prob); elseif case==l; prob=salpha(rotpos(prob)) ; elseif case== 10; prob=sbeta(rotpos(prob)); elseif case== 100; prob=sgam(rotpos(prob)); elseif case==l l ; prob=salpha(sbeta(rotpos(prob))); elseif case==l 01; prob=salpha(sgam(rotpos(prob))) ; elseif case== 1 10; prob=sbeta(sgam(rotpos(prob))); elseif case==l 11; prob=salpha(sbeta(sgam(rotpos(prob)))); endif. 5. Case 5 If (γ >α __ β), then compute the array of probabilities, and then: if case==l; prob=salpha(prob); elseif case== 10; prob=sbeta(prob) ; elseif case== 100; prob=sgam(prob) ; elseif case==l l; prob=salpha(sbeta(prob)); elseif case==101; prob=salpha(sgam(prob)) ; elseif case== 110; prob=sbeta(sgam(prob)) ; elseif case==l 11 ; prob=salpha(sbeta(sgam(prob))) ; endif. 6. Case 6 If, (γ >β > α), then set α = β; and β = α. The array of probabilities is computed, and then: if case==0; prob=salbeta(prob) ; elseif case— 1 ; prob=salpha(salbeta(prob)); elseif case== 10; prob=sbeta(salbeta(prob)); elseif case== 100; prob=sgam(salbeta(prob)) ; elseif case==l 1 ; prob=salpha(sbeta(salbeta(prob))) ; elseif case ==: 101; prob=salpha(sgam(salbeta(prob))) ; elseif case== 110; prob=sbeta(sgam(salbeta(prob))) ; elseif case==l 11; prob=salpha(sbeta(sgam(salbeta(prob)))); endif. This completes the computation of the individual probabilities assigned to the rhombic dodecahedral vertices in all cases where lies in the nucleus. Finally, if the derivative instrument is an American-type, C*_, is compared to ) and we store the greater of the two. This backward recursion will eventually lead us to the rootN 0 and the time 0, present state, value C(X 0 , 0) of the derivative instrument, which is the theoretical price sought by the present invention. If the embodiment described above is left as is, the fifteen children of all the nodes in the lattice will be determined twice over—once on our way up while building the lattice and recording the nodes of the different time slices, and once on the way back while computing and storing values of the instrument. An economy can be realized, in an embodiment of the present invention, on the way up. If the forward build up of the lattice is limited to the boundaries of the successive time slices. In other words, in order to determine and record the nodes of the successive time slices, it is sufficient to determine and records the boundary nodes. (In general, children of boundary nodes will lie on the boundaries of the following time slice.) VIII. Computational Efficiency of the Present Invention As mentioned above with reference to TABLE 1 , the present invention extends Hull and White's trinomial technique to obtain the most economical and efficient lattice discretization for higher dimensional Brownian motions of the most general form (i.e. , EQUATION (14)). More specifically, consider the two-and three-dimensional cases. In the two-dimension case (i.e. , a basket option with two assets underlying it), the hexagonal lattice is the optimal two-dimensional lattice because there is no way of further reducing the number of nodes in the elementary cell, and the number of nodes of the 7 th slice will here be: (3T 2 + 3T + 1) as opposed to: (4T 2 + 4T + 1) in the Hull and White tensor product lattice. This gain is significant, but not as significant as in the three-dimensional case described below. Nevertheless, computing time reduced not only because the backward recursion has to read much less nodes in each time slice where the prices of the option are computed, but also because the computation of each single price - as discounted expected value of prices in descendant nodes - will require less calls of previously computed prices (7 instead of 9 as highlighted in TABLE 1). In the three-dimensional case (i.e., a basket option with three assets underlying it), the number of nodes in the 7 th time slice is: (2T + 1X27 + 2T + 1) For example, at the second time slice, 65 nodes are present in the rhombic dodecahedral lattice as shown in FIG. 13. Despite its apparent complexity, the lattice is in fact simpler than the traditional grid. More specifically, the number of nodes in the case of the Hull and White trinomial tensor product is: (2T + 1)(47* + 4T + 1) The ratio to the present invention is: 1 1 — + 2 2(4 + 4T+ 1) and converges rapidly to one-half. Bearing in mind that the number of nodes in a cell (15) is almost half the number of nodes of the tensor product cell (27) (as highlighted in TABLE 1), the gain in computing time is then approximately fourfold. IX. Example Implementations The present invention (e.g. , lattice creation process 900, lattice traversal process 1000, or any part thereof) may be implemented using hardware, software or a combination thereof and may be implemented in one or more computer systems or other processing systems. In fact, in one embodiment, the invention is directed toward one or more computer systems capable of carrying out the functionality described herein. An example of a computer system 1400 is shown in FlG. 14. The computer system 1400 includes one or more processors, such as processor 1404. The processor 1404 is connected to a communication infrastructure 1406 (e.g. , a communications bus, cross-over bar, or network). Various software embodiments are described in terms of this exemplary computer system. After reading this description, it will become apparent to a person skilled in the relevant art how to implement the invention using other computer systems and/or computer architectures. Computer system 1400 can include a display interface 1405 that forwards graphics, text, and other data from the communication infrastructure 1402 (or from a frame buffer not shown) for display on the display unit 1430. Computer system 1400 also includes a main memory 1408, preferably random access memory (RAM), and may also include a secondary memory 1410. The secondary memory 1410 may include, for example, a hard disk drive 1412 and/or a removable storage drive 1414, representing a floppy disk drive, a magnetic tape drive, an optical disk drive, etc. The removable storage drive 1414 reads from and/or writes to a removable storage unit 1418 in a well-known manner. Removable storage unit 1418, represents a floppy disk, magnetic tape, optical disk, etc. which is read by and written to by removable storage drive 1414. As will be appreciated, the removable storage unit 1418 includes a computer usable storage medium having stored therein computer software and/or data. In alternative embodiments, secondary memory 1410 may include other similar means for allowing computer programs or other instructions to be loaded into computer system 1400. Such means may include, for example, a removable storage unit 1422 and an interface 1420. Examples of such may include a program cartridge and cartridge interface (such as that found in video game devices), a removable memory chip (such as an EPROM, or PROM) and associated socket, and other removable storage units 1422 and interfaces 1420 which allow software and data to be transferred from the removable storage unit 1422 to computer system 1400. Computer system 1400 may also include a communications interface 1424. Communications interface 1424 allows software and data to be transferred between computer system 1400 and external devices. Examples of communications interface 1424 may include a modem, a network interface (such as an Ethernet card), a communications port, a PCMCIA slot and card, etc. Software and data transferred via communications interface 1424 are in the form of signals 1428 which may be electronic, electromagnetic, optical or other signals capable of being received by communications interface 1424. These signals 1428 are provided to communications interface 1424 via a communications path (i.e., channel) 1426. This channel 1426 carries signals 1428 and may be implemented using wire or cable, fiber optics, a phone line, a cellular phone link, an RF link and other communications channels. In this document, the terms "computer program medium" and "computer usable medium" are used to generally refer to media such as removable storage drive 1414, a hard disk installed in hard disk drive 1412, and signals 1428. These computer program products are means for providing software to computer system 1400. The invention is directed to such computer program products. Computer programs (also called computer control logic) are stored in main memory 1408 and/or secondary memory 1410. Computer programs may also be received via communications interface 1424. Such computer programs, when executed, enable the computer system 1400 to perform the features of the present invention as discussed herein. In particular, the computer programs, when executed, enable the processor 1404 to perform the features of the present invention. Accordingly, such computer programs represent controllers of the computer system 1400. In an embodiment where the invention is implemented using software, the software may be stored in a computer program product and loaded into computer system 1400 using removable storage drive 1414, hard drive 1412 or communications interface 1424. The control logic (software), when executed by the processor 1404, causes the processor 1404 to perform the functions of the invention as described herein. In another embodiment, the invention is implemented primarily in hardware using, for example, hardware components such as application specific integrated circuits (ASICs). Implementation of the hardware state machine so as to perform the functions described herein will be apparent to persons skilled in the relevant art(s). In yet another embodiment, the invention is implemented using a combination of both hardware and software. X. Conclusion While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example, and not limitation. It will be apparent to persons skilled in the relevant art(s) that various changes in form and detail can be made therein without departing from the spirit and scope of the invention. Thus the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents. Appendix A ^include "optionact4.hpp" ^include < iostream.h > //include < stdio.h > int main(void) { int NombrePeriodes = 500 , NPI = NombrePeriodes/2, Epaisseur=2, AjusteTheta = 0; double Frequence =0.5, Maturite = 10.0, Matl =5.0, Prix, P = 2.0/3.0, A=0.58, B =0.0345, AngleTheta = 23.0*3.141592654/75.0, *DeltaT, Strike =0.0, OrigineAction =40, Correlation =-0.5, Volatilite Action =0.25, VolatiliteTaux=0.03, Delta[2], Gamma[3] , Theta, OrigineTaux=0.08, Coupon =0.025, Ratio =2.0, Nominal = 100.0, Rappel = 105, SMax = 700, SMin= l, RMax = 0.30; flux = fopen( " e : Wtest . txt " , " a " ) ; //for(SoftCalls[0]. Trigger = 80; SoftCalls[0]. Trigger < = 130; SoftCalls[0]. Trigger + = 4) { //for(Correlation = -0.5; Correlation < = 0.5; Correlation + = 0.1) //for(P=0.5; P < = 0.66; P + = 0.01) //for(AngleTheta=0.0*3.141592654/3.0; AngleTheta < = 1.0*3.141592654/3.0; AngleTheta + = 3.141592654/30.0) //for(NombrePeriodes = 100; NombrePeriodes < = 1000; NombrePeriodes + = 100) { DeltaT = new double [NombrePeriodes + 1]; NPI = NombrePeriodes/2; for(int l = 0; I < = NPI; 1+ +) DeltaT[Il =MatI/NPI; for(I = NPI + 1; I < = NombrePeriodes; I+ +) DeltaTfl] = (Maturite-MatI)/(NombrePeriodes-NPI) ; Prix= CalculOptionActionTauxStochastique(NombrePeriodes, DeltaT, Strike, OrigineAction, Correlation, VolatiliteAction, VolatiliteTaux, P, A, B, Delta, Gamma, &Theta, OrigineTaux, Coupon, Ratio, Frequence, Nominal, Rappel, SMax, SMin,RMax, AngleTheta, AjusteTheta); cout < < NombrePeriodes < < endl; cout < < Prix < < endl; delete DeltaT; fprintf(flux, " %f\n", Prix); } /*Prix= CalculOptionActionTauxStochastique(NombrePeriodes, Epaisseur,DeltaT, Strike, OrigineAction, Correlation, VolatiliteAction, VolatiliteTaux, P, A, B, Delta, Gamma, &Theta, OrigineTaux, Coupon, Ratio, Frequence, Nominal, Rappel);*/ //_printf(stream, " %f\t%f\t%f\t%f\t%f\t%f\n" , Prix,Delta[0],Delta[l],Gamma[0],Gamma[l],Gamma[2]); } fclose(flux); return 1; // OPTIONACT4.HPP // #ifndef OPTIONACTIONTAUXSTOCHASTIQUE_HPP #define OPTIONACTIONTAUXSTOCHASTIQUE_HPP //include "taux.hpp" //include "matrice.hpp" //include "systemes.hpp" /include < math.h > #include < stdio.h > #include < iostream.h > #include <time.h > #include < stdlib.h > //include < memory. h > #define Position(X, Y) (Y) * K3 + (X) + K2 FILE *flux; class CCoordonnee { public: int X, Y; }; //- class CTranche { public: CCoordonnee *Noeuds; // Tous les noeuds de la tranche double *Prix; int XMin, XMax, YMin, YMax, *BordGauche, *BordDroit; CTranche(void) {}; ' CTranche(void) { delete [] BordGauche; delete [] BordDroit; }; }; class COptionActionTauxStochastique { public: CCoordonnee *AllNoeudsP, *AllNoeudsF; double *PrixP, *PrixF; CTranche *Tranches; double DUX, DUY, CC, Transformation[2][2], Transformation2[2] [2] , Transformation20[2] [2] , Probabilites[7], RacineTrois, RacineOrigineTaux, DeuxRacineOrigineTaux, VolActionCarre, VolTauxCarre, VolActionCarreSurDeux, VolTauxCarreSurDeux, Next Action, NextTaux, *ATheta, *sqrtDeltaT; int K2, K3, Compteur, GrandLargeurMax ; // Parametres int AjusteTheta, NombrePeriodes; double Prix, Frequence, A, B, P, AngleTheta, Coupon, Ratio, Nominal, *DeltaT, *Temps, VolatiliteAction, VolatiliteTaux, Strike, Correlation, OrigineAction, OrigineTaux, Rappel, SMax, SMin, RMax; void Init(void); void Construire(void); void ConstruireTranche(int IndicePeriode); void ConstruireFils(CCoordonnee Noeud, CCoordonnee Fils[7], int IndicePeriode, double Drift[2], double Transformation20[2][2], double Transformation2[2][2]); void CalculTransformation(double Transformation2[2][2], int IndicePeriode); void CalculActionTaux(int IndicePeriode, int X, int Y, double *Action, double *Taux, double T[2][2]); void Liberer(void); void ChercherNoeud(int IndicePeriode, CCoordonnee Noeud[7], CCoordonnee *NoeudFils[7]); void CalculPayOff(void); void CalculDescente(int IndicePeriode); void Parcours(void); void CalculProbabilites(int IndicePeriode, CCoordonnee Noeud, CCoordonnee Fils[7], double Drift[2]); double PrixOC(int IndicePeriode, double Action); double PrixOC2(int IndicePeriode, double Prix, double Action); }; // void COptionActionTauxStochastique: :Init(void) { RacineTrois = sqrt(3.0); RacineOrigineTaux = sqrt(OrigineTaux); DeuxRacineOrigineTaux = 2.0 * RacineOrigineTaux; VolActionCarre = VolatiliteAction * VolatiliteAction; VolTauxCarre = VolatiliteTaux * VolatiliteTaux; VolActionCarreSurDeux = VolActionCarre / 2.0; VolTauxCarreSurDeux = VolTauxCarre / 2.0; CC = sqrt(A * A + 2 * VolTauxCarre); ATheta = new double [NombrePeriodes + 1]; for(int I = 0; I < = NombrePeriodes; I+ +) AThetafl] = 0.17856527; //(double) rand() / (double) RAND_MAX * 3.141592654 / 3.0; GrandLargeurMax = 0; Temps = new double [NombrePeriodes + 1]; Temps[0] = 0.0; for(I = 1; I < = NombrePeriodes; I+ +) Temps[I] = Temps[I - 1] + DeltaT[I]; sqrtDeltaT = new double [NombrePeriodes + 1]; for(I = 0; I < = NombrePeriodes; I+ +) sqrtDeltaTfll = sqrt(DeltaT[I]); CalculTransformation(Transformation2, 0); double n, nmax = 0.0, P[4][2], P2[4][2], MinDT = 1.0e20; for(I = 0; I < = NombrePeriodes; I + +) if(MinDT > DeltaT[I]) MinDT = DeltaT[I]; P[0][0] = log(SMin); P[0][1] = - 2.0 * sqrt(RMax); P[1][0J = log(SMin); P[l][l] = 2.0 * sqrt(RMax); P[2][0] = log(SMax); P[2][l] = 2.0 * sqrt(RMax); P[3][0] = log(SMax); P[3][l] = - 2.0 * sqrt(RMax); for(I = 0; I < 4; I + +) { P[I][0] -= log(Origine Action); P[I][1] -= 2.0 * sqrt(OrigineTaux); Sy stemeLineaire2Inconnues(Transformation2[0] [0] , Transformation2[0] [ 1] , P[I] [0] , Transformation2[l][0], Transformation2[l][l], P[I][1], &P2[I][0], &P2[I][1]); P2[I][0] /= sqrt(MinDT); P2[I][1] /= sqrt(MinDT); n = sqrt(P2[I][0] * P2[I][0] + P2[I][1] * P2[I][1]); if(nmax < n) nmax = n; } GrandLargeurMax = Round(nmax) + 10; AllNoeudsP = new CCoordonnee [(2 * GrandLargeurMax + 1) * (2 * GrandLargeurMax + 1)]; AUNoeudsF = new CCoordonnee [(2 * GrandLargeurMax + 1) * (2 * GrandLargeurMax + 1)]; PrixP = new double [(2 * GrandLargeurMax + 1) * (2 * GrandLargeurMax + 1)]; PrixF = new double [(2 * GrandLargeurMax + 1) * (2 * GrandLargeurMax + 1)]; K2 = 2 * GrandLargeurMax * (1 + GrandLargeurMax); K3 = 2 * GrandLargeurMax + 1; cout < < "Taille " < < 2 * (sizeof(int)- sizeof(double)) * (2 * GrandLargeurMax + 1) * (2 * GrandLargeurMax + 1) < < endl; } void COpt_onActionTauxStochastique: :Construire(void) { int I, J, IndicePeriode; CCoordonnee *Noeuds; double *PrixTemp; Tranches = new CTranche [NombrePeriodes + 1] ; memset(PrixP, 127, sizeof(double) * (2 * GrandLargeurMax + 1) * (2 * GrandLargeurMax + 1)); Tranches [0].Noeuds = AllNoeudsP; Tranches [0] . Prix = PrixP; Tranches [0] . BordGauche = new int [2 * GrandLargeurMax + 1]; Tranches[0] . BordDroit = new int [2 * GrandLargeurMax + 1]; Tranches[0] .BordGauche[GrandLargeurMax] = 0; Tranches[0].BordDroit[GrandLargeurMax] = 0; Tranches[0].Prix[Position(0, 0)] = - 1.0; Tranches[0].XMin = Tranches[0] .XMax = Tranches[0].YMin = Tranches [0].YMax = 0; for(IndicePeriode = 1 ; IndicePeriode < = NombrePeriodes; IndicePeriode + +) { //cout < < IndicePeriode < < endl; memset(PrixF, 127, sizeof(double) * (2 * GrandLargeurMax + 1) * (2 * GrandLargeurMax + i)); Tranches [IndicePeriode]. Noeuds = AUNoeudsF; Tranches [IndicePeriode]. Prix = PrixF; ConstruireTranche(IndicePeriode); memcpy(Transformation20, Transformation2, sizeof(double) * 4); Noeuds = AllNoeudsP; AllNoeudsP = AUNoeudsF; AUNoeudsF = Noeuds; Tranches [IndicePeriode]. Noeuds = AllNoeudsP; PrixTemp = PrixP; PrixP = PrixF; PrixF = PrixTemp; Tranches [IndicePeriode]. Prix = PrixP; } } void COptionActionTauxStochastique: :ConstruireTranche(int IndicePeriode) { CCoordonnee Node, Fils[7]; int I, J, K, Pos, XX, YY, XMin = 2 < < 29, XMax = - XMin, YMin = 2 < < 29, YMax = - YMin; double Drift[2]; int MaxN, GrandMaxN = 0, LP; double Action, Taux, BonTheta, ThetaTemp, ThetaMin=0.0, ThetaMax = 3.141592654/3.0, DeltaTheta = ThetaMax/5.0; double *Tempo; if(AjusteTheta) { if(IndicePeriode < 10) BonTheta = 23.0*3.141592/75.0; else for(ThetaTemp = ThetaMin; ThetaTemp < = ThetaMax; ThetaTemp + = DeltaTheta) { ATheta[IndicePeriode-l] =ThetaTemp; CalculTransformation(Transformation2 , IndicePeriode- 1 ) ; Tempo = new double [(2*GrandLargeurMax+ l)*(2*GrandLargeurMax+ l)]; memset(Tempo, 127, 8 * (2 * GrandLargeurMax + 1) * (2 * GrandLargeurMax + 1)); MaxN = 0; for(J = Tranches [IndicePeriode - l].YMin; J < = Tranches [IndicePeriode l].YMax; J+ -I-) for(I = Tranches[IndicePeriode - l].BordGauche[J + GrandLargeurMax] ; I < = Tranches[IndicePeriode - l].BordDroit[J + GrandLargeurMax] ; I + = 10) { Pos = Position(I, J); if(Tranches[IndicePeriode - l].Prix[Pos] < 0.0) { Node.X = I; Node.Y = J; ConstruireFils(Node, Fils, IndicePeriode - 1, Drift, Transformation20, Transformation2) ; for(K = 6; K > = 0; K~) { Pos = Position(Fils[K].X, Fils[K].Y); if(Tempo[Pos] > 0.0) { Tempo[Pos] =-1.0; MaxN+ + ; } } } } delete Tempo; if(GrandMaxN < MaxN) { GrandMaxN = MaxN; BonTheta = ThetaTemp; } cout < < MaxN < < " "; } cout < < " / " < < GrandMaxN < < " " < < BonTheta < < endl; } ATheta[IndicePeriode-l] =BonTheta; } CalculTransι rmation(Transformation2, IndicePeriode - 1); TranchesflndicePeriode] . BordGauche = new int [2 * GrandLargeurMax + 1]; Tranches[IndicePeriode] . BordDroit = new int [2 * GrandLargeurMax + 1]; memset(Tranches [IndicePeriode] . BordGauche, 127, sizeof(int) * (2 * GrandLargeurMax + 1)); memset(Tranches[IndicePeriode] . BordDroit, 250, sizeof(int) * (2 * GrandLargeurMax + 1)); for(J = TranchesflndicePeriode - l].YMin; J < = Tranches [IndicePeriode - l].YMax; J+ +) for(I = TranchesflndicePeriode - l].BordGauche[J + GrandLargeurMax]; I < = Tranches[IndicePeriode - l] .BordDroit[J + GrandLargeurMax]; I+ +) { Pos = Position(I, J); if(Tranches[IndicePeriode - l] .Prix[Pos] < 0.0) { Node.X = I; Node.Y = J; ConstruireFils(Node, Fils, IndicePeriode - 1 , Drift, Transformation20, Transformation2) ; for(K = 6; K > = 0; K-) { CalculActionTaux(IndicePeriode, XX = Fils[K] .X, YY = Fils[K].Y, & Action, &Taux, Transformation2); if((Action > SMin) && (Action < SMax) && (Taux < RMax)) { Pos = Position(XX, YY); if(Tranches [IndicePeriode]. Prix[Pos] > 0.0) { if(XX < Tranches[IndicePeriode].BordGauche[YY + GrandLargeurMax]) Tranches[IndicePeriode] . BordGauche[Y Y + GrandLargeurMax] = XX; if(XX > Tranches[IndicePeriode].BordDroit[YY + GrandLargeurMax]) Tranches [IndicePeriode] .BordDroitfYY + GrandLargeurMax] = XX; Tranches[IndicePeriode].Prix[Pos] = - 1.0; if(XX < XMin) XMin = XX; if(XX > XMax) XMax = XX; if(YY < YMin) YMin = YY; if(YY > YMax) YMax = YY; } } Tranches[IndicePeriode].XMin = XMin; Tranches[IndicePeriode].XMax = XMax; Tranches [IndicePeriode]. YMin = YMin; Tranches [IndicePeriode]. YMax = YMax; /*FILE *stream = fopen("f:\\test.txt", "a"); for(I = 0; I < Tranches[IndicePeriode] .NombreNoeudsContour; I+ +) fprintf(stream, " d\t%d\n", Tranches[IndicePeriode] .Contour[I] .X, Tranches [IndicePeriode] .Contour[I] . Y); fprintf(stream, "\n"); fclose(stream);*/ } inline void COptionActionTauxStochastique: :ConstruireFils(CCoordonnee Noeud, CCoordonnee Fils[7], int IndicePeriode, double Drift[2], double Transformation20[2][2], double Transformation2[2][2]) { double Y, iX, iY, XX, YY, U, V, max, s, Coins[2][4], RacineT = sqrtDeltaT[IndicePeriode], RacineTO = IndicePeriode ? sqrtDeltaT[IndicePeriode - 1] : 0.0; int I, ii; if(IndicePeriode = = 0) Y = DeuxRacineOrigineTaux; else V = (Transformation20[l][0] * Noeud.X + Transformation20[l][l] * Noeud.Y) * RacineTO + DeuxRacineOrigineTaux ; Drift[0] = (Y * Y / 4.0 - VolActionCarreSurDeux) * DeltaT[IndicePeriode] ; Drift[l] = (2.0 * A * (B - Y * Y / 4.0) / Y - VolTauxCarreSurDeux / Y) * DeltaT[IndicePeriode] ; SystemeLineaire2Inconnues(Transformation[0] [0] , Transformation[0] [1] , Drift[0] , Transformation[l][0], Transformation[l][l], Drift[l], &XX, &YY); if(IndicePeriode = = 0) { U = XX / RacineT; V = YY / RacineT; XX = (XX - YY / RacineTrois) / RacineT; YY = (2.0 * YY / RacineTrois) / RacineT; } else { double An = AThetaflndicePeriode - 1] - ATheta[IndicePeriode] , CosAn = cos(An), SinAn = sin(An); U = ((Noeud.X * CosAn + (CosAn - SinAn * RacineTrois) / 2.0 * Noeud.Y) * RacineTO + XX) / RacineT; V = ((Noeud.X * SinAn + (SinAn + CosAn * RacineTrois) / 2.0 * Noeud.Y) * RacineTO + YY) / RacineT; XX = (U - V / RacineTrois); YY = (2.0 * V / RacineTrois); } iX = floor(XX); iY = floor(YY); Coins[0][0] = iX + iY / 2.0; Coins[l][0] = Coins[l][l] = iY * RacineTrois / 2.0; Coins[l][2] = Coins[l][3] = Coins[l][0] + RacineTrois / 2.0; Coins[0][l] = Coins[0][0] + 1.0; Coins[0][2] = iX + (iY + 1) / 2.0; Coins[0][3] = Coins[0][2] + 1.0; max = 1.0e30; for(I = 3; I > = 0; I--) { s = (Coins[0][I] - U) * (Coins[0][I] - U) + (Coins[l][I] - V) * (Coins[l][I] - V); if(s < max) { max = s; 11 = I; } } Fils[6].X = Fils[l].X = Fils[4] .X = (int) iX + (II % 2); Fils[6].Y = Fils[0].Y = Fils[3] .Y = (int) iY + (II > = 2); Fils[0].X = Fils[5].X = Fils[6] .X + 1; Fils[2].X = Fils[3].X = Fils[6] .X - 1 ; Fils[l] .Y = Fils[2].Y = Fils[6] .Y + 1 ; Fils[4] .Y = Fils[5].Y = Fils[6].Y - 1; } void COptionActionTauxStochastique: :CalculTransformation(double Transformation2[2][2], int IndicePeriode) { double Al l = VolActionCarre, A22 = VolTauxCarre, A12 = Correlation * VolatiliteAction * VolatiliteTaux, ValeursPropres[2], VecteursPropres[2] [2] , Temp; if(Correlation = = 0.0) { ValeursPropres[0] = Al l; ValeursPropres[l] = A22; VecteursPropres[0][0] = 1.0 VecteursPropres[0][l] = 0.0 VecteursPropres[l][0] = 0.0 VecteursPropres[l][l] = 1.0 } else { ValeursPropres[0] = (Al l + A22 + sqrt((Al l - A22) * (Al l - A22) + 4.0 * A12 * A12)) / 2.0; ValeursPropres[l] = (Al l + A22 - sqrt((Al l - A22) * (Al l - A22) + 4.0 * A12 * A12)) / 2.0; if(fabs(ValeursPropres[0] - ValeursPropres[l]) < l .Oe-10) { VecteursPropres[0][0] = 1.0; VecteursPropres[0][l] = 0.0; VecteursPropres[l][0] = 0.0; VecteursPropres[l][l] = 1.0; } else { VecteursPropres[0][0] = - A12; VecteursPropres[0][l] = Al l - ValeursPropresfO] ; VecteursPropres[l][0] = VecteursPropres[0][l]; VecteursPropres[l][l] = A12; } } Temp = sqrt(VecteursPropres[0][0] * VecteursPropres[0][0] + VecteursPropres[0][l] * VecteursPropres[0][l]); VecteursPropres[0][0] /= Temp; VecteursPropres[0][l] /= Temp; Temp = sqrt(VecteursPropres[l][0] * VecteursPropres[l][0] + VecteursPropres[l][l] * VecteursPropres [ 1 ] [ 1 ] ) ; VecteursPropres[l][0] /= Temp; VecteursPropres[l][l] /= Temp; ValeursPropres[0] = sqrt(ValeursPropres[0]); ValeursPropres[l] = sqrt(ValeursPropres[l]); AngleTheta = ATheta[IndicePeriode] ; double Cos AngleTheta = cos( AngleTheta), SinAngleTheta = sin( AngleTheta), Sqrt2P = sqrt(2.0 / P); /*Transformation[0][0] = (CosAngleTheta * VecteursPropres [0][0] * ValeursPropresfO] 'tSinAngleTheta * VecteursPropres[0][l] * ValeursPropres[l]) * Sqrt2P; Transformation[0][l] = (- SinAngleTheta * VecteursPropres[0][0] * ValeursPropres[0] + CosAngleTheta * VecteursPropres[0][l] * ValeursPropres[l]) * Sqrt2P; Transformation[l][0] = (CosAngleTheta * VecteursPropres[l][0] * ValeursPropresfO] + SinAngleTheta * VecteursPropres[l][l] * ValeursPropres[l]) * Sqrt2P; Transformation[l][l] = (- SinAngleTheta * VecteursPropres[l][0] * ValeursPropresfO] + CosAngleTheta * VecteursPropres[l][l] * ValeursPropresfl]) * Sqrt2P;*/ Transformation[0][0] = ((CosAngleTheta * VecteursPropres [0][0] + SinAngleTheta * VecteursPropres [ 1] f 0] ) * VecteursPropres f0]f0] * ValeursPropres[0] + (SinAngleTheta * VecteursPropres[l][l] + CosAngleTheta * VecteursPropres[0][l]) * VecteursPropres[0][l] * ValeursPropresfl]) * Sqrt2P; Transformation[0][l] = ((CosAngleTheta * VecteursPropres[l][0] - SinAngleTheta * VecteursPropres [0] [0] ) * VecteursPropres[0][0] * ValeursPropres[0] + (-SinAngleTheta * VecteursPropres[0][l] + CosAngleTheta * VecteursPropres[l][l]) * VecteursPropres[0][l] * ValeursPropresfl]) * Sqrt2P; Transformation[l][0] = ((CosAngleTheta * VecteursPropres[0][0] + SinAngleTheta * VecteursPropresfl][0]) * VecteursPropres[l][0] * ValeursPropres[0] + (SinAngleTheta * VecteursPropres[l][l] + CosAngleTheta * VecteursPropres [0][1]) * VecteursPropres[l][l] * ValeursPropres[l]) * Sqrt2P; Transformation! 1][1] = ((CosAngleTheta * VecteursPropres[l][0] - SinAngleTheta * VecteursPropres [0] [0] ) * VecteursPropres[l][0] * ValeursPropres[0] + (-SinAngleTheta * VecteursPropres[0][l] + CosAngleTheta * VecteursPropres[l][l]) * VecteursPropres[l][l] * ValeursPropresfl]) * Sqrt2P; Transformation2[0][0] = Transformation^] [0]; Transformation2[l][0] = Transformation[l][0]; Transformation2[0][l] = (Transformation^] [0] + Transformation[0][l] * RacineTrois) / 2.0; Transformation2[l][l] = (Transformation[l][0] + Transformation[l][l] * RacineTrois) / 2.0; } inline void COptionActionTauxStochastique : :CalculActionTaux(int IndicePeriode, int X, int Y, double *Action, double *Taux, double T[2][2]) double DT = IndicePeriode ? sqrtDeltaT[IndicePeriode - 1] : 0.0, Ta = (T[1][0] * X + T[l][l] * Y) * DT 4- DeuxRacineOrigineTaux; *Taux = Ta * Ta / 4.0; *Action = exp((T[0][0] * X 4- T[0][1] * Y) * DT) * OrigineAction; void COptionActionTauxStochastique: :Liberer( void) { delete [] AllNoeudsP; delete [] AUNoeudsF; delete PrixP; delete PrixF; delete [] Tranches; delete Temps; delete ATheta; delete sqrtDeltaT; } inline void COptionActionTauxStochastique: :ChercherNoeud(int IndicePeriode, CCoordonnee Noeud[7], CCoordonnee *NoeudFils[7]) int I; for(I = 6; I > = 0; I-) NoeudFilsfl] = Tranches[IndicePeriode 4- 1]. Noeuds 4- Position(Noeud[I].X, Noeud[I].Y); } void COptionActionTauxStochastique: :CalculPayOff( void) { int I, J, IndicePeriode = NombrePeriodes, Pos; double Action, Taux; CCoordonnee *Noeuds = Tranches [IndicePeriode] . Noeuds; for(J = Tranches[IndicePeriode].YMin; J < = Tranches[IndicePeriode].YMax; J4- 4-) for(I = Tranches[IndicePeriode].BordGauche[J 4- GrandLargeurMax]; I < = Tranches[IndicePeriode].BordDroit[J 4- GrandLargeurMax]; 14- 4-) { Pos = Position(I, J); if(Tranches[IndicePeriode].Prix[Pos] < 0.0) { CalculActionTaux(NombrePeriodes, I, J, &Action, &Taux, Transformation20); Noeuds [Pos] . X = I; Noeuds[Pos].Y = J; if((Action < SMax) && (Taux < RMax)) Tranches[IndicePeriode].Prix[Pos] = PrixOC(IndicePeriode, Action); else if(Action > = SMax) Tranches[IndicePeriode].Prix[Pos] = Ratio * SMax; else Tranches[IndicePeriode] .Prix[Pos] = Ratio * Action; } } } void COptionActionTauxStochastique: :CalculDescente(int IndicePeriode) { int I, J, K, Pos, Pos2, Ok, NombreNoeuds = (2 * GrandLargeurMax 4- 1) * (2 * GrandLargeurMax 4- 1); CCoordonnee Fils[7]; CCoordonnee *NoeudFils[7]; double Prix, Action, Taux, Drift[2]; for(J = Tranches[IndicePeriode].YMin; J < = Tranches[IndicePeriode] .YMax; J4- 4-) for(I = Tranches [IndicePeriode] . BordGauche [J 4- GrandLargeurMax]; I < = Tranches[IndicePeriode] .BordDroit[J 4- GrandLargeurMax]; 14- 4-) { Pos = Position(I, J); Tranches[IndicePer_ode].Noeuds[Pos].X = I; Tranches[IndicePeriode].Noeuds[Pos].Y = J; CalculActionTaux(IndicePeriode, I, J, &Action, &Taux, Transformation20); if((Action < SMax) && (Taux < RMax)) { ConstruireFils(Tranches[IndicePeriode].Noeuds[Pos], Fils, IndicePeriode, Drift, Trans formation20, Transformation2); Ok = 1; for(K = 6; K > = 0; K~) { Pos2 = Position(Fils[K].X, Fils[K].Y); if((Pos2 < 0) I I (Pos2 > = NombreNoeuds)) { Ok = 0; Tranches[IndicePeriode] .Prix[Pos] = 1.0e30; break; } } if(Ok) { ChercherNoeud(IndicePeriode, Fils, NoeudFils); CalculProbabilites(IndicePeriode, Tranches[IndicePeriode] .Noeuds[Pos], Fils, Drift); Prix = 0.0; for(K = 6; K > = 0; K-) { int PosP = Position(Fils[K] .X, Fils[K].Y); if(Tranches[IndicePeriode 4- l].Prix[PosP] > 1.0e25) { CalculActionTaux(IndicePeriode 4- 1 , Fils[K] .X, Fils[K].Y, &Action, &Taux, Transformation2); if(Action > = SMax) Tranches [IndicePeriode 4- l].Prix[PosP] = Ratio * SMax; else if((Taux > = RMax) && (Action > SMin)) Tranches [IndicePeriode 4- l].Prix[PosP] = Ratio * Action; else if((Taux < RMax) && (Action < SMin)) { double Ob, AA, BB, C = 0.0; AA = pow(2.0 * CC * exp((CC 4- A) * (Temps[NombrePeriodes] - Temps [IndicePeriode]) / 2.0) / ((CC 4- A) * (exp(CC * (Temps [NombrePeriodes] - Temps[IndicePeriode])) - 1.0) 4- CC 4- CC), 2.0 * A * B / VolTauxCarre); BB = 2.0 * (exp(CC * (Temps[NombrePeriodes] - Temps[IndicePeriode])) - 1.0) / ((CC 4- A) * (exp(CC * (Temps [NombrePeriodes] - Temps[IndicePeriode])) - 1.0) 4- CC 4- CC); Ob = (1.0 4- Coupon) * AA * exp(- BB * Taux); while(C < = Temps [NombrePeriodes]) { if(C > Temps[IndicePeriode]) { AA = pow(2.0 * CC * exp((CC 4- A) * (C - Temps[IndicePeriode]) / 2.0) / ((CC 4- A) * (exp(CC * (C - Temps[IndicePeriode])) - 1.0) 4- CC 4- CC), 2.0 * A * B / VolTauxCarre); BB = 2.0 * (exp(CC * (C - Temps [IndicePeriode])) - 1.0) / ((CC 4- A) * (exp(CC * (C - TempsflndicePeriode])) - 1.0) 4- CC 4- CC); Ob 4- = Coupon * AA * exp(- BB * Taux); } C 4- = Frequence; Tranches [IndicePeriode 4- l].Prix[PosP] = Ob * Nominal; } else { Tranches[IndicePeriode] .Prix[Pos] = 1.0e30; break; } } Prix 4- = Probabilites[K] * Tranches[IndicePeriode 4- l].Prix[PosP]; } if(K < 0) { Prix *= exp(- Taux * DeltaTflndicePeriode]); Tranches[IndicePeriode] .Prix[Pos] = PrixOC2(IndicePeriode, Prix, Action); /*ConstruireFils(Tranches[IndicePeriode] .Noeuds[Pos] , Fils, IndicePeriode, Drift, Transformation20, Transformation2); double Sl =0.0,s2=0.0,s3 =0.0,s4=0.0,s5 =0.0, xp = (Transformation20[0][0] * Tranches [IndicePeriode] .Noeuds[Pos] .X 4- Transformation20[0][l] * Tranches[IndicePeriode] . Noeuds[Pos] . Y) * sqrt(DeltaT[IndicePeriode- 1]) , yp = (Transformation20[l][0] * TranchesflndicePeriode] . NoeudsfPos] .X 4- Transformation20[l][l] * TranchesflndicePeriode] . NoeudsfPos]. Y) * sqrt(DeltaT[IndicePeriode-l]); for(int Z = 0; Z < 7; Z4- 4-) { double xi = (Transformation2[0][0] * Fils[Z] .X 4- Transformation2[0][l] * FilsfZ].Y) * sqrt(DeltaTfIndicePeriode]), yi = (Transformation2[l][0] * Fils[Z].X 4- Transformation2[l][l] * Fils[Z].Y) * sqrt(DeltaT[IndicePeriode]); si 4- = Probabilites[Z] * (xi-xp); s2 4- = Probabilites[Z] * (yi-yp); s3 4- = Probabilites[Z] * pow(xi-xp,2); s4 4- = ProbabilitesfZ] * pow(yi-yp,2); s5 4- = ProbabilitesfZ] * (xi-xp) *(yi-yp); } si -= Drift[0]; s2 -= Drift[l]; s3 - = pow(VolatiliteAction,2)*DeltaT[IndicePeriode] 4-pow(Drift[0],2); s4 - = pow(VolatiliteTaux,2)*DeltaT[IndicePeriode] 4-pow(Drift[l],2); s5 -= Correlation * VolatiliteTaux*VolatiliteAction*DeltaT[IndicePeriode] 4-Drift[0]*Drift[l]; double ss = abs(s 1 ) 4- abs(s2) 4- abs(s3) 4- abs(s4) 4- abs(s5) ; if(ss > 1.0e-14) cout < < "ss" < < endl;*/ } } } else if( Action > = SMax) Tranches[IndicePeriode] .Prix[Pos] = Ratio * SMax; else Tranches[IndicePeriode].Prix[Pos] = Ratio * Action; } void COptionActionTauxStochastique: :Parcours(void) { int I, IndicePeriode; CCoordonnee *Noeuds; double *PrixTemp; CalculPayOff(); for(IndicePeriode = NombrePeriodes - 1; IndicePeriode > 0; IndicePeriode—) { //cout < < IndicePeriode < < endl; Noeuds = AllNoeudsP; AllNoeudsP = AUNoeudsF; AUNoeudsF = Noeuds; PrixTemp = PrixP; PrixP = PrixF; PrixF = PrixTemp; memset(PrixP, 127, sizeof(double) * (2 * GrandLargeurMax 4- 1) * (2 * GrandLargeurMax 4- D); TranchesflndicePeriode 4- 1], Noeuds = AUNoeudsF; Tranches [IndicePeriode]. Noeuds = AllNoeudsP; Tranches [IndicePeriode 4- l].Prix = PrixF; Tranches [IndicePeriode] . Prix = PrixP; CalculTransformation(Transformation20, IndicePeriode - 1); CalculTransformation(Transformation2, IndicePeriode); CalculDescente(IndicePeriode) ; } Noeuds = AllNoeudsP; AllNoeudsP = AUNoeudsF; AUNoeudsF = Noeuds; PrixTemp = PrixP; PrixP = PrixF; PrixF = PrixTemp; memset(PrixP, 127, sizeof(double) * (2 * GrandLargeurMax 4- 1) * (2 * GrandLargeurMax 4- 1)); Tranches [1] . Noeuds = AUNoeudsF; Tranches [0] . Noeuds = AllNoeudsP; Tranches [1]. Prix = PrixF; Tranches [0]. Prix = PrixP; CalculTransformation(Transformation2, 0); CalculDescente(O); Prix = Tranches[0].Prix[Position(0, 0)]; } void COptionActionTauxStochastique: :CalculProbabilites(int IndicePeriode, CCoordonnee Noeud, CCoordonnee Fils[7], double Drift[2]) { double An, X, Y, Alpha, Beta, RacineT = sqrtDeltaTflndicePeriode] , SinAn, CosAn; if(IndicePeriode = = 0) { X = Fils[6].X * RacineT; Y = Fils[6].Y * RacineT; } else { An = ATheta[IndicePeriode - 1] - ATheta[IndicePeriode]; SinAn = sin(An); CosAn = cos(An); X = Fils[6].X * RacineT - (Noeud.X * (CosAn - SinAn / RacineTrois) - 2.0 * SinAn / RacineTrois * Noeud.Y) * sqrtDeltaT[IndicePeriode - 1]; Y = Fils[6] .Y * RacineT - (2.0 * SinAn / RacineTrois * Noeud.X 4- (CosAn 4- SinAn / RacineTrois) * Noeud.Y) * sqrtDeltaT[IndicePeriode i]; } Drift[0] -= Transformation2[0][0] * X 4- Transformation2[0][l] * Y; Driftfl] -= Transformation2[l][0] * X 4- Transformation2[l][l] * Y; SystemeLineaire2Inconnues(Transformation[0] [0] , TransformationfO] [ 1] , Drift[0] , Transformation[l][0], Transformation[l][l], Driftfl], &Alpha, &Beta); Alpha /= RacineT; Beta /= RacineT; double Alpha3 = Alpha / 3.0, Alpha2 = Alpha * Alpha, Beta2 = Beta * Beta, BetaR3 = Beta / RacineTrois; Probabilites[6] = 1.0 - P - Alpha2 - Beta2; Probabilites[0] = (P - Beta2) / 6.0 4- Alpha2 / 2.0 4- Alpha3; Probabilites[3] = Probabilites[0] - Alpha3 - Alpha3; Probabilitesfl] = (P 4- Alpha) / 6.0 4- Beta2 / 3.0 4- Alpha * BetaR3 4- BetaR3 / 2.0; Probabilites[4] = Probabilitesfl] - Alpha3 - BetaR3; Probabilites[2] = Probabilites[l] - Alpha3 - 2.0 * Alpha * BetaR3; Probabilites[5] = Probabilites[2] 4- Alpha3 - BetaR3; /*for(int K = 0; K < 7; K4- 4-) if(Probabilites[K] < -1.0e-16) cout < < " <0" < < endl;*/ } inline double COptionActionTauxStochastique: :PrixOC(int IndicePeriode, double Action) { double Result = (1.0 4- Coupon) * Nominal; /*if(Result > Rappel) Result = Rappel;*/ if(Result < Ratio * Action) Result = Ratio * Action; if(Result < Strike) Result = Strike; return Result; inline double COptionActionTauxStochastique: :PrixOC2(int IndicePeriode, double Prix, double Action) { double Result = Prix, T = TempsflndicePeriode] / Frequence; if(IndicePeriode && (fabs(Round(T) - T) < 1.0e-12)) Result 4- = Coupon * Nominal; if(Result < Ratio * Action) Result = Ratio * Action; if(Result > Rappel) Result = Rappel; if(Result < Strike) Result = Strike; return Result; } // double CalculOptionActionTauxStochastique(int NombrePeriodes, double *DeltaT, double Strike, double OrigineAction, double Correlation, double VolatiliteAction, double VolatiliteTaux, double P, double A, double B, double Delta[2], double Gamma[3], double *Theta, double OrigineTaux,double Coupon, double Ratio, double Frequence, double Nominal, double Rappel, double SMax, double SMin, double RMax, double AngleTheta, int AjusteTheta) { COptionActionTauxStochastique Modele; double Prix; Modele. NombrePeriodes = NombrePeriodes; Modele. DeltaT = DeltaT; Modele. Strike = Strike; Modele. VolatiliteAction = VolatiliteAction; Modele. VolatiliteTaux = VolatiliteTaux; Modele. Correlation = Correlation; Modele. OrigineAction = OrigineAction; Modele. OrigineTaux = OrigineTaux; Modele.P = P; Modele. A = A; Modele. B = B; Modele. Coupon = Coupon; Modele . Ratio = Ratio ; Modele . Frequence = Frequence ; Modele . Nominal = Nominal ; Modele . Rappel = Rappel ; Modele. SMax = SMax; Modele. SMin = SMin; Modele. RMax = RMax; Modele. AngleTheta = AngleTheta; Modele. AjusteTheta = AjusteTheta; clock t tO, tl , t2; Modele. Init(); cout < < "Construction" < < endl; tO = clock(); Modele . Construire() ; tl = clock(); cout < < "Parcours" < < endl; Modele . Parcours() ; t2 = clock(); cout < < (double) (tl - tO) / CLOCKS_PER_SEC < < " secondes" < < endl; cout < < (double) (t2 - tl) / CLOCKS PER SEC < < " secondes" < < endl; Prix = Modele. Prix; Modele. Liberer(); return Prix; } #endif

Claims: What Is Claimed Is: 1. A method for pricing the current value of a basket option consisting of a plurality of underlying assets, comprising the steps of: ( 1 ) receiving an input indicative of the spot value for each of the plurality of underlying assets within the basket option; (2) receiving an input indicative of the risk free interest rate; (3) receiving an input indicative of the diffusion parameters for the option; (4) receiving an input indicative of the desired number of time slices; (5) receiving an input indicative of the maturity date of the option; (6) building a lattice, using said inputs from steps (l)-(5), wherein the lattice is comprised of an elementary cell structure for each of said time slices; and (7) traversing, in a backwards fashion, said lattice in order to calculate the value of the basket option from said maturity date to the present. 2. The method of claim 1 , wherein the plurality of assets includes exactly two assets and said elementary cell structure is a hexagon. 3. The method of claim 1 , wherein the plurality of assets includes exactly three assets and said elementary cell structure is a rhomba-dodecahedron. 4. The method of claim 1, wherein the plurality of assets includes exactly n assets and the number of sides of the shape of said elementary cell structure is given by the equation: (2 n+ 1 ) - 2. 5. The method of claim 1, wherein step (1) comprises the steps of: (a) receiving an input indicative of the correlation, p, of each asset to each other asset within the plurality of underlying assets; and (b) receiving an input indicative of the volatility, σ, of each of the plurality of underlying assets. 6. A computer program product comprising a computer usable medium having control logic stored therein for causing a computer to price the current value of a basket option consisting of a plurality of underlying assets, said control logic comprising: a first computer readable program code means for causing the computer to receive an input indicative of the spot value for each of the plurality of underlying assets within the basket option; a second computer readable program code means for causing the computer to receive an input indicative of the risk free interest rate; a third computer readable program code means for causing the computer to receive an input indicative of the diffusion parameters for the option; a fourth computer readable program code means for causing the computer to receive an input indicative of the desired number of time slices; a fifth computer readable program code means for causing the computer to receive an input indicative of the maturity date of the option; a sixth computer readable program code means for causing the computer to build a lattice, using said inputs from said first, second, third, fourth, and fifth computer readable program code means, wherein the lattice is comprised of an elementary cell structure for each of said time slices; and a seventh computer readable program code means for causing the computer to traverse, in a backwards fashion, said lattice in order to calculate the value of the basket option from said maturity date to the present.

Inventors: AYACHE ELIE, AYACHE, ELIE
Applicants: AYACHE ELIE, AYACHE, ELIE
Application year: 2000
Main classification: G06F17
IPC codes: G06Q40