Mahemaical and Compuaional Applicaions Aricle Opimizaion of Seing Take-Profi Levels for Derivaive Trading Xiaodong Rui 1,3,, Yue Liu 2,,, Aijun Yang 1,,, Hongqiang Yang 1, and Chengcui Zhang 4, 1 College of Economics and Managemen, Nanjing Foresry Universiy, Nanjing 210037, China; rxd@ji.edu.cn (X.R; yhqnfu@aliyun.com (H.Y. 2 School of Finance and Economics, Jiangsu Universiy, Zhenjiang 212013, China 3 School of Business, Jinling Insiue of Technology, Nanjing 211169, China 4 School of Finance, Nanjing Audi Universiy, Nanjing 211815, China; cuicuinj@163.com * Correspondence: liuy0080@e.nu.edu.sg (Y.L.; ajyang81@163.com (A.Y.; Tel.: +86-150-5292-7422 (A.Y. These auhors conribued equally o his work. Academic Edior: Fazal M. Mahomed Received: 11 Sepember 2016; Acceped: 9 December 2016; Published: 22 December 2016 Absrac: This paper develops an opimal sopping rule by characerizing he ake-profi level. The opimizaion problem is modeled by geomeric Brownian moion wih wo swichable regimes and solved by sochasic calculaion. A closed-form profiabiliy funcion for he rading sraegies is given, and based on which he opimal ake-profi level is numerically achievable wih small cos of compuaional complexiy. Keywords: Black-Scholes model; passage ime; opimizaion 1. Inroducion Derivaive rading has been reshaped by quaniaive echniques in recen decades [1]. This paper aims o solve he opimizaion problem of seing ake-profi levels o maximize he profiabiliy. Considerable sudies on closing a deal are implemened ino rading pracice. Eloe e al. [2] opimized he hreshold levels of aking profi and sopping loss based on a regime-swiching model. On he oher hand, modeling wih regime-swiching has he advanage of flexibiliy in changing parameers. Since firs inroduced by [3], inensive research ineress have been drawn o his area, for example he research by Yao e al. [4] on pricing he European opion by a regime-swiching model. In his paper, we also apply swiched regimes, bu no driven by anoher independen process or exernal facors. To opimize he ake-profi level, regime-swiching in our model is riggered by he price process iself; hence, our model is less subjec o parameer esimaion and predicion, and performs more neurally o unveil he variaion brough by he ake-profi level. We proceed as follows. In Secion 2, we formulae he opimal selling problem. Secion 3 gives he probabiliy disribuion of he ransacion ime. In Secion 4, he profiabiliy funcion is explicily expressed in closed-form and opimal ake-profi level is achievable from his expression. Secion 5 proceeds he numerical simulaion o show ha he resuls obained by our mehod are consisen wih hose by crude Mone Carlo simulaion [5], bu ours consume less ime. 2. Problem Formulaion Suppose a pair of opposie rades are opened by he he curren ask price x + and bid price x a ime, he price X is recognized as x+ +x 2 and denoed as x. Thereby, he cos for a pair of orders are x + x, assumed as a consan θ < X 0. Le x(1 + η be he closing price for long rades, and x(1 η for shor rades, xη is he profi gained in each single deal, where η (0, 1 as he ake-profi rae. The price dynamic is simulaed by he process {X : [0, } formulaed by he following equaion: Mah. Compu. Appl. 2017, 22, 1; doi:10.3390/mca22010001 www.mdpi.com/journal/mca
Mah. Compu. Appl. 2017, 22, 1 2 of 8 dx = ] [µ (µ 2 2 1 { ˆX 0, X 0 (1+η or ˇX 0, X 0 (1 η} X d + X dw (1 where µ IR, > 0, X 0 > 0, and ˆX s1,s 2 := sup s1 r s 2 X r, ˇX s1,s 2 := inf s1 r s 2 X r. The naure filraion (F IR+ is generaed by a Wiener process (W IR+. For any T > 0, consider he process {X : [0, T]}; o make i under a risk-neural seing, a new probabiliy measure ˆP is defined by where he process ϕ is given by ( T T 1 d ˆP = exp ϕ dw 0 0 2 ϕ2 d dp, ϕ := µ (µ 2 2 1 { ˆX 0, X 0 (1+η or ˇX 0, X 0 (1 η}, [0, T], hence under his measure, ˆP, W 0 ϕ udu is a sandard Brownian moion and X is also a maringale. Wihou loss of generaliy and for convenience of noaion, we sill proceed under he original measure P insead of ˆP for he remaining par. For any IR +, in he even ha X 0 (1 η < X s < X 0 (1 + η for all s [0, ], (X s s [0,] follows a geomery Brownian moion as in he Black Scholes model. The drif facor µ is se according o he prediced rend based on he previous informaion. Therefore, once he hreshold level is achieved, we abandon he previously obained value of he drif facor µ, and make no more predicion for he uncerainy; raher, he price hereafer is simulaed by a maringale namely, leing he drif facor vanish. According o our sopping rule, wo sopping imes are defined as follows, T 1 := inf{s 0 X s X 0 (1 + η or X s X 0 (1 η}, (2 T 2 := inf{s 0 ˆX 0,T1 +s X 0 (1 + η and ˇX 0,T1 +s X 0 (1 η}. (3 To measure he efficiency of profi-aking, we define he profiabiliy funcion: [ ] 2ηX0 θ φ(η := E T 1 + T 2 (4 for any ake-profi rae η (0, 1. Wih definiion (2 of T 1, SDE (1 is rewrien equivalenly: dx = µx 1 {<T1 } d + X dw. Nex, we define wo geomeric Brownian moions (Y IR+ and (Z IR+ by dy = µy d + Y dw and dz = Z dw. For any posiive sequence { i } i IN ha i < i+1 for any i IN, in he even i < T 1 for all i, {Y i } i IN has he same join disribuion as {X i } i IN. On he oher hand, {Z i } i IN has he same join disribuion as {X i } i IN in he even ha i > s T 1 for all i. Therefore, in he following compuaion, we may subsiue X by Y and Z in each case, respecively. For convenience, we define W λ := W + λ, λ := µ 2, S := sup 0 r W r, and I := inf 0 r W r. 3. Compuaion of Transacion Time 3.1. Independence beween T 1 and T 2 In his subsecion, we show by Lemma 1 he independence beween T 1 and T 2 for furher compuaion. Lemma 1. For any 1, 2 > 0, P(T 1 d 1, T 2 d 2 = P(T 1 d 1 P(T 2 d 2, where T 1, T 2 are defined by (2 and (3. Proof. By definiion (2 of T 1, T 1 = 0 since X 0 > 0, hen X T1 = X 0 (1 + η or X T1 = X 0 (1 η, hence we have
Mah. Compu. Appl. 2017, 22, 1 3 of 8 P(T 1 d 1, T 2 d 2 = E[1 {T1 d 1 } E[1 {T 2 d 2 } T 1 d 1, X T1 = X 0 (1 + η]]p(x T1 = X 0 (1 + η + E[1 {T1 d 1 } E[1 {T 2 d 2 } T 1 d 1, X T1 = X 0 (1 η]]p(x T1 = X 0 (1 η. (5 To simplify (5, by definiion (3, we noe ha E[1 {T2 d 2 } T 1, X T1 = X 0 (1 η] =P( inf{s 0 Ẑ T1,T 1 +s X 0 (1 + η} d 2 T 1, Z T1 = X 0 (1 η, (6 Applying he srong Markov propery of (Z IR+ for all T 1 given T 1, we have P( inf{s 0 Ẑ T1,T 1 +s X 0 (1 + η} d 2 T 1, Z T1 = X 0 (1 η ( log(1 + η log(1 η =P ds 2, (7 where for he propery of Wiener process, we apply Theorem 1.12 of [6]. Combining (6 and (7, we see ha ( log(1 + η log(1 η E[1 {T2 d 2 } T 1, X T1 = X 0 (1 η] = P ds 2. (8 By he symmeric propery of Wiener process (see Chaper 2 of [7], E[1 {T2 d 2 } T 1 d 1, X T1 = X 0 (1 η] = E[1 {T2 d 2 } T 1 d 1, X T1 = X 0 (1 + η]. (9 By (5, (8, and (9, we obain ( log(1 + η log(1 η P(T 1 d 1, T 2 d 2 = P(T 1 d 1 P ds 2. (10 On he oher hand, repeaing he approach above, we see ha ( log(1 + η log(1 η P(T 2 d 2 = P ds 2, (11 hence we conclude Lemma 1 by (10 and (11. 3.2. Disribuion of T 1 Define a funcion G(y, a, b, for any a > y > b > 0 and IR + by G(y, a, b, = [κ(, y 2b + 2(n 1(a b + κ(, y 2a 2(n 1(a b κ(, y + 2n(a b κ(, y 2n(a b], (12 where he normal densiy funcion κ is defined by κ(, x := disribuion of T 1 is given by Proposiion 2 as follows. Proposiion 2. For any > 0, e x2 2 2π for any > 0, x IR. Then, he P(T 1 < = log(1+η ( e λy 1 2 λ2 G y, log(1 + η log(1 η, log(1 η ( log(1 + η +1 Φ ( log(1 η λ + Φ, dy λ,
Mah. Compu. Appl. 2017, 22, 1 4 of 8 where Φ( denoes he disribuion funcion of a sandard normal variable. Proof. By he definiion (2 of T 1, for any > 0, we have P(T 1 < = P(Ŷ 0, X 0 (1 + η or ˇY 0, X 0 (1 η. Applying he sandard echnique of Girsanov heorem, cf. Theorem 8.6.4 of B. Oksendal [8], we obain ha P(T 1 < = E[1 {S 1 log(1+η or I 1 log(1 η}eλw 1 2 λ2 ], for which we hen apply he Lemma 3 proved by some similar argumens as in Chaper 2.8 of [9]; he deails of he proof are saed in he Appendix. Lemma 3. For any a > c > b > 0, > 0 and x (a, b, we have P(S a or I b ; W c W 0 = x [ ( c + x 2n(a b 2a = Φ + Φ ( ( c x 2n(a b b + x 2n(a b 2a Φ Φ Φ +Φ ( ( ] b x + 2n(a b b x 2n(a b + Φ. ( ( c + x + 2n(a b 2b c x + 2n(a b Φ ( b + x + 2n(a b 2b 4. Opimizaion of Take-Profi Levels In his secion, we express he profiabiliy funcion in a closed-form and consider he maximizaion problem over η (0, 1. By (4 and (11, and Proposiion 2, we have P(dT φ(η = (2ηX 0 θ 1 P(dT 2 1 = (2ηX (R + 2 T 1 + 0 θ T 2 (R + 2 + s ϕ 1(ϕ 2 (sdds, (13 where he probabiliy densiy funcions are given by ϕ 1 ( := log(1+η log(1 η 1 log(1+η 2 λ2 log(1 η e λy 1 2 λ2 G 1 e (log(1 η λ2 2 2 2π ( y, log(1 η, dy log(1 + η, ( e λy 1 2 λ2 log(1 + η log(1 η G y,, ( log(1 η 2 + λ 3 2, dy + 1 e (log(1+η λ2 2 2 2π ( log(1 + η 2 + λ 3 2 for > 0, where he funcion G is defined by (12, and ϕ 2 ( = log(1+η log(1 η 2π for > 0. Then, we consider he maximizaion problem of seing suiable 3 η. Firs, o enlarge φ(η, we ensure i o be posiive; herefore, η should saisfy he condiion ha η > 2X θ 0. Noe ha η (0, 1 and θ < X 0 as we assumed before, η should be wihin ( 2X θ 0, 1. Nex, we check he convergence of he inegraion in (13. Acually, under he condiion ha η ( 2X θ 0, 1, we see ha (2X 0 θ 2 e (log(1+η log(1 η2 2 2 0 < φ(η <, which also provides a uniform upper bound for he profiabiliy (log(2x 0 +θ log(2x 0 θ 2 ( funcion. The opimal ake-profi rae η = max η θ 2X 0, 1 φ(η = max φ(r, is ready o be θ solved numerically. 5. Numerical Simulaion 2X 0 r 1 In Table 1 below, we compare he esing errors and running ime for boh approaches. Noe ha he average esing errors are measured by comparison wih he resul obained by programming wih much more samples and smaller ime discreizaion seps, which consume several imes he running
Mah. Compu. Appl. 2017, 22, 1 5 of 8 ime. From he average running ime lised, we conclude ha our approach is much more efficien han ha of crude Mone Carlo [ simulaion. ] The reason is also mahemaically obvious, as i is well known ha E[T 2 ] = while E 1T2 is finie, i is quie ime-consuming o sample he sopping ime T 2 (so is T 1. From he daa of difference pairs of (µ, obained by boh approaches, we find ha he opimal ake-profi level is more sensiive o he changes of han ha of µ. Besides, larger volailiy yields large opimal ake-profi level, which reinforces he widely-held financial wisdom ha he larger he volailiy, he larger he ake-profi level we can se. Table 1. For 25 pairs of parameers (µ,, we repor he value of η obained by Mone Carlo simulaions and our approach of maximizaion of he closed-form. Mone Carlo Our mehod X 0 = 10, θ = 0.001 = 0.10 = 0.15 = 0.20 = 0.25 = 0.30 = 0.05 0.029 0.042 0.046 0.058 0.064 = 0.10 0.031 0.047 0.049 0.056 0.072 = 0.15 0.035 0.049 0.053 0.064 0.077 = 0.20 0.038 0.050 0.058 0.080 0.095 = 0.25 0.039 0.058 0.063 0.084 0.103 Average Tesing Errors 0.028 Average Running Time 54.60 min = 0.05 0.028 0.040 0.049 0.056 0.068 = 0.10 0.032 0.045 0.051 0.061 0.075 = 0.15 0.035 0.051 0.054 0.066 0.080 = 0.20 0.040 0.052 0.059 0.077 0.091 = 0.25 0.041 0.061 0.065 0.083 0.096 Average Tesing Errors 0.011 Average Running Time 30.11 min 6. Conclusion and Fuure Work This paper gives an opimal sopping rule by characerizing he ake-profi level. Compared o ohers effecs on his, ours has less compuaional complexiy and is applicable o improving he rading sraegy for he issue of closing posiion. Our work can be exended o oher more difficul models wih regime swiching, such as ha wih Markov chains; however, i could be challenging o ge a closed form, since our work benefis from he advanages of Brownian moion. Acknowledgmens: The work is parly suppored by Naional Naural Science Foundaion of China (No. 11501294 and China Posdocoral Science Foundaion (2015M580374, 2016T90398. Auhor Conribuions: X.R. colleced and processed he daa, and checked resuls and manuscrip. Y.L. drafed his manuscrip, esablished he research paper design and paper mehodology. A.Y. and H.Y gave suggesions for he inpu-oupu analysis and for he manuscrip during he whole wriing process. C.Z. helped processing raw daa. All he auhors have read and approved he final manuscrip. Conflics of Ineres: The auhors declare no conflic of ineres. Appendix A. In his secion, we proceed o prove Lemma 3 by applying he echnique in Chaper 2.8 of [9]. For any a > c > b > 0, x (a, b, > 0, we have = P x (S a or I b ; W c [ Φ Φ ( c + x 2n(a b 2a + Φ ( c + x + 2n(a b 2b ( ( c x + 2n(a b c x 2n(a b Φ
Mah. Compu. Appl. 2017, 22, 1 6 of 8 ( b + x 2n(a b 2a Φ +Φ Φ ( b + x + 2n(a b 2b ( ( ] b x + 2n(a b b x 2n(a b + Φ. Proof. Firs, several sequences of sopping ime are defined as follows: 0 = 0, τ 0 = inf{ 0 I b}; π 0 = 0, ρ 0 = inf{ 0 S a}; n = inf{ π n 1 W = a}; τ n = inf{ n 1 W = b}; π n = inf{ ρ n 1 W = b}; ρ n = inf{ π n 1 W = a}. Wih he reflecion propery of Brownian moion (refer o [9], for y (b, a, P x (W y P x (W y P x (W y P x (W y F τn = P x (W 2b y F τn F τn = P x (W 2b y F πn F τn = P x (W 2a y F n F τn = P x (W 2a y F ρn on {τ n }; on {π n }; on { n }; on {ρ n }. Noe ha 2b y < b and 2a y > a; hereby, for any n 1, P x (W y, τ n = P x (W 2b y, τ n = P x (W 2b y, n ; P x (W y, n = P x (W 2a y, n = P x (W 2a y, τ n 1 ; P x (W y, ρ n = P x (W 2a y, ρ n = P x (W 2a y, π n ; P x (W y, π n = P x (W 2b y, π n = P x (W 2b y, ρ n 1. The above formulas are alernaely and recursively applied o gain he following expressions. Therefore we have, P x (W y, τ n = P x (W 2b y, n = P x (W 2a (2b y, τ n 1 = P x (W 2b y 2(a b, n 1 = P x (W y + 2n(a b, τ n n = P x (W 2b y 2n(a b, 0, and P x (W y, n = P x (W 2a y, τ n 1 = P x (W y 2(a b, n 1 = P x (W y 2n(a b, 0.
Mah. Compu. Appl. 2017, 22, 1 7 of 8 Similarly, anoher wo formulas are: P x (W y, ρ n = P x (W 2a y + 2n(a b. P x (W y, π n = P x (W y + 2n(a b. Taking he derivaive regarding y in he above four formulas, anoher four expressions are gained. where κ(, x = P x (W dy, τ n = κ(, x + y 2b + 2n(a bdy, P x (W dy, n = κ(, x y + 2n(a bdy, P x (W dy, ρ n = κ(, x + y 2a 2n(a bdy, P x (W dy, π n = κ(, x y 2n(a bdy, e x2 2 2π as defined before, for any > 0, x R. Noe ha τ n 1 ρ n 1 = n π n and n π n = π n ρ n for any n 1, hen for any ineger k 1, P x (W dy, τ k ρ k = P x (W dy, τ k + P x (W dy, ρ k P x (W dy, k π k = P x (W dy, τ k + P x (W dy, ρ k [P x (W dy, τ k 1 + P x (W dy, ρ k 1 P x (W dy, τ k 1 ρ k 1 ]. Repeaedly apply his recursive expression for k imes, and have: P x (W dy, τ k ρ k = k [P x (W dy, n + P x (W dy, π n P x (W dy, τ n 1 P x (W dy, ρ n 1 ] +P x (W dy, τ 0 ρ 0. Consider he convergence of he above summaion when k goes o infiniy. Since he summaion equals P x (W dy, τ k ρ k P x (W dy, τ 0 ρ 0, he above summaion should decrease on k, and consrained wihin [ 1, 1], he limi exiss and is bounded. Noe ha S a or I b is he same even as τ 0 ρ, hen pass k o infiniy and gain ha P x (W dy, S a or I b = = [P x (W dy, τ n 1 + P x (W dy, ρ n 1 P x (W dy, n P x (W dy, π n ] [κ(, x + y 2b + 2(n 1(a b +κ(, x + y 2a 2(n 1(a b κ(, x y + 2n(a b κ(, x y 2n(a b]dy. Finally, ake inegraion regarding y from b o c, and hence complee he proof. References 1. Vidyamurhy, G. Pairs Trading: Quaniaive Mehods and Analysis. Pearson Schweiz Ag. 2004, 35 47. 2. Eloe, P.; Liu, R.H.; Yasuki, M.; Yin, G.; Zhang, Q. Opimal selling rules in a regime-swiching exponenial Gaussian diffusion model. SIAM J. Appl. Mah. 2008, 69, 810 829.
Mah. Compu. Appl. 2017, 22, 1 8 of 8 3. Hamilon, J.D. A new approach o he economic analysis of non-saionary ime series. Economerica 1989, 57, 357 384. 4. Yao, D.D.; Zhang, Q.; Zhou, X.Y. A regime-swiching model for European opions. In. Ser. Oper. Res. Manag. Sci. 2006, 94, 281 300. 5. Hammersley, J.M.; Handscomb, D.C. Mone Carlo Mehods. Springer Neh. 1964, 30, 347 385. 6. Mörers, P.; Peres, Y. Brownian Moion; Cambridge Universiy Press: Cambridge, UK, 2010. 7. Schilling, R.L.; Böcher, B.; Parzsch, L. Brownian Moion: An Inroducion o Sochasic Processes; Waler de Gruyer GmbH & Co KG: Berlin, Germany, 2012. 8. Oksendal, B. Sochasic Differenial Equaions, 6h ed.; Springer: New York, NY, USA, 2003. 9. Karazas, I.; Shreve, S.E. Brownian Moion and Sochasic Calculus; Springer: New York, NY, USA; Berlin, Germany, 1991. c 2016 by he auhors; licensee MDPI, Basel, Swizerland. This aricle is an open access aricle disribued under he erms and condiions of he Creaive Commons Aribuion (CC-BY license (hp://creaivecommons.org/licenses/by/4.0/.